Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: When my script doesn't work, I ...

by Anique (Acolyte)
on Oct 02, 2012 at 10:20 UTC ( [id://996832]=note: print w/replies, xml ) Need Help??


in reply to When my script doesn't work, I ...

Debug until I drop
(includes writing say 'Checkpoint 1'; every other line - increasing the number of course)
Go home about five minutes before the office closes
Get back to work next morning (after dreaming about bugs)
Look at code for a few minutes
Find the obvious bug (often assignment instead of comparison, or using the wrong variable name)
Smack myself
Do happy dance that everything works now
Further development
Create bug
restart cycle...

Replies are listed 'Best First'.
Re^2: When my script doesn't work, I ...
by Tux (Canon) on Oct 05, 2012 at 10:10 UTC

    You should use Devel::Trace. That would save you a lot of adding checkpoints :)

    FWIW, I also use the invaluable Devel::TraceUse to find out why a script works flawless on machine A where it fails on machine B and quite often find out that it isn't my code that fails, but a bad/old module that is not updated on machine B.


    Enjoy, Have FUN! H.Merijn

      Thanks for the tip! I'll look into that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-23 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found