Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: cannot follow hanoi subroutine

by erroneousBollock (Curate)
on Nov 06, 2007 at 04:27 UTC ( [id://649144]=note: print w/replies, xml ) Need Help??


in reply to Re^2: cannot follow hanoi subroutine
in thread cannot follow hanoi subroutine

Long time ago, I took a pascal course and there was a tracing program where I can actually step through the program and I personally think perl's debugging mechanism is little bit behind.
While it's not state-of-the-art, Perl's debugger is useful either by itself or when used from another tool.

The full version of Komodo IDE comes with Perl debugger integration, allowing you to visually set/clear breakpoints and to step through the code as with other IDEs.

The Data Display Debugger also integrates with the Perl debugger in a way familiar to users of GDB, allowing you to trace the execution of your programs and to visualise the contents of your data-structures over time.

Aside from "backward in time" debuggers which are starting to appear recently, the state-of-the-art is probably Visual Studio 2005's .NET debugger. Specifically the edit-and-continue and exception tracing facilities are fantastic. Hopefully Perl will one day attract such tools.

-David

Replies are listed 'Best First'.
Re^4: cannot follow hanoi subroutine
by joel.neely (Novice) on Nov 06, 2007 at 13:26 UTC
    Hopefully Perl will one day attract such tools. (speaking of Visual Studio's debugger)

    With all due respect, I sincerely hope not!

    I routinely work in a state-of-the-art IDE with all the usual debugging bells and whistles, but strenuously avoid their use. Years ago, watching my collegues and myself bog down in "step-in", "step-out", "step-over" swamps, I began to suspect that such an approach to understanding a program is counterproductive. (And, as we all know, totally impossible for multithreaded code!)

    Years ago Fred Brooks described the OS/360 linking loader as the most impressive, powerful implementation of a concept whose time had passed. I feel the same way about debuggers. With CPU clock speeds in the GHz range, and program execution times of minutes, hours, or months common (e.g. reactive systems, transaction processing, etc.), attempting to understand a program by single-stepping (whether at machine opcode or program statement) feels like trying to recognize a friend's face by examining DNA sequences.

    I sincerely suggest that the sooner we get out of the habits of thinking about control flow and micromanagement (literally! ;-) and concentrate more on abstraction and composition, the better equipped we will be to write beautiful code that will effectively use those 80-core laptops soon to appear.

    I earlier praised Mark Jason Dominius' book Higher Order Perl (and he in no way is to be held responsible for my ranting). That book provides an excellent introduction into thinking functionally rather than operationally. I can't speak highly enough of the value of making that shift in one's thinking, regardless of the language at hand.

      Years ago, watching my collegues and myself bog down in "step-in", "step-out", "step-over" swamps, I began to suspect that such an approach to understanding a program is counterproductive.
      I'll stop wanting it when there's another method to quickly track down bad/broken logic in someone else's spaghetti.

      (Higher Order Perl) provides an excellent introduction into thinking functionally rather than operationally. I can't speak highly enough of the value of making that shift in one's thinking, regardless of the language at hand.
      All that happens when one makes such a shift is that you tend to "operate" on type values, families of function, and protocols for abstraction (rather than a series of instructions for mutating state). These concepts are further from the grasp of most programmers today than the understanding they need of their own programs.

      I'll be quite surprised if new programmers don't want state-of-the-art debuggers even after your revolution comes ;)

      -David

        If you're interested in this topic, you may wish to re-read the discussion starting at Are debuggers good?. I'm sure that the debate will never end. However I'm with Joel Neely, people who use more advanced programming techniques will tend to be the ones who choose not to use the debugger.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found