Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://58738]
[Corion]: Hi marto and choroba! ;)
[marto]: TCIF!
[Discipulus]: hello northern monks!
[Discipulus]: I do not to bother too much, but considerating you 3 are my long time friends here, do you think this thing of signatures must be considered/ affronted/ discussed?
[Eily]: Hello :)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-06-23 08:21 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (538 votes). Check out past polls.