Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Tricking Our Egos

by mothra (Hermit)
on Feb 15, 2001 at 19:06 UTC ( #58616=note: print w/ replies, xml ) Need Help??


in reply to Tricking Our Egos

That's what works for me. What works for you? How do you get your ego our your way?

I don't think debugging your own code is so much an ego problem as it is a problem with tunnel vision. When you initially apply yourself to coming up with the solution to a problem, each person develops there own perspective on the situation and it can be hard to get out of that.

When I debug my own code, "ego" isn't generally an issue. It's usually a matter of methodical elimination of everything that's working properly, to get to the stuff that ISN'T working properly.

For example, I'm working on a Powerbuilder + ASE application right now. Often the bugs come in the form of data not being correctly displayed, often due to not retrieving the right data to begin with. To eliminate this, I'll step through to the point in the code where I'll see something like:

               ltr_procs.p_someproc(param1, param2, param3, ..., paramN)

This is an object through which stored procs (ie. p_someproc) can be called. At this point I'll open up my SQL Editor, connect to the database, and exec the proc with the parameters it's getting passed when I step through, having in mind what data to expect, and comparing it to what actually gets returned. From here, I'll place SELECT's within the SQL code at critical points until I see that the results are no longer making sense.

I seem to do this at LEAST once, if not twice a week, and it always works like a charm. :) So in conclusion, my advice (and my practice) is to forget about ego, and concentrate on developing debugging skills that will leave nothing to chance.


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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-10-25 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (143 votes), past polls