140

I teach an introductory course in which the focus is on learning how the machine works: memory, registers, caches, assembly code, and all that. But it is also the first course in which C is used, and my students do some programming projects that are moderately ambitious for beginning C programmers. It is obviously not kosher for them to post homework questions to Stack Overflow, but many of them have questions about basic C things like the difference between a typedef and a struct tag, the use of function pointers, and so on.

Is it an appropriate use of Stack Overflow for me to direct my students to it as a source of knowledge about C programming and assembly-language programming?

Return to FAQ index

Moderator's Note:

Good FAQ entries contain only one answer, or one answer split up into multiple answers if it is too long. This entry contains multiple answers with differing information that need to be combined into a single answer. Please feel free to combine and organize information in this entry so that it is easier to find and understand.

3
  • 28
    I love that kids are still learning assembly! I'm all for welcoming those poor SOBs!
    – Nosredna
    Commented Jul 29, 2009 at 21:05
  • 1
    Note that homework questions are allowed within certain limits.
    – bwDraco
    Commented Aug 25, 2012 at 14:49
  • 1
    I don't think you need to 'send' them to SO. 95% of any programming related help topic in Google will be SO anyway. Within the first few basic searches in Google will draw them to this site sooner or later anyway.
    – ProEvilz
    Commented Nov 23, 2017 at 16:07

14 Answers 14

113

I would say "Yes", with the caveat that they don't use Stack Overflow to 'plz send teh codez' (did I do that right?). Hell, I want to use Stack Overflow as a resource for C and Assembly-language related items, so I hope they do. The sooner they're indoctrinated into the ways of researching using whatever is at their disposal, the better off they'll be. They may or may not be sent "RTFM" answers; depending on how they ask the question:

See: How do I ask and answer homework questions? and Which types of “programming related” questions are appropriate?.

3
  • 4
    Back in the 70's and 80's if I had Stack Overflow as a student, it would have been EXTREMELY helpful. I have attained a professional standing, I think, due to my curiosity, self-driven investigations and learning, and this is exactly the kind of thing Stack Overflow enables and promotes in a healthy ecosystem.
    – Jay Imerman
    Commented Mar 10, 2014 at 13:02
  • 1
    self-learning is a skill for a life-time ... many programmers need this
    – Skaperen
    Commented Mar 21, 2015 at 10:11
  • 1
    Keyword here is researching. Students (and everyone else) should always research thoroughly before asking a question, including googling, looking at the docs, reading relevant tutorials, etc. See How much research effort is expected of Stack Overflow users?
    – wjandrea
    Commented Jan 5, 2022 at 19:48
80

I quote the Stack Overflow FAQ:

... it is welcome here. No question is too trivial or too "newbie". Oh yes, and it should be about programming. You know, with a computer.

Too many people forget what it was like when they were newbies.

6
  • 2
    I'm not sure I fully agree. There's nothing wrong with being a newbie, but I think that when Jeff started SO, he didn't expect it to be successful. Too many trees can obscure the forest.
    – Uri
    Commented Dec 5, 2008 at 4:49
  • 24
    I understand many fear SO could get "clogged" with irrelevant tech questions and wannabe hackers, and maybe a "101" section could separate the wheat from the chaff, but we need to avoid discouraging kids who want to do something more than playing Xbox in their spare time.
    – Richard B
    Commented Dec 5, 2008 at 5:17
  • 2
    I don't think we're discouraging them. I saw enough students post here some really smart questions. I'm referring to the kind of "why don't my progam to calculate X print Y" where X and Y are really specific to the phrasing of the homework assignment and thus not really about the PL.
    – Uri
    Commented Dec 5, 2008 at 5:39
  • 8
    +1 I think it's important to not alienate the noobs/beginners. The structure of SO can handle both extremely in depth expert level questions and complete noob 101 questions.
    – Dhaust
    Commented Feb 9, 2009 at 6:30
  • 1
    "Too many people forget what it was like when they were newbies." oh gawd you just made me think of Fortran
    – Skaperen
    Commented Mar 21, 2015 at 10:13
  • This answer doesn't reflect the current state of the website. It is nigh impossible by now to ask a "trivial" question that meets the how-to-ask standards and isn't a duplicate. Commented Mar 26, 2021 at 10:17
60

Being involved in teaching myself, I would generally be cautious about sending undergraduate students to Stack Overflow.

While I love teaching programming to undergrads (and grads), my experience is that undergrads tend to be "lazy" (or more correctly, lazier) and will generally do anything to avoid opening a book or researching a question themselves. They'll ask their friends even if it would take just a little longer to find the answer themselves. I have seen students ask "what would this print?" when they could just write the code and execute it.

Now I don't have a problem with this practice; I'm sure I was this way in my undergrad years too, but as an educator I believe that building research skills is important, and the skill of filtering through a book to find an answer is critical.

Also, early on students are not usually able to abstract from their specific problem to a more general question about the programming language, so you would get questions that are not very "reusable" (except for future students in the same class doing the same assignment). That can reduce the overall usability of Stack Overflow.

Stack Overflow is a great resource, but it's not meant to replace a basic language reference book. I think it can provide great knowledge to a proficient student who wants to learn more - I've been programming and teaching for years and still learn new things.

If it was grad students or advanced undergrads - completely different answer, of course.

7
  • 2
    'I have seen students ask "what would this print?" when they could just write the code and execute it.' In my opinion some students might ask "What would this print?", when actually they mean "WHY would this print that?". A useful question, just wrongly worded :/
    – Frans-Willem
    Commented Dec 5, 2008 at 10:08
  • 2
    There's a very tool by Prof. Andrew Ko from the University of Washington called "The Whyline" that actually tries to help novice developers track those "why" sort of things; he did it for AWT but it's really nifty.
    – Uri
    Commented Dec 5, 2008 at 15:01
  • I think it is unfair to put all undergrad students into one group as lazy ... I am saying that as an undergrad in a Software Engineering major at Uni.
    – X-Istence
    Commented Mar 28, 2009 at 7:58
  • 2
    I don't think I characterized all undergrads as lazy. But the fact is that under an intensive course schedule, even many of the best students would cut corners. Especially if it is not their major. The really good students would know the answers or find it themselves anyway, without seeking help.
    – Uri
    Commented Mar 28, 2009 at 15:06
  • 5
    Actually, I think StackOverflow is a great place to fix those problems in people. If people are being plain lazy, the responses will be accordingly.
    – skiphoppy
    Commented Apr 2, 2009 at 20:25
  • 3
    There are two kinds of problems one encounters when programming: the ones where doing the basic research would get you the solution, and the ones where you've made some silly mistake to which you are personally blind. (I.e., my misspelling of one function name that produced extremely odd compiler error messages and took me ten minutes to debug). The latter is just pointless frustration for students, and anything that can get them out of that faster is a Good Thing. But how do we do that without letting them get lazy about the former?
    – Curt Sampson
    Commented May 20, 2009 at 1:30
  • 3
    Sending my students to SO (and the sister sites) has been enormously fruitful for both them and me. "Lazy" students often don't know how to properly ask a question, students get plenty of nudges from the site and it's operators in the right direction. Rapidly they see how to ask and eventually answer questions on the site if they stay with it. There is a strong (and mostly successful) socialization for users that stick with the site and a good correlation with knowledge that they internalize from their interactions here.
    – Hooked
    Commented Apr 19, 2012 at 14:08
24

shouldn't they be doing their own research first

Beginning students are still learning how to 'do their own research'. In fact, part of my job is to teach them how to do their own research. (Last week I gently suggested to a student that since he had paid for a copy of Kernighan and Ritchie, he might try using it instead of Google as a source of information on C syntax.) I know it's appropriate for me to send them to my course web site and to the library. It sounds as if it's OK to send them to stackoverflow as well.

shouldn't they be asking you, their teacher?

LOL! Believe me, they do! Since I started teaching this class, 90% of my Skype calls are now from students. But they have discovered that I am not available 24-7, and if I've gone to sleep it might me 12 hours to get back to them. The horror!

Having met with mostly encouraging responses, I think I will try this as an experiment next year. They are good kids and work hard, and I think they will understand that stackoverflow is not a vehicle to do their homework for them. And although they ask mostly beginners' questions, they have stumped me more than once. (Like this: why does a retq instruction have a rep prefix in front of it? Is the return being repeated?)

3
  • 3
    I completely disagree. Not only should you not send them to SO, you also should not send them to the book. Google is the best programming reference in existence. As a current college student, I never open my programming books. When I need help on ANY aspect of programming, I go straight to www.google.com. SO is not a reference for people who are new to programming; it is a forum to pick the brains of other programmers AFTER one has exhausted Google's offerings. Otherwise these forums get filled with posts like tinyurl.com/badSOpost
    – muusbolla
    Commented Jun 30, 2009 at 21:23
  • 5
    As a non-lazy student, it bugs me a lot when other students don't learn how to translate ideas into code, but only piggyback off of other people. I find there are many completely ignorant students in my classes who try to use ME as a resource, instead of just Googling it themselves or gasp opening the book. For your students who cannot learn to program from class material, the book, OR Google... fail them. It is my firm belief that the average quality of the world's software would be much better if the incompetent programmers had just failed out in college, instead of being "helped along".
    – muusbolla
    Commented Jun 30, 2009 at 21:31
  • 11
    @muusbolla: I'm sorry your teachers are giving you such crappy books. There are a few good ones out there. Re 'SO is not a reference for people who are new for programming', the founders disagree and say newbie questions are welcome here. As for the bad post you cite, it appears that the voting mechanism dealt with it quite effectively :-)
    – Norman Ramsey
    Commented Jul 1, 2009 at 18:48
16

It's reassuring to see a teacher a) reading SO b) considering it a valuable resource.

I would direct them to it as a source of research - primarily learning about programming from previous questions. If they have a question that needs asking and hasn't been addressed, I think the SO community would like to see it here.

I think it's also a valuable introduction to peer review of ideas & questions not just code. If they make a mistake it will hopefully be explained to them, and if they have unrealistic expectations or behave in a way that is likely to cause them trouble in the future, it's better to find out through SO right?

I think SO is a fair representation of the professional programming world (albeit with a bias towards those who care about their jobs - but plenty of rhetoric to balance that), and the early they come into contact with that the better.

8

I don't think there is any problem with sending students here to find answers, and generally the community seems receptive to helping with homework, as long as it looks like they have had a go and at least opened TFM.

I don't mind pointing out where there might be an error in someone's homework code, but I'm not going to write it for them.

On a teaching level, as long as they are learning how to catch the fish themselves, and not being handed the fish, they will be better off for it.

Being able to work out, by whatever means neccessary, how to do something that you have never done before, is a crucial skill for anyone in this business.

It's also important to learn how to recognise a bad solution, because sometimes, there's stuff on the internet that's not true :)

The truly lazy will abuse it, but people around here aren't stupid.

8

I think probably the most important part of teaching students programming-related matter is to teach them how to get help when they're stuck. In my experience, this is the main difference between beginners and experienced programmers: experienced programmers will stumble upon the same problem but they'll know where to find the answer – in a matter of seconds or minutes – while the beginner might take days.

As such, the thing I try to impress upon my students most is how (and where) to find help. And yes, Stack Overflow has become an invaluable resource there.

6

I wouldn't actively direct them here.

Being new to programming myself I've found that SO provides an answer, but when you have the answer you lose out on the knowledge of actually finding the answer. Students lose out on being able to expand the bounds of their problem-solving skills, something that is very important to CS students.

Yes, undergraduates are lazy and more often than not they'll look to the Internet for answers. The difference is that students tend to be looking for the answers, not looking for somewhere to ask for them. Whilst many will argue with this statement I believe that it is not necessarily up to the teacher to tell the student where to get the answers. I'm sure they're smart enough to find a useful resource for their projects.

1
  • 1
    Eventually one of the students will find SO and recommend it to their peers, after which it will spread like wildfire. Then every year after that the previous students will tell them about it. It would be hard to keep it a secret. Better to have the teacher recommend it with the caveat to use it for situations when they get stuck or have a narrow question they can't find the answer to on Google, something tricky.
    – Jared Updike
    Commented Jun 1, 2009 at 17:52
5

While I don't think it would be correct to answer your question with a "no", I can't help but wonder: if they have questions shouldn't they be doing their own research first, then if they still have questions, shouldn't they be asking you, their teacher?

1
  • 1
    It sounds like they DO ask the teacher questions at all hours, except late at night when he's asleep and the assignment is due the next day. I've been in that situation, some years ago. Even smart, hard working students can get stuck.
    – Jared Updike
    Commented Jun 1, 2009 at 17:55
4

Honestly, there are many fantastic resources on the net, and I wouldn't dissuade your students from using any of them.

Of course, there are lazy students and there's many lazy professionals. At the end of the day, those that don't take the time to learn this stuff and understand it are cheating themselves and when it comes to exam time, they'll fail.

Is that their fault because they're lazy? I think I'm about as lazy as some of the laziest programmers out there and I go out of my way every day to save effort and become more efficient with my coding. Being lazy can be a good thing if it is applied properly. It's hard work being lazy... but that doesn't make me copy and paste someone else's code without understanding what it's doing and why it's doing it that way - because I love to tinker and figure new things out.

All you need to get them to do is realize that there are a large amount of "professional" programmers out there that are considered script kiddies that just cut and paste code from other sources. The answers they get from sources online may not be the "right" way to do something for the task they're trying to complete and may not even be the best way to do something. Hell, it may be the worst performing hack that gets the task done by sheer brute force.

As long as the student has the smarts to understand what they're looking at and understands how the code is achieving it's purpose and why it's doing it that way and they're learning from it, I'd say that it's not a problem.

Of course, how do you separate those that have a thirst to learn and would dearly love to surround themselves with all the wealth of knowledge of the online developer community from those that would just grab someone else's code and attempt to pass it off as their own?

I would say that it depends entirely on the student - you know them better than anyone else. Maybe you let one or two in on it because you know they'll use it properly and tell them to keep it to themselves. Your call.

4

I would say yes, they are welcome, but with a caveat.

Homework is a way to improve the students understanding of a particular subject. So, "first things first", they should attempt doing it.

They should at least put an effort to do some basic research on the said topic.

Then when you intend posting it to Stack Overflow, put down their conclusion for the homework.

What I would love to see is...

  • What's their analysis of the problem at hand?
  • Did they tried some code? If yes then please post it.
  • Where did they stuck up?
  • etc.

I understand this may not be always possible, but doing this will portray the good intent of any student.

4

Well, the benefit of having them come here is that you frequent the site yourself, so if students are asking the full homework question as opposed to just a small problem they are having with it, you can see who it is. I feel it's okay to get help with homework, but pasting an entire question here and then going for a coffee break doesn't help them whatsoever.

Make sure to let them know that you also frequent the site. They will probably be hesitant in what they post if there is another set of eyes watching what they do ;)

1
  • You mean that, if you are a frequent visitor and you have students that come here, you could identify said students? I very much doubt that; you don't have to identify yourself when you ask a question here. Of course, maybe your students don't know that, but are you relying on their ignorance? Commented Oct 16, 2020 at 16:43
2

If you don't tell them about Stack Overflow, they are going to find it anyway. The top link in pretty much any Google search about a C programming problem is almost guaranteed to be from this site. Also, given that your course is not specifically about programming in C, why not make the C part as easy as possible?

I say go further than just directing them to Stack Overflow. I think you should explain how to use Stack Overflow and how to research a programming question generally. You should emphasize that their question almost certainly has an answer already here, which they should look for by searching the site. Explain the tag system and how to do searches.

You should explain what to do if their research comes up empty and they need to ask a question i.e. review the How to ask a question help with them, so that when they do ask questions they don't get downvoted to oblivion or closed in a microsecond.

Out here in the world of professional programming, we use Stack Overflow all the time. It's like masturbation: 90% of professional programmers do it, the other 10% are liars. So teach them to do it properly and they'll get more satisfaction.

0

It seems most likely that the answers to their questions will already be in the Stack Overflow (SO) database, or else they are not a good fit for SO.

In general, I would not recommend SO to people trying to learn anyway. One of the main reasons is that Stack Overflow seems to be by rule a place to find facts, not help in understanding concepts. It also doesn't allow for any real interaction or discussion.

In general, Stack Overflow is only helpful for finding concrete, and obscure facts and details. In most cases, you should learn this stuff from a book or any other legitimate source. Sometimes if you have a hard time determining something you are unsure about, you can ask on SO, and maybe someone has that fact memorized.

3
  • 1
    Stack Overflow is a tool none the less, and a very powerful one at that. I agree that it shouldn't be their only source of learning, but you can't simply say Stack Overflow should be a last resort.
    – Luke Brown
    Commented Jun 20, 2016 at 9:48
  • @LukeXF Yes he can say that and he's correct with that. Stack Overflow must (or at least should) be the last resort.
    – Tom
    Commented Nov 23, 2017 at 15:37
  • I agree that Stack Overflow (SO) is hardly a starting point for learning. When you get stuck, you search the internet. If it's a programming issue, then it's just a matter of time before you end up at SO. For such problems, SO also becomes a learning tool. Commented Oct 6, 2022 at 10:53

You must log in to answer this question.