Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Please step back before ranting.

I have bugs. Of course I have bugs. When I post stuff off the cuff here I have a lot of bugs. Particularly when I post stuff that I didn't run, let alone test like I do before checking stuff into CVS.

I don't know anyone who doesn't have bugs.

Now please read what you responded to. Again. Without jumping down my throat first off.

When I say that debuggers allow us to blindly trace through code to find the symptoms of problems, I am not saying that that is the only way to use them. I am creating a caricature of the tendancy I don't like. When you use a debugger to find a problem in your code, you do indeed find the answer to that specific problem faster. But you lose an opportunity to review your logic and clean your code up, which can often solve more bugs and helps in comprehension. With the convenience and immediacy of a debugger, the details of what is happening are too handy and the thinking about why someone might not want it to be that way are too distant for my taste.

In short, I don't mind having to work harder for most bugs if it means that I get to program in a way where I wind up with fewer bugs in the end. Particularly since I have a lot of error checks which mean that if something does go wrong, I usualy have all of the information that I want immediately available. And if I don't, well that usually means that something more serious was wrong.

Besides which the ease of using a debugger can mask important warning signs. Warning signs that I would like to see.

Now as for Linus, while I see what he says, I likewise disagree with his position but for rather different reasons. Linus has been (IMO rightly) accused of suffering from The Curse of the Gifted. I think that applies here, he is underestimating the value of a tool for people who are not in his situation. In particular read again IBM's experience and look at all of the things that debuggers are listed as good for there. Yes, I think that a kernel debugger would be good. It would help people learn how the kernel works.

Note that all of my statements about not wanting to fix problems interactively don't mean that I don't think it isn't a great idea to learn from running stuff interactively. Just because Linus doesn't need to learn how the Linux kernel works doesn't mean that others wouldn't benefit from that! And it can be useful to step from time to time through fresh code...

In reply to Re (tilly): (tye)Re2: Are debuggers good? by tilly
in thread How to debug unknown dynamic code? by gaspodethewonderdog

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.