How to debug small programs
ericlippert.com
ericlippert.com
Yes, students can be rude asshats. But hang around 'regex' and asshattery is no more unusual than 'SML'.
This article captures the smug prickishness that stackOverflow increasingly celebrates. JustFuckingGoogleIt was clever a decade ago. It's quick and to the point and the pain is over.
Learning to program is hard. A non-working program with a looming deadline is genuinely and legitimacy stressful. And so what does the article do? It begins by belittling the student, telling them their question was not worthy of the great community. Let's be honest, the intended audience isn't students, its other StackOverflow contributors and its purpose isn't to teach but belittle.
And that's the shame of it. A good article on debugging could be useful. Hell a teacher might even incorporate it into the class. But of course the StackOverflow community could not produce such a document. It violates their unfortunate tribal mores.
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.
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
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-p...
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.
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.
Eric Lippert isn't a random SO lover and writes lots and lots of helpful articles. I consider this one helpful as well. The advice is good. You focus on the "so SO closed your question" part and seem to ignore the meat of the article?
Could Lippert write an article truly helpful for students? Almost certainly, but this is not it. Such an article can't be written from a starting point of holding students in contempt, and that's part and parcel of the tribal mores at StackOverflow.
My advice would be to follow his own advice and teach a rubber duck to debug. Or better still a rubber duck's 15 year old daughter sitting in a Nairobi internet cafe writing code on her cell phone.
Your reply again seems to fight SO. I get the feeling you use this article to further your cause, to prove that SO is bad. I've got no stake in that conflict, my SO account is ancient and I'm mostly a reader for years.
I don't believe Eric meant to belittle people and I think your impression is .. a lot more negative than it should be.
Last but not least: If a rubber duck's 15 year old daughter (Hey, at this point I could turn around and ask you why the example character is female and turn this into a different type of mud-slinging contest) sitting in Nairobi (why Africa?) would type code on her cell phone and it didn't work right away, SO really isn't the answer.
You might not like it, but generic "Hey, so I wrote this stuff and it doesn't really work" sort of questions aren't deemed acceptable. Mistaking a QA site with (more and more) strict guidelines for a generic place to call for help and coming up with an example that feels like a call of "think of the (african, female) children)" won't help. This is the wrong place and judging people for these guidelines is .. weird.
There might be a need for a place where your fictional characters should be able to ask for help and get real support. I wouldn't know and I can only imagine that it would be hell to try to help out.
All of that is totally irrelevant for the article at hand though. Eric teaches people to fish, you seem to argue that he'd (we'd?) hand out the meals instead.
How is the article smug? To me, it comes with good tips for beginners on how to approach a problem and solve it effectively without having to wait for hours on random people on the internet.
>> And so what does the article do? It begins by belittling the student
How does the article belittle the student?
>> telling them their question was not worthy of the great community
Should HN allow everyone to post whatever they want, or should new users rather learn the rules, scope of the site etc.? This is called basic moderation.
>> Let's be honest, the intended audience isn't students, its other StackOverflow contributors and its purpose isn't to teach but belittle.
No, it's not. It's to have a good source one can point beginners to in the future. Good for them, good for SO.
>> A good article on debugging could be useful.
This article is good for beginners. You are just so biased and full of hatred for anything mentioning SO that you're not seeing straight.
The other problem is that StackOverflow is fairly static after the initial answering period on a question, so they can't even have questions which compare programming languages or databases or such, because those answers will change and no one is going to come back and update the information on the question page. But information does get updated on wikis. So even though StackOverflow is essentially functioning as a wiki, it doesn't present the affordances of a wiki, so people don't keep pages up-to-date like they would on a wiki.
Notice that the way a non-participating StackOverflow user uses the site is exactly the same way a non-participating Wikipedia user uses the site. You search for something, the StackOverflow question or Wikipedia article comes up as the first result. You click it, get the information you need, and leave.
StackOverflow is a wiki-FAQ for programming posing as a discussion board.
(And just like on Wikipedia, I don't participate on StackOverflow because I expect anything I ask to be closed for one reason or another just like I expect anything I add to Wikipedia to be deleted for one reason or another.)
When I was a CS student at Waterloo, no one taught us how to debug small programs. Maybe things have changed since then, but at the time this was just a skill you were expected to pick up for yourself. I remember many times coming into the lab early in the morning and finding my fellow students asleep on their keyboards, having stayed up all night trying to find a bug in a 20 line program.
If you don't like my article then that's too bad; my suggestion to you is rather than complaining about it, why not write your own that you like better? I'd be happy to publish a link to it.
In the future if you have a problem with something that someone has written on the Internet, why not contact them and have a civil conversation about it? It's not like I'm hard to get ahold of.
If in the future you do that, you might find that you've misunderstood the motivation of the article you find so objectionable. And the author might find out from you that they could communicate their point in a better way. The world would get better all around, and that could all happen without resorting to profanity and name-calling in a public forum.
Could not disagree more. Students: submit your homework to StackOverflow. You'll get yelled at, but someone will be desperate enough for imaginary internet points that they will give you an answer regardless (just make sure you keep your accept rate high enough).
(NB: This is facetious. I don't condone submitting your homework to StackOverflow: You won't learn that way.)
I founded a number if groups on Facebook a few years ago and they're primarily a QA sort of community, like SO but purely on FB. We don't just get the "help me find the error questions" but also:
- have u got free PDF for <expensive book> - please give me code for <trivial project> (often be explicit that its a student project) - what programming language should I learn? (Often its java or PHP. I literally know one guy who has been trying to decide for 3 fucking years)
Sometimes I will get "I am just 2 gud at java coding" and also group/page spam.
Sometimes questions like the above, especially the free pirated PDFs! Can't believe people would be rude enough to try and throw all my hard work over the years down the pan because they don't want to pay for education.
I don't make money from this. Nor has it improved my career prospects. How dies StackOverflow sound now?
The answer is simple. Every building has a side where the dumpster goes. Crapping on students is StackOverflow's. Because it's the only officially sanctioned form of meanness on the site, that's where the venom flows. It is StackOverflow's culture which makes submitting homework questions a poor way to learn. Pair programming and mentoring are excellent pedagogical techniques.
Homework questions don't reflect any more laziness than any other category of StackOverflow questions. Indeed it might be the case that fewer homework questions can be answered by Googling than questions about EMACS. I know, because I've answered both and homework questions tend to require solving a logical puzzle not just RTFM'ing.
I learned a great deal from answering homework questions because that's about my level of expertise (just like Googling EMACS questions is). The internet points I earned are the same color as everyone else's - a shade of earnest helpfulness colored by the need to be loved.
Students wind up at StackOverflow because that's where the search engines take them. A student can't avoid landing there as part of making an honest effort to solve the problem. Getting rid of students is simple, stop SEO and prohibit crawling bots. Notice how HN doesn't have a problem?
The behaviour of StackOverflow's community toward students is simply a function of nothing better to serve as the other. It's the petty gatekeeping of a medieval guild. It has all the merit of kicking puppies.
(This is facetious. I don't condone kicking puppies)
As a very active Stack Overflow user, I immediately start thinking about how many questions that are going to get links to this as comments. :)
Well done, I hope it helps although I guess the supply of beginner programmers won't dry up over night.
I wish my end users would actually read the error messages at all.