Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://76180]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2018-06-19 16:15 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.