Re: How did you learn your debugging skills?
From: Otto Wyss (otto.wyss_at_orpatec.ch)
Date: 06/28/04
- Next message: Willem: "Re: How did you learn your debugging skills?"
- Previous message: Robert STRANDH: "Re: What computer language is used a lot in the IT industry?"
- In reply to: Esther Schindler: "How did you learn your debugging skills?"
- Next in thread: Willem: "Re: How did you learn your debugging skills?"
- Reply: Willem: "Re: How did you learn your debugging skills?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Jun 2004 19:09:00 +0200
Esther Schindler <esther@bitranch.com> wrote:
> I'm writing my quarterly column for Software Test & Performance
> magazine (those fine folks at http://stpmag.com ), this time about
> "best practices" in debugging. Okay, okay, I'm not keen on the "best
> practices" term either; it sounds like the sort of expression used by
> middle managers who jingle the change in their pockets. What I'm going
> for, though, is the "rules you live by" when it comes to debugging.
> The essential guidance. That is, after a long frustrating weekend
> spent looking for a bug, when you finally find it you say to yourself,
> "I'm such an idiot. If only I'd remembered [xyz], I'd have found that
> defect a lot sooner." What's XYZ, for you?
>
The most important rule is
"Don't make bugs!".
Or in other less offending words
"Write your code in a style so it's less likely that bugs are
introduced."
The fastest way to discover bugs is just skimming through the source and
look for suspicious parts. Of course skimming through the source can
only be efficiently done if the source is written in a useful coding
style and you are familiar with this style. Since in OpenSource there
aren't any good guidelines for coding I've created wxGuide
("http://wxguide.sourceforge.net/") but that's probably another story.
The second most important rule is
"Divide and conquer."
If you know there is a bug somewhere, try to divide the part into
smaller pieces and look if each piece does what it should. After enough
divisions you should be able to locate the wrong statement.
The third most important rule is
"There aren't more than two debuging rules."
If the above two rules don't help to locate the bug, your code is most
probably too broken to be debugged, better start anew.
> If I may quote you, please let me know your real name, company, and
> title, even if it's by personal e-mail (I'm at esther@bitranch.com).
>
Just go ahead, you probably find everything at wxGuide.
O. Wyss
-- See wyoEditor at "http://freshmeat.net/projects/wyoeditor/"
- Next message: Willem: "Re: How did you learn your debugging skills?"
- Previous message: Robert STRANDH: "Re: What computer language is used a lot in the IT industry?"
- In reply to: Esther Schindler: "How did you learn your debugging skills?"
- Next in thread: Willem: "Re: How did you learn your debugging skills?"
- Reply: Willem: "Re: How did you learn your debugging skills?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]