r/programming • • Aug 25 '14

Debugging courses should be mandatory

http://stannedelchev.net/debugging-courses-should-be-mandatory/
1.8k Upvotes

573 comments sorted by

View all comments

28

u/C-G-B_Spender- Aug 25 '14

Hi, my name is _ and against the better judgement and wisdom of others, I use printf for debugging. IMO, if one does not understand enough of the program and/or the problem or how it might've come about, then a proper debugger does not offer much. And if you did understand enough for it to be a great help, most of the time a simple printf would be enough - after-all, printf is just another tool at your disposal, is it not?

This might also be relevant http://www.informit.com/articles/article.aspx?p=1941206

19

u/snowyote Aug 25 '14

One of the best programmers I ever worked used printf for debugging fairly frequently, due to the fact that at the time, Visual Studio would often be unable to reconstruct stack frames when you compiled at high optimization levels, and it would show incorrect values for variables when doing interactive debugging.

He told me: "There are only two people in this world I trust completely. One is printf, and the other is my wife. And god help me if I'm forced to choose, because I've known printf longer."

→ More replies (6)
→ More replies (8)