Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Re: Tricking Our Egos by mothra
in thread Tricking Our Egos by dws

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found