Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Don't ask to ask, just ask
 
PerlMonks  

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

by fisher (Priest)
on Oct 02, 2012 at 09:49 UTC ( #996828=note: print w/ replies, xml ) Need Help??


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

I'm always surprised when I hear someone's used the Perl debugger. First of all, please don't mention debugger in assembler context. Because, well, in those days debugger tool was 'a-must-have tool'. Nowadays I think it is not.

In general case, you need a debugger to see a) control flow and b) variable state. In modern reality when it is simplier to edit script file and add some 'print' statements to see both (a) and (b) I see no need in debugger at all. Again: it is true only for high-level programming, for language interpretators, and possibly false for C language, for example. Especially for gcc -O2 =)

More deeply, I think it is a best practice to make -- as many as it is possible -- of your functions to be side-effect free and test them using QuickCheck (haskell), PropEr (Erlang) and mix it up with unit testing, Test::More at least. And again, the state of variable data you can always print out turning on some 'DEBUG' macro or alike.

Please nota bene -- I have no intention to offend you. And I, for sure, can be wrong.


Comment on Re^2: When my script doesn't work, I ...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-04-20 04:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls