Anonymous Confessions from Programmers.
I use printf functions to debug my code. I'm going to burn in hell.
Share on Tumblr
I use alert() functions to debug my HTML5 enabled mobile applications. I'm already burned.
Let's just say that your hell is going to be very, very crowded. I'll be the one wearing the DON'T FORGET TO FFLUSH(3) t-shirt.
No problem, unless you forgot to take one out and code goes into production. Woops...
Nothing an "ack-grep printf src/" couln't find. ;)
All my PHP projects are full of //var_dump($foo); Most pragmatic way of debugging so far..
You're using php, you already lost
Info.display("Peace is a lie, there's only passion", myIntVar + "");
A colleague did forget to remove one in a notable transaction server. It made it to GA but I don't think any of our customers were using that functionality before a patch was released that was basically mandatory
Using std::cerr :)
My code is full of NSLogs with "!!!!SOME BUG HERE ALARMO!!!!"
Sometimes I add some curse words to make the message more "informative". MessageBox.Show("fuckshit" + array.Length() ); Sometimes I end up putting MessageBox into some cycle and my program prints "crap!" fifty times...
Just write to log, like me. log("Your text here");
Nooo! You're not!!!
print_r a variable and exit in PHP. I never indent debugging statements, makes it easy to take them out in production.
I always add a print("HERE\n"); when I want to debug. Most of the times I have 3 or 4 in the code , all in different places...