Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Are debugging skills atrophying?

by satchboost (Scribe)
on Apr 27, 2001 at 21:28 UTC ( #76180=note: print w/ replies, xml ) Need Help??


in reply to Are debugging skills atrophying?

As I've never really worked very closely with debuggers, I've always worked on arriving at sane design and used print statements. It's been my experience that 99% of all problems that arise can be solved by one of these three methods:
1) print statements. Usually, you are assuming that a given variable has a certain value when it doesn't. (Yes, I know that examining memory within a debugger does this, but I feel that debuggers are usually overkill.)
2) Writing out the flow. You might be assuming that a function is called exactly n times, when it's really being called n+1 times. Or, that foo() is called before bar(). This contributes to sane design.
3) Adding anal checks. Are you doing @$foo? It might be useful to verify that ref($foo) eq 'ARRAY'. These sound stupid, but if you're writing something that a human will enter data for, you cannot be too careful. If a human can mess it up, a human will mess it up.

And, no, kids these days aren't less capable debuggers ... than we were when we were kids. I remember learning how to debug 8 years ago, when I was just getting into college. Just remember that a lot of the people with 2-4 years experience are only 19 or 20 years old. They're still kids.


Comment on Re: Are debugging skills atrophying?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://76180]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2014-07-31 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls