This answer is a bad answer of which half the content is irrelevant. The question asks how to insert a string in the middle of another string (and notes that the asker wants to do this numerous times). The answer reads:

You don't need to loop it because the loop is already handled in main. So you just need to use String's substring function to reconstruct a String made of the first half of one, then the second, then the other half of the first.

How do I know the loop is already in main? Because I assigned you this homework.

The only relevant content here is:


... which is already covered better in corsiKa's answer from a year earlier, which actually shows code that does this. However, the new, duplicate answer has received lots of upvotes due to being shared on /r/ProgrammerHumor, and has been accepted by the asker, perhaps because he found it funny.

What should we do with this?

Letting it stand unedited seems wrong. Half the content is irrelevant and confusing to anyone arriving on the page sincerely seeking an answer (since it starts off by talking about some loop in main that is definitely not present anywhere in the question). In normal circumstances, it'd be right to edit such content out.

But editing it out also seems wrong, since that conflicts with the intent of the answerer. This answer was never meant to actually help people arriving at the question looking for a solution, which corsiKa had already provided; rather, its purpose is to mock the asker for cheating on their homework. If we remove the mockery of the asker, then we remove the entire point of the answer - and the thing that it gained 200 upvotes for.

That leaves me thinking that the only unproblematic approach is to delete the answer. But when I flagged for deletion...

The only actually-relevant detail in this answer, for any new reader arriving here, is the suggestion to use substring, which is already covered in more detail in corsiKa's answer. It adds no value to the page and has been upvoted heavily purely due to irrelevant content (specifically, that the answerer recognises this as a homework task they set) and due to this post being linked from /r/ProgrammerHumor. Can we just delete it?

... I got declined:

In short, you're asking for the deletion of a post just because it got more upvotes than it should have received. Seems a wrong reason to delete a post, isn't it?

So, what should we do? It still seems to me that deletion here is warranted and I don't like just leaving it alone since it's a prominent broken window and a nuisance to that question's tens of thousands of viewers (or at least the subset of them who are sincerely seeking an answer).

  • 70
    Meh, this seems like much ado about nothing. The answer would have been forgotten in the sands of time, if not for that reddit post. The views are all from reddit, and therefore it doesn't seem to cause much trouble. We can prolly just lock it and leave it, just like the parsing html answer, if you are concerned about it getting a lot of upvotes. – Bhargav Rao Jul 15 at 3:42
  • 23
    @BhargavRao Locking doesn't really achieve anything besides making it impossible to ever edit out the confusing/irrelevant content. Not sure that's a positive thing. – Mark Amery Jul 15 at 3:50
  • 77
    "we discovered that these posts... truly start to drown out everything else on the site... it's too addictive and too easy, and in the absence of any moderation, the community would do nothing but add and upvote the easy, fun stuff. This is why community moderators have real power; they need that power to intervene, educate, and refocus the community's exuberance on more substantive content..." (Jeff Atwood, The Trouble With Popularity) – gnat Jul 15 at 4:00
  • 12
    ...by the way, if there is indeed much earlier and better answer, these matters were discussed in What to do with late answers which retread the same ground as previous answers (but not as thoroughly)? – gnat Jul 15 at 4:05
  • 12
    Why is the sharing in /r/ProgrammerHumor relevant? And if it is, shouldn't we find silly posts on reddit and ridicule those posts here on Meta. Oh wait, we can't, that is not on topic here ... – rene Jul 15 at 5:46
  • 6
    @rene It wouldn't be the same anyway, we'd be making fun of joke posts while the Reddit users are willingly doing fraudulent voting in serious posts to mess with the site. – Gimby Jul 15 at 7:19
  • 71
    I believe the answer should be deleted to foster a healthy community. If a joke is all there is to get me 200 upvotes, up to 2015 reps, and a gold "Great Answer" badge, what is the point of another user putting his/her real effort providing good content in SO anymore? – Yong Quan Jul 15 at 7:48
  • 32
    I think the answer should be left as-is as a cautionary tale so that students can see that their teachers also use Stack Overflow. This will contribute towards a healthy SO community. – Andrew Morton Jul 15 at 8:06
  • 5
    @YongQuan I know of two questions that should be closed and deleted, but instead ended up being discussed on meta, with a historical lock on it. One of those is the cURL question, which an SE employee undeleted after a mod deleted it. Later, SE promoted the answer. We're past "fostering a healthy community", and more over on (failing to) repair the several quality problems that've been discussed repeatedly. The meta effect (or reddit effect in this case) will never change. Visibility => votes – Zoe Jul 15 at 8:17
  • 11
    I was wondering why a seemingly low-lying post was suddenly getting a bunch of votes. I thought maybe it was people early in summer school taking intro programming courses. Should have known it was Reddit. For the record, I fully support whatever consensus the community/moderators/staff reach. (Look at me assuming we ever reach consensus about anything, how cute.) – corsiKa Jul 15 at 10:08
  • 4
    For reference the nonsense reddit post. The answers timeline. – Lankymart Jul 15 at 10:13
  • 20
    @halfer 'It is probably delete-worthy, but the reputation of the Stack Overflow community on Reddit is very mixed, and there's not much value in kicking that hornet's nest because we can.' - We're not doing it because we can or to spite Reddit users, we're doing it because it's standard procedure. I don't see why we're trying to placate a group of people by changing how the community has worked. 'It is just one post' - That's where it starts. As for the reputation part, that is a dying meme. People take use of SO each day without problem. – Script47 Jul 15 at 11:45
  • 13
    I agree it should be deleted, and for the reasons you said. – TylerH Jul 15 at 13:31
  • 8
    @Andrew as I wrote elsewhere I use SO to help do my job and because of that I don't care if it's void of fun, all I need is it to provide solutions to my problems and this is only thing important to me. "If someone feels that the above sounds selfish, well, yes it is selfish. I am in it because it helps me keep a nice job with good pay... To me, Stack Overflow is a tool. I use this tool in my job and I just need to keep it sharp." It's simple as that – gnat Jul 15 at 15:24
  • 5
    @Andrew 'Well I've had people try editing my answers all the time, I reject like 90% of those attempts because they're being nitpicky.' - You class it has nitpicking, the community classes it as removing "noise". 'Are you a bot? There's a human, naturalistic, authentic element, and humor.' - But that's my point precisely, you're are coming to a site regarding programming Q&As looking for humor when it isn't supposed to exist here (not as a focus anyway). – Script47 Jul 15 at 15:24

As the wise gnat quoted for us in the comments:


-Jeff Atwood, The Trouble With Popularity

The answer you link to truly adds nothing to the answers already provided. Worse, it adds less than nothing. It is literally what a teacher would tell you if you asked how to do something, not the kind of help we would provide here. Here, we like to provide clear examples and clean answers. That answer would not help any future users.

That answer is unclear and not useful. The only thing it says that is somewhat useful is to use "substring", but then you have to look off-site to figure out how to use substring if you didn't already know how! That makes for a very poor answer. Add to that the final sentence, which is very unclear, and you've got the "not useful" part.

It's also posted over a year after the question, how does this jokester actually know for sure that this is one of his students, and not someone with a similar coding challenge that isn't actually his homework? Perhaps this kid didn't actually already have a loop in main, because they had a different teacher. Even if they did, it's far too late to help them now, and being a smart-alec to your future students will likely just teach them not to ask for help, and not to search for it. That won't help our future programmers at all.

Not to mention, this just makes our site look like trash. Who wants to come to the site to find the answer to their problem to instead see a smart-alec answer like that, which doesn't actually solve their problem? Not only that, but it's upvoted to hell and accepted as the top answer? That's just wrong. We're telling future viewers that we approve of that nonsense if we leave that stand.

I say delete it. If we edit it into shape, we'll just be editing it to duplicate other answers, and, as you said, invalidating the author's intent. But if we leave it, we make ourselves look worse, and the site look worse.

  • 11
    You may think that the way SO is supposed to exist is to give people code dumps to their XY problems so then can continue on without even understanding what they're doing or that it's problematic, instead of having an answer that explains the problem and the approach that should be used to solve it. But that doesn't mean everyone else agrees with that philosophy. If you think explaining how to solve the problem rather than giving come code to copy paste isn't useful, you can reflect that with your votes. That doesn't mean it merits deletion, or that others need to agree with you. – Servy Jul 15 at 14:05
  • 10
    Downvote because: 1. The answer is not useful because the question is not useful. Not really the answerer's fault. 2. I would much prefer for a teacher to remark that he assigned it as homework than not, both for the lolz and to make people aware of it. Sometimes a little humor is good. 3. Actually I think that this question answer comments etc. make the site look more like trash than several of those answers combined would. Why are we even discussing this? – Andrew Jul 15 at 14:15
  • 7
    @Servy I didn't say a code dump. I said examples, but just to be better quality. How to use the code. Otherwise, I find it to be a poor answer. Full on delete worthy by itself, no. In this case, this answer literally has nothing going for it. It's poor because of that, it's also parroting other answers that are already on the question, and it's confusing because of the last line. Gnat actually shared another great post for the parroting part. – Kendra Jul 15 at 14:20
  • 3
    "Not to mention, this just makes our site look like trash." Um... what? I think most normal human beings would find the answer humorous and if anything- would result in them having a better impression of the site.. – chevybow Jul 15 at 14:26
  • 2
    @chevybow We're dealing with everyday Stack Overflow users... I used them as the standard median, not normal humans. (As in, we've seen a lot of offense get shouted over little things before, and people get mad over snark and sass and "not getting helped", so why should this be any different? Not to mention we're here to make high quality answers to programming questions. That ain't it.) – Kendra Jul 15 at 14:29
  • 4
    @Kendra I think there's a major difference between everyday Stack Overflow users and everyday Stack Overflow Meta Users. I think you're mainly describing the latter. – chevybow Jul 15 at 14:31
  • 4
    @Kendra If you think answers describing how to solve a problem rather than answers giving people code to solve that problem are bad, you're welcome to vote accordingly, but no, that doesn't justify deleting them. – Servy Jul 15 at 14:33
  • 4
    @Servy That's exactly what I said in my comment? I find simply describing the problem makes an answer poor but not delete worthy, describing with examples makes it great. This particular answer has more problems than just being poor quality. – Kendra Jul 15 at 14:35
  • 3
    @Servy How is it not? The only thing it explicitly says that the others don't is the word "half." Is that what you mean? Because corsiKa's is sure using substring, so are the other two answers there. Come to think of it, none of them are actually using loops in their answers. What am I missing, because I genuinely want to know? – Kendra Jul 15 at 14:42
  • 6
    "Who wants to come to the site to find the answer to their problem to instead see a smart-alec answer like that, which doesn't actually solve their problem?" -- I do. Sometimes SO seems a bit devoid of humor; I'd argue humor makes a community more accessible, and the punch line here is funny (witness Reddit link). I'd wrap the response in quotes and explain. "One respondent wrote:... We don't vouch for the answer, but we thought it was funny so we left it. Students, don't post your homework." – Philip Jul 15 at 16:12
  • 5
    @chevybow Who counts as a 'normal human being'? Do I? Because I think the answer is low-quality and makes our site look bad. – TylerH Jul 15 at 20:39
  • 2
    @TylerH Considering you spend all day on meta, no. Only on meta will you find people obsessed with eliminating any ounce of regular, sometimes light-hearted human interaction and reducing it to purely "professional speak". Because removing a 7 year old answer is the difference between a garbage site and the utopian site, in the eyes of the everyday meta user at least. – chevybow Jul 15 at 20:52
  • 4
    @chevybow OK, it looks like you're just making up a narrative to fit your opinion. Have a nice day. – TylerH Jul 15 at 21:05
  • 3
    @User2012384 The answer spends part of its time repeating what another answerer has said (except in a more vague way and without examples) and the rest of its time being rude. It doesn't provide any value on top of existing content and is actively harmful due to the joke at the expense of the asker. That's... the definition of low quality. – TylerH Jul 16 at 13:43
  • 2
    @l4mpi When a teacher is rude to a student like that, we often call it admonishment, but it's still rude. Regardless, if the answerer is the teacher and what the teacher says is true, then the post can't possibly be the best possible answer across all dupes, because it would have been posted a year after OP left the teacher's class, making the response from the teacher quite useless. And yes, beyond the answer needing to be deleted, I moreso agree with others who've said delete the entire question, as it's lacking important context/demo code that already exists in other, searchable questions – TylerH Jul 16 at 14:46

Here's a better idea than deleting or editing the answer: nuke the whole question from orbit. It has little value to begin with, and the actual programming task at hand is covered to exhaustion in duplicates like this one. If the crappy question is gone, the crappy answer will be gone as well.

I have no idea why a "please do my homework" question has gathered 40 upvotes (and only 25 downvotes) but a lot of these are probably due to the reddit post as well, as are many of the 80k views. None of the answers have an approach that isn't covered by an answer to question I linked (and I didn't even look at all the other related questions), so nothing of value would be lost if the question just disappeared.

  • But then the answerer would get to keep the reputation. – JL2210 Jul 15 at 14:29
  • 48
    @JL2210 who cares about that? If you're concerned about somebody elses fake internet points, take a look at all the people who get to 2k rep by doing useless edits, or the ones with over 10k rep by answering obvious duplicates. Also, due to the daily cap we're talking about ~700 rep here, it's not like OP got instant closevote privileges from that post. – l4mpi Jul 15 at 14:32
  • 1
    I think a poster only gets to keep the reputation if the post has survived for...60? days. If it's deleted before that, the rep goes with it. – fbueckert Jul 15 at 14:34
  • 1
    In general I agree, but... it's heavily upvoted content. I'm sure Reddit has a large part to play there, but that doesn't change the fact that our one and only quality indicator says "This stuff is sublime!". Until that changes, I wouldn't feel comfortable with deleting it all. That set a bit of a bad precedent. – Gimby Jul 15 at 14:38
  • 2
    If I typed up a question that I considered even half decent and it got "nuked", I would be pissed. Locking or similar is the proper way to deal with this, so there can't be any more votes, not so that the asker and answerers get the message, "Your even being here was a mistake. We undid that for you." See also: meta.stackoverflow.com/q/366889/1599699 meta.stackoverflow.com/q/253531/1599699 – Andrew Jul 15 at 14:56
  • 1
    @Gimby I don't think your "one and only quality indicator" is worth much in the general case anymore. This comment of mine is more than 5 years old but more relevant than ever, as is this answer. – l4mpi Jul 15 at 14:59
  • 8
    @Andrew if somebody asking questions like the one under discussion here gets angry due to their questions being deleted (or closed, or downvoted - we have many people getting angry about that), I would not see that as a loss for SO. Your comment on Kendras answer fits perfectly here. Also, I doubt anybody involved in that question cares about it at all anymore, it's more than 6 years old. – l4mpi Jul 15 at 15:08
  • 1
    @l4mpi That's where you're wrong. It does little good to piss people off unnecessarily, not to mention that that's unethical if you have better alternatives. If you deter a person from using S.O. or at least using it in a way the community does not want, that's one thing. But going further may result in: effects on the person in real life or those around them (i.e. at work), bad rapport for S.O., malicious retribution, and so on. Again, the key point I'm making here is that nuking would be unnecessary. – Andrew Jul 15 at 15:14
  • 1
    @Andrew people get angry due to all kinds of reasons, controlling that is not only impossible but IMO the attempt itself is unhealthy for the community (look at all the good things that came from throwing quality under the bus to accomodate the people raging about down/closevotes being so unfriendly). And regarding your tangent about people going postal at work etc, let's please remember we are talking about a specific post that is over 6 years old, which OP probably only cared about until they got a satisfactory answer. – l4mpi Jul 15 at 15:24
  • @l4mpi Not controlling it but doing the ethical thing which will seek to reduce it. We're not talking about a specific post but about a policy for how to deal with similar posts. – Andrew Jul 15 at 15:27
  • 3
    @Andrew First off, the meta question I answered here does explicitly not talk about a general policy, but about one single specific question. The answer should be viewed in that context (and while I am of the opinion that more than 80% of all SO questions could be deleted without any value being lost, I would still advocate judging each of these posts individually). Second, I'm not interested in debating ethics with you but IMO, if somebody chooses to get angry about X, that does not make X unethical. Not even if many people get angry about X. So I reject your premise. – l4mpi Jul 15 at 15:35
  • That's not my premise but it's not necessarily ethical either, depending on what X is. – Andrew Jul 15 at 15:37
  • 4
    I don't agree with this approach. While the question is simple, I don't think that's enough reason to nuke it (or to make it close-worthy for any reason other than being a dupe). If it's a duplicate, then the right recourse is duplicate closure, not deletion of the whole question. If it's a duplicate and has a deletion-worthy answer, then we should handle those things separately, by deleting the answer and then closing the question as a duplicate - not by simply nuking everything. – Mark Amery Jul 15 at 15:50
  • @fbueckert Users keep reputation from upvotes on posts whose score is 3 or higher and have existed for at least 60 days (or is it 90?). It doesn't take into account, AFAIK, when the user gained reputation from them. So if deleted, the answerer would keep all the reputation gained (up to the rep cap) from the answer, even on the days where the Reddit Effect took place. – TylerH Jul 15 at 20:40
  • 2
    @MarkAmery main reason is that the whole post could disappear without any detriment to anybody. You assert that the ages-old answer is bad and we need to do something about it, which nobody would've noticed without reddit. And I say, all of it is bad, it's a bad question, so from a pragmatic perspective I would prefer just deleting the question instead of opening the can of worms that is deleting a genuine answer without a solid reason (you assume the answerer is not OPs teacher, but without proof - would your assesment of the answer change if I could prove it was the teacher?) – l4mpi Jul 16 at 10:25

Regardless of what we should do in this situation in principle, I believe this is a duplicate question and thus null and void. Since the question is on hold, it can't be flagged as a duplicate, but see Insert a character in a string at a certain position where the accepted answer shows exactly how to solve the problem in the question at hand (i.e. use substring).


Delete the question

The question is overly basic and a typical "How I make program do this?" question. The accepted answer is useless without the broader context of the lesson in question


What main? There's no code there. As such, this answer is a huge joke. You can sum it up as

You should do your homework the way I told you to do it and stop using Stack Overflow to solve it

Which means he's doing the same thing as this frustrated professor


While there are some serious attempts at answering the problem, they're not the main event. We could delete the answer, but the question isn't a good one and there's are better duplicates out there that describe the concepts involved with actual code.

  • 1
    I agree with everything after your heading and first paragraph. As noted elsewhere, I don't agree with the idea of deleting the question, because I think that - besides apparently being a duplicate - the question is okay. "How I make program do this?" questions, as you characterise them, are the core useful content on the site, and if this one weren't a duplicate, the other answers (besides the one purporting to be from the asker's teacher) would be helpful to anyone who came across this one on Google. – Mark Amery Jul 16 at 15:44

I say that deleting the question itself should be fine, honestly. As many others have pointed out, it is a duplicate question.

However, I personally would rather prefer just the answer to be removed. It has earned that user a false reputation on SO, and I honestly can't really extrapolate anything useful, as its wording isn't as good as some of the other answers. If deleting the question itself doesn't delete the reputation of those who have answered/commented previously, I suppose it should be fine, but I am still concerned about someone having a high reputation because they were answered a question and said "because I assigned this for homework". If anything, they should have said something like, "come into my office this week and we can discuss a solution." That shows they are willing to teach, because I honestly think some things must be "spoon fed", such as basic sorting algorithms, and traversal through arrays. Because truly, once you understand the basic concept of what you're doing, then you can start applying it, and then proceed with more advanced techniques.

You must log in to answer this question.

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