Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I would agree that basic debugging skills are worse now than they were 10 years ago, but I would also say that basic math skills have deteriorated. Watch a group of friends try to determine what portion of a bill is theirs, and what size tip to leave and it is obvious. Blame the calculator.

With debugging it isn't quite as simple though.

When I first started programming I would sometimes write the program out on paper, and read through it while keeping track of all the variables. Being able to read code while keeping a mental list of what is happening is valuable when working in a group, but this skill is sometimes neglected due to the ability to run it in a debugger and watch certain variables.

My ideal development strategy is as follows:

1. Write the unit tests as a working specification document. This helps to identify flaws in the intended interface early in the development process.

2. Create mock objects that emulate the behaviour of the intended module, with fixed input/output. This allows you to verify that you have the necessary data at each step, and also allows you to verify the algorithms without external dependencies.

3. Implement the object.

This strategy leads to loosely coupled / tightly cohesive objects, which are easier to verify with testing and easier to isolate issues when debugging.

A similar strategy can be followed when debugging the code of your team members. Debugging manually is a very time consuming task, regardless of whether the debugging is done through code reading or with a debugger. Use this time more wisely and develop test cases that mirror the analysis you do during debugging.

In reply to Re: Are debugging skills atrophying? by imp
in thread Are debugging skills atrophying? by dws

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Happy-the-monk]: Discipulus: thanks! So in Ascii "CTRL" + "ARROW UP" + "<-- -->"?
    [hippo]: On my tab key the left pointing arrow is directly above the right-pointing arrow (and they are each pointing at a vertical line). It's a UK keyboard.
    [Discipulus]: choroba thanks.. now i understand: like find the tresaure.. but in this case seems true: no one noticed

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (4)
    As of 2017-11-21 10:14 GMT
    Find Nodes?
      Voting Booth?
      In order to be able to say "I know Perl", you must have:

      Results (297 votes). Check out past polls.