Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Tricking Our Egos

by jynx (Priest)
on Feb 16, 2001 at 02:47 UTC ( #58738=note: print w/ replies, xml ) Need Help??


in reply to Tricking Our Egos


Thinking about it, i suppose that is a proper way to explain what is happening for a lot of programmers when they debug. Don't know if i qualify as a programmer but i usually try something like the following:

1) make every block of code simple and direct
A block of code can be a subroutine, a script, or sometimes just one line. Just make sure that that block does exactly what it says and no more (this usually requires double checking while writing the code)

2) when debugging, find the blocks of code that relate to the problem
Since we know that blocks of code only do their one thing (hopefully well), we can narrow it down to certain parts relatively quickly

3) Pat yourself on the back for the blocks of code that didn't cause a problem.
This is an ego boost for a job well done, at least on part of the code.

4) Triple check that your solution worked
This will assure that you will have less problems next time something goes wrong

5) Look for the next bug
It's probably in that block that didn't have an error last time, but now you can pat yourself on the back for a different piece of code.

Me thinks my main problem is that i will always assume there are unsolved bugs in my code, even when it's fully working, even if it's only one line. So patting myself on the back is a way to get myself to continue since i'll know that at least one piece of code is ok.

to each their own, TIMTOWTDI
jynx


Comment on Re: Tricking Our Egos

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-12-23 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (135 votes), past polls