4 ms·
"And that's the shame of it. A good article on debugging could be useful." This is a good article on debugging. It has a lot of specific, actionable, helpful a
by MikeTaylor 13y ago
"And that's the shame of it. A good article on debugging could be useful."
This is a good article on debugging. It has a lot of specific, actionable, helpful advice. I can only assume you stopped reading after first couple of paragraphs.
- brudgers 13y agoIf I had stopped reading after a couple of paragraphs, I would not have been aware the article contained any "actionable advice." Likewise if I had stopped after 3 paragraphs or four or even five. It is only after six paragraphs of putting the student in their place - instead of just linking to StackOverflow's own prose describing good questions - that "First, turn on all compiler warnings" makes an appearance. Is this good advice? Not really. Manipulating compiler setting is a homework task in itself for a student. What could be simpler than setting compiler warnings? It's all right here: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html However, there's a bit of a logical error in this method. [0] Apparently what a student is supposed to do after turning them on is return to stackOverflow and ask another question. Well at least the author recognizes that turning on compiler warnings isn't really progress toward debugging except in the sense that debugging consists of asking questions on StackOverflow. Yet in fairness, it is hard to call this bad advice to a student struggling to finish an assignment given the next piece of "helpful advice" is: "If your program still has a bug, obtain a rubber duck." The reason I struggle with this being better or worse than the first piece of advice is that at least rubber ducks don't make sport of trolling students with homework questions. [1] According to the article, obtaining a rubber duck will allow the student's code to compile. All that's left is to refactor, write some tests, and a specification. Wasn't that helpful? Someonw has already made and posted a video presentation of the method. [2] [0] OK, it's not really a logical error, it's just a way to keep the victims coming back for more. See next footnote. [1] http://codegolf.stackexchange.com/questions/16226/i-need-a-program-where-the-user-inputs-an-array-of-doubles-and-the-program-outpu http://codegolf.stackexchange.com/questions/16226/i-need-a-p... [2] https://www.youtube.com/watch?v=tNfGyIW7aHM https://www.youtube.com/watch?v=tNfGyIW7aHM
- ds9 13y agoI actually think the article has some value (rubber ducking is good :), but continuing the parent's line of criticism: "Now step through the code using a debugger". That's all he says about that! Even for experienced developers, and depending on the language, editor and other factors, installing and configuring a debugger is often non-trivial. In fact setting up a working environment is a whole other adventure for a newbie, and a different set of knowledge and skills than programming. Yet this author merely recommends the debugger without giving clues. Of course he can't give directions for every situation, but recognizing the big leap in the advice would be more considerate of the intended audience.
- brudgers 13y agoRubber Ducking is good for someone who writes code all day all year. It's something a person can do if they aren't struggling with syntax and logic and EMACS shortcuts while under a short deadline while having no team for support. I suspect most students wind up at StackOverflow via websearch. Their background is writing text messages and formulating good questions conforming to StackOverflow's style guide is a skill unto itself. Most programming education is sink or swim. It doesn't start with writing tests and specs - let alone learning to use a debugger (call stacks are part of data structures and algorithms courses not introductory programming classes). The people who have more of it right than anyone are the PLT group. Their curriculum is not designed to weed out the weak. It optimizes on preventing false negatives rather than false positives. It's not as if there is a scarcity of computational resources any more. Likewise, it's not like StackOverflow will run through its supply of webpages unless students are actively discouraged and abused. It is only because a focus on preventing false positives ego strokes those who have been identified as positive, that the practice sees so much love at StackOverflow. There's a back button on the browser for anyone who doesn't like helping students with homework. The site would be better if using it was the preferred behaviour.
- stonemetal 13y agoYour average CS computer lab is Windows or OSX with an IDE already installed, use the debugger is asking them to click a button not install GDB from source.