Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Anique (Acolyte)
on Oct 02, 2012 at 10:20 UTC ( #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 (Abbot) 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
Node Status?
node history
Node Type: note [id://996832]
help
Chatterbox?
[ambrus]: So that, or if you really want something agnostic to the loop, then use curl multi. Its interface is quite reasonable (unless you use an old version),
[ambrus]: though it's very C-like (serious use of varargs so easy to pass the wrong type), and there are some minor problems (busy loop because it doesn't use the same timer as your event loop, so you have to artificially delay timer callbacks by a small amount).

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2016-12-07 16:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (130 votes). Check out past polls.