3 ms·
Similarly my jaw dropped when people in 5th years were amazed at Eclipse's debugger. They never used one before.
by agumonkey 10y ago
Similarly my jaw dropped when people in 5th years were amazed at Eclipse's debugger. They never used one before.
- gravypod 10y agoI'm a TA at my university. We teach python in the intro course and from what I can tell my boss is similarly displeased with this reality. We are currently trying to replace IDLE with some other IDE in our curriculum. I've pestered my boss to require PyCharm or a similar IDE but he says it is likely too complicated for beginner programmers. While I respect their opinion I feel that pushing people into a difficult environment immediately will better their develop their confidence for future situations like this. It's all to often that I encounter fellow students who are "afraid" to attempt to use tools, algorithms, language features, etc because they haven't been trained in their usage. As someone who taught myself to program that's pure crazy talk.
- initram 10y agoThis is so true and so awful. I ran into the same thing. I had used a debugger and couldn't believe people had resistance to it when it was suggested by our TA. They were like, "Nah, I'll just 'printf' everything." And then the debugger they tried to get us to use was the god-awful command line version of gdb. I seriously think that turned several people off from ever using a debugger again because it was so bad.
- agumonkey 10y agoSadly printf debugging still captures something about the investigation process of humans, something debuggers don't handle well at first, until you're used to them and know how to map. It's blurry in my mind but you want to handle sets of breakpoints and custom structure IO/formatting for a debugging session, and debuggers don't offer a way to smooth this out (I'm no expert though, grain of salt required) so printf(...) is still a large reflex.
- rmetzler 10y agoIn a debugger you have to observe the changing state. If you print values you get a debugging log which (for me) is often more helpful, because I can easier map it to the offending code line. But it's good to have both tools available.
- kulu2002 10y agoprintfs are usually good. However when you deal with complex realtime multithreaded processes, sometimes high priority thread just pre-empts the printf, so you need to use somekind of flush statements ...this delays overall operations. In such cases debuggers are good 'to some extent'. I still haven't found the best way to debug hard realtime multithreaded applications
- douche 10y agoThose are exactly the places I find myself relying on printfs. In real-time, multithreaded code, you can't block on a thread and inspect things for a couple minutes and expect it to resume working afterwards.