Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
A while ago on another site I had an interesting discussion on exactly this topic. I find it amazing how many good programmers have all sorts of uses for interactive debuggers - but say that debugging is not one of them! It certainly isn't for me. And in this problem in particular, the code you are describing sounds like stuff which I would suggest that you not use a debugger on.

So how would I approach this problem?

First of all I would use strict. If his code cannot readily be cleaned up to pass that, then he is likely doing some nasty stuff. I would prefer to rewrite than maintain dynamic symbolic references.

Otherwise I would then step back and set out to understand the code on a conceptual level. It will take a while. But that is the main problem with debuggers - they make you think about problems at too low a level.

Now you say you cannot check his code out. Do you have a development environment that is separate from production? If so then develop in that. If not then tell the rest of us where you work so we know to avoid the company, then try to figure out how you can set up a small test environment.

If you can't do that, then read the code anyways. And let this be a lesson for you in the future. Don't use stuff that you don't really understand which you are not completely confident about... :-)

In reply to Are debuggers good? by tilly
in thread How to debug unknown dynamic code? by gaspodethewonderdog

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 or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-01-16 19:39 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (49 votes). Check out past polls.