views:

48

answers:

1

I'm just curious, but is there a name for the process using print statements to debug your code? An example in pseudocode

 x=3.2e39
 print x
 y = function1(x)
 print y
 z = function2(y)
 print z
 w = function3(z)
 print w

Executation:

 3.2e39
 3.2e36
 NaN
 NaN

reveals some bad math in function2. If there's no standard name, what do you call it?

+6  A: 

It is often called "printf debugging", even if something named printf isn't used, after the C function. It's really a simple form of logging, and you could use various names to that affect.

In a language that has a print statement or function as you showed above, "print debugging" would be clear enough without having to explain printf to someone that's never used C or a similar function.

Roger Pate
And there are 2 amazing things about printf debugging: 1) how often it's still used, and 2) how useful it still can be
Michael Burr