Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Are debugging skills atrophying?

by Sherlock (Deacon)
on Apr 27, 2001 at 21:27 UTC ( #76179=note: print w/ replies, xml ) Need Help??


in reply to Are debugging skills atrophying?

Being rather new to writing Perl, I'm still learning some new debugging tools, but I have carried one practice over from my other programming languages that has greatly helped - printing the contents of my data structures.

I tend to deal with rather compex data structures fairly often and it has lead me to become almost obsessed with seeing exactly what data I have stored in my structures - especially when I've found a bug. I've noticed that, all too often, fellow programmers simply assume that the data that's in their structures is correct and that their logic is wrong. They then spend countless hours trying to find the faulty logic only to find that their data was no good in the first place.

My debugging rule of thumb is to make sure that you know exactly what you're dealing with and then you can step through your code with a debugger or even by hand, if need be. Without knowing if your data is correct in the first place, there's no way of truly debugging your code. I think this is something that programmers (sometimes very good programmers) take for granted and fail to inspect.

Is that something that other people have noticed? I think that I might just feel this way because I deal with so many complex data structures.

- Sherlock


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://76179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-09-20 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (159 votes), past polls