154

Use xquery to read attributes and values starts:

I've searched and searched but none of the solutions are specific enough to me

So we've got someone here who is trying to do programming the way you do cooking: you search online for a recipe for the exact dish that you want to cook, and if you can't find one, you ask on Stack Overflow. You never go to the trouble of learning the basic ingredients of the programming language you are using, or how to create your own recipes/programs to solve your own problems.

And we answer the questions: we encourage such behaviour. Are we training a generation of programmers who can't actually program, but can only search the web for programs that someone else has already written?

33
  • 47
    It is largely the point of this web site and the way it ended up having 30 million posts. Providing enough search hits that are specific enough. Learning people to think for themselves is a teacher's job, a profession that has very little to do with programming. Nobody is going to stop you from teaching at SO, if that's the way you prefer it. But do consider to add sql* to the ignored tags in your profile, [sql] questions are don't-make-me-think questions. People that answer them don't seem to mind and earn lots of rep from them. Commented Nov 26, 2016 at 9:42
  • 8
    Personally, I believe it is a worthy goal, though whether to do that seems to be an individual moral decision to be taken by each answerer, rather than something that might be shaped into site policy. In any case, an utilitarian justification might be that challenging askers to think for themselves and to express the effort in their questions is aligned with the goal of encouraging better questions.
    – duplode
    Commented Nov 26, 2016 at 9:47
  • 70
    Are we training a generation of programmers who can't actually program maybe. But if that means that the current scarcity of actual programmers, with its giant salaries and employers having to be nice and flexible, is ensured to continue far into the future, what's there not to like? :D
    – Pekka
    Commented Nov 26, 2016 at 10:24
  • 17
    Seriously though - this "I'll just copy it from the Internet" mindset is not limited to IT in any way. I did a 4-year University program a couple years back and was shocked.
    – Pekka
    Commented Nov 26, 2016 at 10:38
  • 12
    That "generation [...] who can't actually program" is already amongst us. Large firms outsource their programming to low cost countries, where teams of drones apply stock solutions with required overredundant error checking, which in turn leads to bloated, slow, featureless software on our end.
    – Jongware
    Commented Nov 26, 2016 at 11:57
  • 27
    What's not to like, @pekka, is that companies still hire the programmers who can't program and release things that suck, yet are nevertheless forced upon the rest of us. No, the mindset is not at all limited to IT; it was a constant source of consternation to me how many high-school and college students were content to plagiarize from the Internet. But it made quite an impact when an instructor called them out on it, and it made just as much if not more of an impact when someone actually took the time to teach them how to think. It's not all laziness; some have honestly never been shown how!
    – Cody Gray Mod
    Commented Nov 26, 2016 at 13:23
  • 3
  • 3
    My unpopular opinion is no, we shouldn't. I'm sure every successful developper out there have had struggles, and did everything to get out of it. Teaching unmotivated people who will not ever even realize they've been thaught doesn't feel like improving the business. Or maybe they would then vote for us but that is an unrelated story. Commented Nov 26, 2016 at 14:56
  • 46
    "you search online for a recipe for the exact dish that you want to cook, and if you can't find one, you ask on Stack Overflow" You probably meant to say "ask on Seasoned Advice", but there have been cases of people asking cooking questions on Stack Overflow, and that makes that sentence all the more amusing.
    – BoltClock Mod
    Commented Nov 26, 2016 at 17:17
  • 4
    I found your post interesting because I have the same reaction to many R questions (where I have fairly high rep despite closing many duplicates). However, I did not see the example as proving your point. I have tried finding online materials to learn XML in the past and failed. So I think your answer to that question (that would have gotten my enthusiastic upvote) would have been to cite a reference, point to a particular section and show how it illustrated how to do operations similar to "X".
    – IRTFM
    Commented Nov 26, 2016 at 20:29
  • 4
    We don't even have to look at the programming world at large to see a problem with these "give codes" questions: the sort of "programmer" who wants to be given code wants to be given code rather than look for it themselves. We end up with a coding cookbook full of disposable recipes that no one will ever read again. Commented Nov 26, 2016 at 22:39
  • 13
    @BoltClock there was one yesterday (10k only): java - What coffee bean variety is best for light roast
    – user247702
    Commented Nov 27, 2016 at 0:22
  • 11
    As someone who, just today, asked a very silly (in retrospect) question, I appreciate the people who take the time to explain the why and not just the how. I think there are 2 basic types of question askers: 1) People who want to learn why it works and 2) people who just want it to work. I fall into the first category. Simply knowing the answer is not enough - I need to know why that's the answer so I can use the knowledge in the future. My opinion/advice would be to spend extra time on answers to people seeking the why and less to people seeking the how.
    – jdfinch3
    Commented Nov 27, 2016 at 6:07
  • 9
    @gnat no, this question is about the mentality of such askers, the other one merely deals with the phrasing of such questions.
    – CodeCaster
    Commented Nov 28, 2016 at 14:00
  • 5
    This discussion is not a duplicate, it is as 100+ votes, please do not close it as such, it will just be reopened.
    – Travis J
    Commented Nov 28, 2016 at 23:02

14 Answers 14

128

Some people, less experienced ones mainly, believe that the internet should contain or give them the exact answer to "Why does the price of the third item of my shopping cart on the German version of our webshop have a rounding error?", while their main problem is that they're using floating point math for financial calculations. They will refuse to accept a canonical "Why not use floats for money" duplicate, because they don't understand that that's the problem they're actually having.

They want to get an answer specifically tailored to their scenario, which causes fragmentation of knowledge, spreading of incorrect information and generally, a maintenance nightmare.

I on the other hand love to explain what the OP's misconception or lack of knowledge is, and explain to them how they can improve their program so that the error that apparently spawned the question disappears. In that sense I consider myself a "teacher": I'm not here to dump compiling code, I'm here to explain ideas in such a way that less experienced members and Googlers can learn from it. But I don't like to do that when an exhaustive, more broadly applicable Q&A already exists on the subject: I don't like duplication.

On the contrary, I downvote answers that only contain code, also if the only explanation given is "Try This". I generally do so in the company of a comment, explaining what is lacking from said answer.

Sometimes this works, usually it doesn't. There are some 5K+ rep users who still refuse to explain their code, and that's apparently fine. Everyone can use this site as they want.

So if you want to be a teacher: do as you please.

13
  • 2
    "So if you want to be a teacher: do as you please." is not an answer, it would only breed (further) discord. The OP wonders which way of action is in line with core SO's values. Commented Nov 26, 2016 at 13:43
  • 9
    @ivan there is no official policy on what an answer must contain. There is How to Answer, but that's about it. Is that the kind of answer you'd accept? The site wants to contain "the answer to every programming question", and given "too localized" isn't a close reason anymore, anyone can, like I said, answer any question they want in any way they want.
    – CodeCaster
    Commented Nov 26, 2016 at 13:46
  • 2
    The "too localized" was removed because it was being abused. Some more specific reasons were suggested since that could resist abuse better, e.g. meta.stackoverflow.com/questions/274630/… . Commented Nov 26, 2016 at 14:15
  • 50
    Even better is the dreaded "that's not a duplicate because my variable names are different." Commented Nov 26, 2016 at 20:52
  • 1
    @TigerhawkT3 I'm pretty sure I made that remark somewhere here on meta. Edit: meta.stackoverflow.com/a/333000/266143
    – CodeCaster
    Commented Nov 26, 2016 at 22:53
  • 6
    "Try this" answers are the very antithesis of this site, and others in its family. Every time I answer something I try my best to describe what is happening, so any future reader will be able to take that example and apply it to their problem. It's what I think we should strive to do on every answer, to avoid duplicate entries as well as misinformation.
    – Kyle
    Commented Nov 28, 2016 at 13:28
  • 13
    The problem is that the - almost - general culture of this site is: most of people ask here to get rid of their problems, and most of people answers to get points. A few askers want to learn and a few answerers want to teach. Sometimes you don't want to work 15~30 minutes to build a good answer with explanations/references knowing that someone will post a try this answer in 5 minutes and it will probably be very upvoted and accepted, not like your answer. Not SO's fault, it is just the way it goes. Commented Nov 28, 2016 at 13:30
  • I sometimes give answers the only contain code and have a link to a CodePen example. It's always clear to the OP what the code means and how it answers their question. I would hate for those questions to be down voted.
    – camden_kid
    Commented Nov 29, 2016 at 9:07
  • 5
    @camden_kid "It's always clear to the OP what the code means" - that's a very optimistic approach. The fact that they were able to copy-paste something into their project and could move on to the next problem so they green-ticked your answer does not mean they understand it. Also, you'd want to explain your code, so that later visitors can read the approach taken without having to read the code, so they can evaluate whether the approach applies to their problem.
    – CodeCaster
    Commented Nov 29, 2016 at 9:23
  • 1
    @CodeCaster Fair enough. I just assume they've looked at it and understood, as I mainly give examples that they can't just copy/paste. Still, I wouldn't want my answer down voted :-)
    – camden_kid
    Commented Nov 29, 2016 at 9:34
  • 2
    @ivan_pozdeez "The OP wonders which way of action is in line with core SO's values". No, I don't care a damn about SO's core values. I'm going to do what I think is right, I'm just interested in knowing whether other people think the same way as me. Commented Dec 4, 2016 at 9:46
  • 1
    @DontVoteMeDown "most of people answers to get points". Perhaps some people are driven by getting brownie points, personally I got over that at primary school. I get the impression that the people who consistently provide the most high-quality answers have sufficient self-esteem that they don't need the pat-on-the-back provided by the points system. Commented Dec 4, 2016 at 9:50
  • @DontVoteMeDown "Sometimes you don't want to work 15~30 minutes to build a good answer with explanations/references knowing that someone will post a try this answer in 5 minutes and it will probably be very upvoted and accepted, not like your answer." - this assumes that "a good answer with explanations/references" is a priori better than "try this". I showed in my answer that's not necessarily the case. Commented Jan 23, 2017 at 4:18
49

Intrinsic to being a novice is not knowing what you don't know. It's hard to distinguish between a need for matters of fact from a need for a deeper conceptual understanding when asking a question. A certain naive optimism drives the novice to always hope for a simple solution.

I believe we have an obligation to help askers appreciate deeper concepts that are relevant to their question. That obligation has to be balanced against time available, however, lest we raise the bar so high that all attempts to clear it seem impractical.

When your path crosses that of an asker at a point where you have time to answer, set aside the worries of enabling and write an answer that first addresses the immediate need and then touches upon as many of the deeper conceptual points as is practical. I believe that's the best we can do.

5
  • 3
    "That obligation has to be balanced against time available, however, lest we raise the bar so high that all attempts to clear it seem impractical" it's impractical already to hope people teach them... so, no, rising the bar isn't impractical, it's out of necessity.
    – Braiam
    Commented Nov 26, 2016 at 20:23
  • 7
    I meant that we as answerers should help as much as we can in the time we have available, but if we hold ourselves to too high of an obligation to teach, then it will become impractical to try at all.
    – kjhughes
    Commented Nov 26, 2016 at 20:34
  • 1
    how sensible... Commented Nov 28, 2016 at 23:28
  • I find it flawed reasoning to measure the information one should give only by "time available". As it turns out, only a very limited amount of background information is actually useful, see my answer for explanation why and how much. Giving more than that would only lead to it being ignored and/or seeing you repeating yourself and asking yourself why, which would only lead to disappointment and thinking everyone is an ungrateful swine. Commented Dec 8, 2016 at 20:56
  • 2
    @ivan_pozdeev: Find flaws where you may, but the best answerers don't fill time available by blindly providing background material. Rather, they assess and close the gap between the asker's current knowledge and the knowledge required to understand the answer. Being able to meet both the asker's and expected future readers' needs in a timely manner is an art form, but not one that transcends the limits of available time.
    – kjhughes
    Commented Dec 9, 2016 at 1:46
10

It's hard to know exactly what your question is. Your title reads "Should we be teaching people to think for themselves?", but the only question presented in your post is "Are we training a generation of programmers who can't actually program, but can only search the web for programs that someone else has already written?". These are two very different questions.

Should we be teaching people to think for themselves?

While an admirable goal, I feel this is outside the primary scope of the Stack Exchange model, including Stack Overflow.

There is an expectation that people will do basic research before asking a question, and make some reasonable attempt to solve their question themselves. But as you're aware, this expectation is very often not met. And opinions vary widely on how strict we should be in dealing with people who don't meet this expectation.

There's a constant tension between varying and competing goals:

  • To maintain a high level of quality.
    • This is further complicated by the question of what "quality" means. To some, anything that could help someone else is "quality". To others, this means the site is streamlined to ensure search results aren't cluttered with less-than-useful content.
  • To help other people.
    • Again, there is no consensus on what "to help" means. To some, anything that gets a person farther along than they already are is "help". To others, just "fixing" someone's problem isn't necessarily "helping" them; an answer is only a good one, i.e. "helps", if it provides the person with new information that will improve their odds of success in the future.
  • To gain reputation points.
    • This perturbs everything surrounding the previous two points. Fact is, while altruism is a useful trait for Stack Exchange sites, many users if not most are driven by the pursuit of reputation points, at as little cost in effort to themselves as possible. As such, they are much more likely to provide hand-holding and quick "answers" to questions when it's easy to do so, and less likely to take the time to provide the "broader picture" answers that would provide a deeper understanding and better "help" for the person asking the question.

In other words, unfortunately the naturally-human tendency to seek the most reward for the least effort undermines the quality of the site at both ends. Not only does it provide us with a plethora of lazily-asked questions, it also provides us with a plethora of lazily-answered questions and a distinct lack of accurate voting.

Are we training a generation of programmers who can't actually program, but can only search the web for programs that someone else has already written?

I don't think so.

I mean, to some extent, I suppose the answer to that has to be "yes". That is, by rewarding lazy or incompetent behavior, we encourage this. However, it's been my experience that the people who approach their job in this way cannot really succeed on the backs of others. Even Stack Overflow simply does not have the bandwidth to literally write an entire non-trivial program for someone else.

Furthermore, it's also been my experience that people who have one part of their program written for them, without their learning or understanding how that part of the program works, eventually fail of their own accord. These people can cobble together a shaky implementation that works some of the time, and for employers looking the cheapest solution, this is often good enough. But they are never going to make it as a "real programmer".

And these people always existed. I don't think Stack Overflow is creating them. It's just providing a more efficient mechanism for matching up the people who can't or won't do their own work with the people who are willing to do those people's work for them.

More to the point, it is a monumental task to really educate a person. To teach them to think for themselves, and to give them the tools they need in order to succeed on their own without relying all the time on others. I don't think Stack Overflow can or should be expected to provide this education to others. It's admirable if and when people try, but these people are generally overly optimistic. I'm impressed at their patience and willingness to try, but most often they fail.

Stack Overflow just isn't the right environment for that kind of teaching and learning to work.

While a fine goal to strive for, I don't think it's the primary goal of Stack Overflow. The Q&A format lends itself best to questions that can be stated precisely and concisely, and to answers to address such questions directly. Every now and then, a really great answer comes along that delves more deeply into the issues the original questioner actually needs help with, and that's to be encouraged. But I think it's unrealistic to expect that each or even most answers follow that model.

And as disappointing as it is to me, I think it's probably also unrealistic to expect the whole of the Stack Overflow community to stop answering questions that show essentially no effort. There will always be varying opinions as to the real purpose of the site and what types of questions should be answered, and how they should be answered. One of the beautiful things about the community-based, voting-based approach is that whatever each of us individually thinks about the issue, we can be reasonably assured that whatever level of quality the site reaches, it strikes the balance between thoughtful questioning and laziness that the community as a whole feels is most appropriate.

After all, in theory every single question on the site could have been answered by the person asking it, using only their own effort. So it comes down to a subjective and somewhat arbitrary opinion on each user's part as to what constitutes "sufficient effort". In the long-term, the voting on the site should and probably does reflect the community's average opinion on that question.

8
  • 9
    I think the Q&A format works fine for "deep" answers. It's perfectly possible to take a deep look at complex stuff in under 30k chars. A question like Can num++ be atomic for 'int num'? gives you a specific perspective for taking a slice of several topics while explaining atomicity. I've almost never posted an answer that just answers the specific question without explaining the background, because I mostly hang around in the assembly-language / performance tags, where the real question is "why". Commented Nov 26, 2016 at 22:03
  • 7
    All of my highest-voted answers are ones where I explained the crap out of something. Or at least explained why my answer will run fast on current CPUs. I'd rather not spend my time answering a question if there's nothing interesting to say. (Of course, I do take a lot of time writing answers. Also, I have found useful snippets / recipes when searching to solve my own problems, so not all Q&As lacking deep explanation are useless.) Commented Nov 26, 2016 at 22:08
  • 1
    @PeterCordes: the web site supports broad answers in a technical sense. But I don't agree that such Q&A are most appropriate for the format. And more power to you if you have the time and are rewarded for detailed answers. But I have found in the c# tag that the least-interesting questions seem to get the most votes. The highest-voted question in the tag is a no-research question with a B.S. subjective answer as the highest-scoring answer. Clearly, mileage varies according to the specific tag(s) involved. Commented Nov 26, 2016 at 22:28
  • @PeterCordes: that said, taking a look at the top-scoring questions in the c++ tag, those may not be as bad as those in the C# tag, but they still look pretty lame to me, for the most part (the very first one notwithstanding). Almost as bad in x86. Commented Nov 26, 2016 at 22:38
  • 1
    There's some pretty solid stuff in the top 10 of C++, along with some fluff. The branch-prediction (sorted array) question has a great answer. In [x86], the 2nd and 3rd highest voted questions are that high because of my answers :) And the LEA question at the very top looks dumb, but has good answers. It's only obvious once you know the answer. I think SO is doing pretty well in those tags. Too bad about C#, though. IDK if that tells us that there are more copy&pasters in C# than in C++ (without telling us anything about the quality or quantity of skilled programmers), or what. Commented Nov 26, 2016 at 23:43
  • "many users if not most are driven by the pursuit of reputation points, at as little cost in effort to themselves as possible" Is there any evidence for this? I would find it surprising if highly intelligent people at the top of their profession care so deeply about proving themselves. For my part, I've always found the "brownie point" system embarrassingly childish. Commented Dec 4, 2016 at 9:55
  • @MichaelKay: "highly intelligent people at the top of their profession" constitute a relatively small proportion of the number of users on Stack Overflow, including those that post questions and answers. They may represent the bulk of the quality content, but the poor-quality content on Stack Overflow outweighs the good-quality content by a considerable margin. Commented Dec 4, 2016 at 16:17
  • -1 as based on an incorrect appeal to human nature and a sweeping generalization. Flaws in human nature are not justifications for bad things to stay forever but justifications for finding ways around them. (the 2nd one IMO doesn't need explanation) Commented Dec 8, 2016 at 20:41
7

I do, but keep an eye on what kind of information I'm giving. I:

The idea for the last one is to give just enough information to show the key points of how one approaches and solves the problem, and nothing more. Anything besides that - only as reference links about the specific concepts used in the solution.

  • That's because I learned from experience that people (including myself) refuse to RTFM not because they're lazy/unwilling to learn but because learning anything you don't really need in practice is not an effective investment of your time.

    • Especially with the now-live technological singularity state of affairs in IT where the knowledge is very likely to become obsolete the next time you need it.
  • Thus, now, rather than knowing everything from the get-go, it's become much more important to be able to quickly obtain the specific knowledge required to solve the problem at hand - and forget it as easily when you no longer need it.

  • The only things worth actually learning and memorizing are the fundamental things, the ones that get obsolete very slowly and are applicable everywhere.
    • Which includes general ways to approach unfamiliar problems, i.e. how to "obtain" that "specific knowledge".

1I know, this is not what is was designed for. I chose it because other currently available ones would be even worse at telling the OP what is wrong with the question (see the discussion why ways other than choosing a predefined reason are not an option). Interpret it as "the OP is asking to give him a personal lecture on the basics of the field".

10
  • 4
    I don't really like the "asks for an off-site tutorial" close reason when the question doesn't explicitly do that. AFAICT, the right response is to just downvote in the case you describe in the first bullet point. The closest thing to a "go away and read a tutorial" close reason is "too broad", which applies when there is so much lack of basic understanding that answering the question completely would require writing a whole tutorial (common for homework questions). "Too broad" doesn't apply when there's just one specific issue, even if it's something covered by every tutorial. Commented Nov 26, 2016 at 21:38
  • @PeterCordes maybe, but it's the only reason that mentions the key word, "tutorial". Others would only leave the poor sap (even more) confused. Leaving a comment each time is too much credit for these. There was a "lacks a minimal understanding" reason which was dissolved as vague and misunderstood. Commented Nov 27, 2016 at 10:09
  • @PeterCordes Downvotes are an option for questions that do belong at the site, which I don't think these are because, as a rule, they're non-reusable. Besides, you cannot downvote from the review UI, and opening the main UI is likewise, too much credit. Commented Nov 27, 2016 at 10:10
  • Yeah, you need to leave a comment like "go read a tutorial". Closing as "asks for an off site resource like ..." doesn't very clearly convey the message that they should go read a tutorial, either. Commented Nov 27, 2016 at 10:13
  • I don't see your point re: downvotes. Yes some questions can be on-topic but still deserve a downvote, but that doesn't mean that finding a way to justify a close-vote means you shouldn't also downvote. Downvotes trigger question-bans, and are the best way to slow down / stop people asking bad questions. If you think that questions like the one you're looking at don't even deserve to be posted, then downvote. The mouseover for downvotes says "lack of research effort" and "not useful", so it's perfect for questions from people that are so beginner that they haven't begun yet. Commented Nov 27, 2016 at 10:18
  • 1
    From review, you just middle-click the question title to open it in a new tab. IDK how that's hard. Commented Nov 27, 2016 at 10:19
  • @PeterCordes "IDK how that's hard." - Several extra seconds and UI manipulations for each one. That crap doesn't deserve that much of my time. This is the entire point behind the streamlined review interface - to make ppl spend as little time on routine (even more so, unpleasant) tasks as humanly possible. Commented Nov 27, 2016 at 10:24
  • 1
    @PeterCordes don't closed questions trigger question bans, too? Commented Nov 28, 2016 at 6:39
  • Apparently they do. Most of the questions I look at are in tags I follow. I think my time on the site is more usefully spent looking at tags where I'm an expert, vs. trying to "review" stuff about languages I have little to no experience with. I definitely don't want to spend my time reading questions that I'm unlikely to be able to answer, vs. looking at asm and x86 questions and deciding whether to up/down and/or close vote them. Commented Nov 28, 2016 at 6:51
  • 2
    @ivan_pozdeev assuming they actually get closed, sure. but a downvote on the other hand has instant feedback that doesn't age away.
    – Kevin B
    Commented Nov 28, 2016 at 18:38
4

Programmers especially, but anyone in general, should be able to think for themselves. When a person asks a specific question, give them an answer that explains the basic level of what they're missing. This way, they might be able to learn how to apply that to future issues and programs. Perhaps answers should give less code, so they can make the code, when we simply provide them with a means to said code.

3

Are we training a generation of programmers who can't actually program, but can only search the web for programs that someone else has already written?

Firstly, the implicit assumption that this question makes is that it is even possible to survive as a cut-and-paste programmer. It isn't. These people either improve (at varying rates, some admittedly slowly) or they move on to other vocations. Secondly, the idea that you can create a generation of programmers who can't actually program is an oxymoron.

The question appears to me to be more of a rant than a point of discussion, yet I can understand that. I can understand the feeling that by answering these kinds of questions we don't help people to ferret out their own answers, and thereby learn, however one also has to bear in mind that by asking questions, even arguably poor questions, these people are trying to ferret out their own answers in some fashion. They will learn something, even if they are not seeking learning to the degree we might hope they would.

The problem is that many programmers, perhaps the majority, hugely prioritize results over understanding. This is short-termism and is not a great strategy. However experience has taught them that reaching understanding is hard, frustrating and causes missed deadlines. Some people don't actually want to be programmers, they just want to get beyond whatever stage they are at. These are the reasons why they take the approach that they do.

I don't believe you will easily change the natural equilibrium there exists in the world between people who can't (or don't want to) put in their own leg-work and the people who are happy to enable that. If you want to rail against this equilibrium as unjust, that's understandable. It looks like people are getting a free ride. But if you think that even if this site were filled with people ready to invest their time writing people's code for them, that you'd be training a generation of lame quasi-"programmers", no, that wouldn't be the result. The result would be real programmers would still go learn to really program, and the site would be filled with business people taking the free solutions.

3
  • 1
    Well put. However, the question is: how will we deal with the "I don't want to understand, I just want to get my program running" people on the site?
    – CodeCaster
    Commented Nov 27, 2016 at 0:07
  • 7
    "the implicit assumption that this question makes is that it is even possible to survive as a cut-and-paste programmer. It isn't." I know cut-and-paste programmers who declare their 30 years' experience on their CV and get the job. Then somehow keep it for the next 5. It is absolutely possible to survive as a cut-and-paste programmer. Commented Nov 27, 2016 at 12:40
  • I don't call repeatedly banging my head on the keyboard "survival" Commented Nov 29, 2016 at 15:09
3

Stack Overflow made a very explicit direction choice when it removed "Lacks basic research" close reason. That choice was confirmed many, many times when SO refused to reinstate anything similar.

Some part of the community struggles to stretch other close reasons to cover the missing one, but it's not really legitimate. "Too broad" is not a reason to refuse to explain the difference between single-linked and double-linked list. Nor do we need a code sample for that.

My personal opinion is that the direction chosen back then was (and is) not correct. SO should not be a replacement for you CS professor or your friendly neighborhood hacker. But... That's the choice that the SO made as a company. I suspect the alternative was to lose traffic. Or maybe SO just wanted to be nice to everybody.

Whatever the reason, the choice to accept questions better suited to CS teachers or "work request" question is firmly made and we all have to live with it if we want to contribute to SO.

1
  • 1
    And that is why I stop answering many questions.... My spend my time on people that have not even done a Comp Sci Degree! Commented Nov 29, 2016 at 9:26
3

Should we be teaching people to think for themselves?

TL;DR: The system is set up to deal with questions and answers, not the people behind them; so, no.


The model is sort of rigged against teaching anyone to think for himself. Part of that is because discouraging vampirism would actively damage the site. We need the volume. We need the "diversity" born of specificity. Part of our strength is the ridiculous web of "unique" questions which, ultimately, point back to a common answer. This linking is helpful.... not just for SEO... but for making our knowledge approachable to the novice/hobbyist programmer.

This model certainly has its problems. How many silly, duplicate, RTFM, or regexpls questions are smoked down in O.K. Corral rep-frenzies? Help vampires abound with rampant impunity... and that's because SO needs those vamps. It needs the traffic. It needs thousands of dupes. The reward system even encourages this.

At its core, the site doesn't care about a vamp's motivation, skill-level, or the effort he's expended. SO is built around questions and answers, not the people behind them.

Should you encourage people to think for themselves? Ideally, yes. Can you, in this system, do that effectively? No. There's no real mechanism for engaging the OP other than through comments and answers. Even if there was, the rep-machine will never reward you for teaching people to ask fewer questions.

If people thought for themselves, this site wouldn't exist as it does now. A disheartening notion, to be sure... but SO wouldn't be nearly as popular (or profitable) if it catered solely to those for whom critical thinking, research, and experimentation are the necessary first steps.

6
  • 2
    There are two premises here that I disagree with. Firstly, that help vampirism is tolerated: we are trying to sit in the middle between closing bad questions and the be-nice rule. There is perhaps more we can do to discourage vamps, but of the help sites on the web, I don't think there are any others that are doing it better than Stack Exchange.
    – halfer
    Commented Nov 28, 2016 at 23:47
  • 3
    Secondly, the idea that Stack Overflow would not exist if everyone thought for themselves is false. That implies that anyone who has ever received an answer here did not think for themselves, which is not a fair conclusion. Stack Overflow will often supply answers for free thinkers to improve further on their own.
    – halfer
    Commented Nov 28, 2016 at 23:50
  • (The point about needing vamps asking thousands of do-it-for-me regex questions is an interesting one. I'd wager that traffic generated by people like that is fairly useless, since they are broadly the kind of people who will buy anything anyway).
    – halfer
    Commented Nov 28, 2016 at 23:52
  • Ah right, yes, a very different meaning! OK, would be most interested in any data trends you can identify - or indeed a solution to combating vampirism in general :-).
    – halfer
    Commented Nov 29, 2016 at 0:11
  • 2
    @halfer Help vampires run rampant on the site. As much as the site's rules technically dictate that the behavior isn't supposed to be allowed here, close worthy questions don't actually get closed the majority of the time, and people upvote questions trivially googled and/or looked up in the documentation, or that are simply a requirements dump asking for code to be written for them. These questions are answered, and very often upvoted, not downvoted and left unanswered. Clearly help vampires are tolerated by the site, even if not by the meta regulars.
    – Servy
    Commented Nov 29, 2016 at 15:42
  • 1
    @halfer The assertion here seems to be more that, "The site wouldn't be successful if it didn't get the huge traffic from all of the help vampire questions; the good questions alone, while they do exist, wouldn't generate enough traffic to result in the success the site got." As much as I hope that this is false, I'm not entirely convinced that it is.
    – Servy
    Commented Nov 29, 2016 at 15:44
1

I understand your frustration or concern, if I may characterize it that way, but your question, if indeed it is even a question, is pretty ambiguous.

Should we

Who do you mean by "we"? Our cohort of gray-hairs? Stack Overflow? The educational system? Society at large?

be teaching

Teaching takes different forms. Let's say I am teaching apprentice carpenters. I can certainly teach them principles, and/or book knowledge, and that is undoubtedly useful. But I can also teach them by making a joint while they watch. Or even by myself doing a joint on the chair the student is making. The best kind of teaching is most likely an eclectic combination of theory, guided self-study, and practice both demonstrated by the teacher and engaged in by the student.

people

SO has many audiences, with different priorities and potentials. Consider the guy who got roped into making a change to his church's PHP website. Or the beginner who doesn't know how to compare two values. And of course professional programmers new and old. It hardly seems feasible to generalize about our approach to teaching across all these constituencies.

to think for themselves?

If you think about it, "teaching someone to think for themselves" is a sort of oxymoron. To the extent true "thinking for yourself" can be taught, that probably needs to happen pretty early in life.

Anyway, "thinking for oneself" has different gradations of meaning. One might be exercising some basic logic: "If I want to solve A & B, then often I can do it by solving A, then B." "If A & B doesn't work, then I can track down the problem by checking A and then B."

Even if we all committed ourselves to teaching users to think for themselves, I don't realistically see how that could be accomplished. The prerequisite for someone learning, or being taught, to think for themselves, is that they must care, and want to learn. Actually, for those that do want to learn to think for themselves, there is a natural dynamic where they inevitably progress along that path as they absorb information of all kinds, even in the absence of any specific intent on the part of the "teacher".

My very first program was a FORTRAN II square root program I copied from a book onto an old TTY terminal hooked up to a mainframe. Starting off my career by copying-and-pasting does not seem to have done any long-term damage. Lo these many years later I still copy and paste all the time--albeit normally fragments and snippets, often ones I myself wrote in the past, which I almost always end up adapting--and I'd be surprised if you didn't too. Would-be painters hone their painting skills by copying the old masters and can become very good painters in the process of doing so. So while I empathize with your point, especially when the "read the manual for me", "write the code for me", "debug my program for me" mentality is accompanied by apathy, ignorance, greed, stupidity, and arrogance, as it so often is, personally I don't think the heart of the challenges in developing the next generation of programmers lies in worrying about cutting-and-pasting or programming via finding snippets on the web.

0

Back before I had a job as a web developer I taught myself the basics, and went on to teach myself more advanced stuff until I thought I was ready to work in the field, when I first began I was always writing my own code for EVERYTHING, I was always on stack exchange and different forums to look up the best ways to implement code, and different methods of doing things, but I would always shy away from using already written code, in a "copy and paste" sort of fashion.

That was until my boss at the time shed some wisdom on me and basically told me, why would I "re-invent the wheel" and write my own code for basic functions when there is already pre-written code out there, written, tried, and tested by people that would do the same thing, maybe even more efficiently while saving me time with not having to write my own code. Hearing all that made me alot more open to searching more on stack exchange and other forums for already tried solutions to my problems instead of writing code out myself.

It makes sense to write your own code when you are working on a very specific project or have very specific needs, but why would you go and write for example, a basic login script when there are already hundreds out there that are tested and might even be more robust than a script your could whip up alone? It doesn't make sense sometimes.

Are we training a generation of programmers who can't actually program, but can only search the web for programs that someone else has already written?

In our age it's so easy to learn just the basics of programming, and rely on the community for the rest, but also why would even a seasoned programmer go and create a basic login script, or a basic blog script when there's already hundreds of scripts out there that can do what they want while only taking minutes to install. From what I've seen, when learning to program from schools or classes, what you're really learning is the basic techniques, the do's and don'ts and how to write logical programs and implement the core functions of whatever language you are learning. Everything after that is up to the student to learn their own way.

Referencing your cooking analogy, if you go to cooking school you don't learn "ALL"the recipes, you learn the core techniques, then you start learning your specific recipes, and while a chef may have his recipes all memorized down to the teaspoon, a home cook may not memorize the ones they sparingly use, but still know how to make that recipe well if they were to see the ingredients required.

-2

I don't see the answers upvoted on this site as any sort of pushing of Cargo Cult Programming. "Do my homework" isn't really the point of this site as far as I tell, though there are some users that want very specific problems solved for them. Many (maybe most) people that come looking for help have already scoured the Internet and reference materials for the problem they seek an answer to; and even if the answer is in plain sight to many experts - they didn't understand it. So more documentation and more examples seems like a good thing to me. The only downside I can see is that out of date information or overly specific solutions can lead to someone searching, finding results, and wasting time trying to understand (or use) an answer that is not (or is no longer) valid for their specific dilemma.

-9

In an ideal world we would all be properly trained in what tasks we were asked to do. Should any of us even attempt to code a solution to something where we might not fully understand what we are doing?

The last chunk of code I got off Stack Overflow was a "Least Squares Linear Fit" function - I've absolutely no idea how it works. I managed to get it to work and even change the degree for a better fit for my data. If I had the time I would love to understand how it works, but I needed to get on with the next task which required another funky bit of code off Stack Overflow which allowed me to query control objects and find what methods were defined as this was not documented.

I may not be very skilled in all the details of how some of "my" code works, but I'm not bad at finding bits of code that allow me to get my job done. The software I've written would not be half as good without all the help I've got from websites like Stack Overflow. I don't know how people have the time to write such detailed answers to people's questions, but I'm glad they do.

-13

Implicit in

Are we training a generation of programmers who can't actually program...

is training a generation of programmers. That's a good thing.

Look at every tool that teaches programming and it removes some--usually large--aspect of coding to ease the learning curve. Looking at SO with that lens, it's just another way to teach. In fact, it occurs to me that jumping in when you don't quite understand everything is like foreign language immersion, which is generally considered a great way to learn.

It certainly doesn't forbid thinking, and even just translating the level of ambiguity in human language into code requires a lot of thought (or a whole lot more testing). It also inspires because you can find code snippets to do things you didn't know were possible.

And it also empowers those of us with CS degrees and other such training, to solve problems more quickly and better. Is my time best spent reconstructing the syntax for some primitive operation in the programming language/platform/SDK I happen to be using today? Or perf testing API a vs. b? For many reasons, companies don't always document things well, so we help each other fill in the gaps.

Bringing more people into coding empowers people, strengthens economies, and is even more powerful in the hands of an expert. It's got my vote for being pretty awesome.

4
  • 13
    Implicit in "are we selling millions of a product that doesn't work properly" is "selling millions of a product." That's a good thing. Commented Nov 27, 2016 at 3:35
  • 1
    "I need a code" - and lots of people oblige.
    – Jongware
    Commented Nov 28, 2016 at 1:08
  • Wow, I guess there's some self-selection bias for people clicking on this question. Did downvoters disagree with the points I was making to the OP's question? No. We're not talking about frappachinos, but code. Commented Nov 28, 2016 at 10:19
  • I agree with you. If I would not have read the many ways people use Python, I would write some stupid code. After a lot of reading/copying/pasting, suddenly it all makes sense and you no longer need any reference and you are ready to help someone less knowledgeable than yourself.
    – theGtknerd
    Commented Nov 28, 2016 at 19:18
-19

There is plenty of room for programmers who only look up answers. For starters, we ALL do. If you have an issue these days, there is a real good chance someone else has, especially the "error: bad pointer in the zerb module" kind.

There is a lot of work to be done in programming, and there is always room for people who cannot think that deeply, but can look things up. Heck, that is basically the job description of IT workers.

In the old days, they used to separate programmers into coders and analysts. Analysts can discover algorithms and decide on architectures. I think a much better question is: why do analysts/architects get so little respect?

1
  • 9
    there is always room for people who cannot think that deeply, but can look things up -> And the rest of the programming world can clean up after their crap code. Commented Nov 28, 2016 at 3:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .