This question already has an answer here:

This is a discussion about the rules. Actual rules can be found in https://codegolf.stackexchange.com/tags/code-trolling/info

The first ever question with code-trolling tag (I need a program where the user inputs an array of doubles and the program outputs the array sorted) has been a success and it seems reasonable to assume we will see more of these. It might be a bit early, but I hope to open a discussion on what the rules should be. Original rules:

Suppose that some lazy guy in StackOverflow or elsewhere, asks a homework give-me-dah-codez question. Your task is to give a code that works, but is still useless, severely frustrating the OP.

This could be achieved by:

  • Deliberately misinterpreting the question and giving a code that clearly answers what the OP asked, but does something different than what he intended.
  • Giving a code that runs in superexponential time or worse, when the trivial solution would be linear or better.
  • Introducing something extremely unacceptable or unreasonable in the code that cannot be removed without throwing everything away, rendering the answer utter useless for the OP.
  • Writing a code that is a direct and plain cheat on the question. Being a creative troll.
  • Being evil.

In your answer, you should briefly explain what you are doing to troll the OP.

Further, we have one restriction: The chosen language should not be the sole reason to troll the lazy OP. Otherwise, you could just plainly encode the correct solution using brainfuck, golfscript or some language that is clearly a crazy, unexpected or unusual choice for the problem, but this would ruin the intention of this as everybody would do that. The intention is to write the homework in a language that the lazy OP might think acceptable, but still frustrate him.

To start the discussion I propose the following change:

  • Not being evil. I understand evil as in rm -rf /.
  • A nice way to limit the print "the sorted array" answers.

marked as duplicate by mbomb007, 0 ', Sriotchilism O'Zaic, Mego, NonlinearFruit Mar 3 '17 at 19:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ If the question was like unix.stackexchange.com/questions/32463/… would a troll answer like sudo rm -rf be evil? \$\endgroup\$ – emory Dec 27 '13 at 20:37
  • 1
    \$\begingroup\$ By "being evil" i was not meant to doing something destructively (but could be that too). Instead, I was purposelly vague to incentive people in being creative. You may be evil by just plain lying, by looping infinitelly, by making the OP (and hopefully his teacher's too) to lose a lot of time in a useless answer that will give a plain F as the score. And so on. \$\endgroup\$ – Victor Stafusa Dec 27 '13 at 20:44
  • 1
    \$\begingroup\$ @Victor I thought as much, but I would like this to be made clear in the rules once they get written. I'd hate to see someone (who has lacking English skills. "What is troll?") find an answer in stackexchange and lose all his data because of it. \$\endgroup\$ – shiona Dec 27 '13 at 20:52
  • \$\begingroup\$ @shiona. Ok, but we could just add a restriction to make it not destructive. Like "The program must not be destructive, but it might be amusing, annoying or deceptive". \$\endgroup\$ – Victor Stafusa Dec 27 '13 at 21:12
  • \$\begingroup\$ @Victor I never tried to forbid any of those. I guess we should ditch the word "evil" in the rules since it can be understood in different ways. I take it as destructive while you consider it something I would call mischievous. Btw I thought that since this is meta you guys could make actual answers :D This comment thread is becoming rather long. \$\endgroup\$ – shiona Dec 27 '13 at 21:44
  • \$\begingroup\$ As an outsider on this site but an active SE member, I think the [code-trolling] questions should be well-written and clearly labelled. For example, the question How do I longest palindrome just looks like a really poor-quality question. I think [code-trolling] questions should stick to the model of the first/example question. \$\endgroup\$ – Reid Dec 28 '13 at 11:26
  • 2
    \$\begingroup\$ @Reid I agree. Maybe each [code-trolling] question should have a header in the lines of "This is a [code-trolling] question. Please do not take the question and/or answers seriously. More information: [[rules link]]". It might feel a bit out of place in the post but might be for the better in the end. \$\endgroup\$ – shiona Dec 28 '13 at 12:10
  • 1
    \$\begingroup\$ I edited the tag description to address the issues. Further, I edited the questions to add the disclaimer in the form that @shiona suggested (some are still pending acceptance though). \$\endgroup\$ – Victor Stafusa Dec 28 '13 at 17:41
  • 1
    \$\begingroup\$ FSM, how I loathe these subjective "contests". \$\endgroup\$ – dmckee Dec 28 '13 at 20:53
  • \$\begingroup\$ we will so more should be we will see more but I can't edit on meta. \$\endgroup\$ – ike Dec 29 '13 at 1:47
  • \$\begingroup\$ Corrected, thanks ike. No idea where that had come from. \$\endgroup\$ – shiona Dec 29 '13 at 3:58
  • \$\begingroup\$ It's a shame to waste the resources that could be spent on serious questions instead. Ok, keep the code-trolling but the answers( and questions) should gain no reputation from them. \$\endgroup\$ – this Dec 29 '13 at 4:08
  • 4
    \$\begingroup\$ I've never thought of code-golf as "serious" questions. It's just puzzles for challenging the users, letting them try something they probably wouldn't do anywhere else to their code. Code-trolling has challenged me to refresh my memory of binary representation of doubles and learn template metaprogramming. Also the initial hype will cool down, in a week people will be answering also other questions. \$\endgroup\$ – shiona Dec 29 '13 at 9:40
  • 1
    \$\begingroup\$ @self. you are on code-golf, nothing here is serious or (directly) useful by design. \$\endgroup\$ – o0'. Dec 29 '13 at 13:12
  • Not being evil. I understand evil as in rm -rf /.

As I already started to say in comments and are instead making an answer from that, I think we could just add a restriction to make it not destructive.

I like the "Being evil" because it is a really strong suggestion and the vagueness was intended to incentive answerers in being creative. This basically means that you should by no means being helpful. You may be evil by just plain lying, by looping infinitely, by making the OP (and hopefully his teacher too) to lose a lot of time in a useless answer that will give a plain F as the score. And so on.

We could add something like:

The program is in general expected to be amusing, annoying, silly, deceptive and/or mischievous, but is must not be destructive.

  • A nice way to limit the print "the sorted array" answers.

I agree about the answers that just plainly do this. But there are some answers that do this in a creative way. I think that adding something like

Please do better than just printing a quote from the lazy OP question. If the lazy OP asks "I need a program to output FOO", a program that is simply output FOO is not very creative. Do better than that.

Further, I would add this:

Answers that provides no code are not elligible for being accepted. They might be fun and could get some upvotes, but won't be accepted.

Finally, initially I was in fear that the question would be ignored, could get a lot of downvotes and be closed, so I am very happy that what happened was quite the opposite and i was very wrong about that presumption.

It is much more successful than I could though. In just a few hours I got 11 badges, 7 hats, including one secret hat, hitted the daily reputation cap limit in a flash, spent all my daily upvotes in answers to my own question, got more than 50 answers, more than 70 upvotes and almost 20 stars in the question, and almost 50 upvotes in my own answer. And this is still counting. I never saw a question collecting so many answers and upvotes so quickly, and I am proud to say that I asked it! People, really thanks to everyone that is participating to this.

The only thing left, is that I really want that someone beats my own answer, I would be very happy to accept an answer that could do this.

  • 1
    \$\begingroup\$ I agree, these sound like good changes. I'm both happy for your success and happy that we got new life into the board. \$\endgroup\$ – shiona Dec 27 '13 at 23:11

I agree with the comments that "being evil" is too vague. A "bad" evil is harming the computer, while a "good" evil is having code that sometimes doesn't work. We should clarify that "being evil" should be in a similar spirit to the Underhanded C competitions.

I also feel that the print "the sorted array"-type answers do get old after a while. It's kinda funny at first, but repeating the joke doesn't take much effort. It might be hard to limit those answers, so I think it may be best to leave it up to the voters.

I might add something else to the list of ways to troll, which is to write something which no person would dare hand in to a teacher, like obfuscated code. The code works flawlessly, but how it works is so obscure that there's no way to understand it without being the author. For an example, look at my submission to the sorting question. I understand how it works, but explaining it is impossible.

We could probably extend that to mean solving the problem in a way that the (non-existent) "asker" will almost surely not understand, like some super-obscure feature of the language. This would not be as obfuscated code as it would be obscure code.

After all, trolling is a art.

  • \$\begingroup\$ I agree with you in the obfuscated code. It might at the moment fall under the "unacceptable" part. This could possibly do with clarification. Love the "trolling is a art". Maybe we should add that as the final rule. \$\endgroup\$ – shiona Dec 27 '13 at 23:09

In this post, I'm writing as a user, not a moderator.

This is awesome. :-) It reminds me of how I approach a lot of the homework problems people post in the [scheme] tag (since a number of CS courses use Scheme).

Basically, professional Schemers frequently use higher-order functions (rather than manual recursion), SRFIs, third-party libraries, "insider-Scheme", etc., which students are generally disallowed from using in homework answers. So I simply answer with the code I'd write, as a seasoned Schemer. Easy! :-P

  • 1
    \$\begingroup\$ It's the "Let's play BOFH" for SO'ler. \$\endgroup\$ – Johannes Kuhn Dec 29 '13 at 2:14

I'd suggest to avoid "trolling with complexity": you can add random layers of complexity to any kind of program, you can add as many as you want, and it is farily easy and totally uninteresting to do so.

For me, the real spirit of code trolling, is to be able to write a simple, elegant program, which does what the OP asked, but is still useless.

Look at the adding function question, for instance. Most of the answers are entangled blurbs of stuff, anyone will notice at first sight he's being trolled and they make no sense.

However, two answers shine brightly among all this dirt: the sleepadd, and the recursive: they are both useless to the OP, but they are simple and elegant, so that at first sight you might think they make sense, they might be the correct answer. If you read them, you understand them. That's the point. You read, you understand, but it's still useless. It works, you know why it works, but it's still wrong.

As opposite to "you try read them, you have no clue what's happening". I hope the difference is quite clear.

To me, adding complexity, is exactly like just using languages like brainfuck or golfscript, really no difference at all: you still do not understand, it still works. Same thing. Boring.

  • 1
    \$\begingroup\$ It's a hard to draw line. A code that is easy to understand for one is not that for another. One thing people should remember is that we do have a tag for [code-bowling], and it should be kept separate. Other than that I believe that the popularity contest is a fair enough system for these kind of questions, we're not running for president here. (sleepadd was my favourite too. I can't say that for the recursive though, since I made my own with "real" peano numbers.) \$\endgroup\$ – shiona Jan 4 '14 at 13:32
  • 1
    \$\begingroup\$ Agree. I feel that an effective answer to a code-trolling puzzle is something that you should be able to hand out to a student, and have them write an essay about what is wrong with it, but not necessarily be able to figure it out right away. In a sense, it's about producing a puzzle instead of solving one. That was the spirit I used here and the people who don't like code trolling as a concept will not like that either. But I think getting a beginning C programmer to fully articulate "what's wrong with this picture" could actually be useful. \$\endgroup\$ – Dr. Rebmu Jan 4 '14 at 19:56

(I'm adding this as a separate answer because it covers a different aspect.)

I think it is interesting how some questions on this site "go viral." Once they make it onto the hot feed, they attract a lot of attention from people who didn't yet know this site existed. There are 30 questions on the front page of the hot list. Of them, 9 are from beta sites, and we have 2 of those 9.

I hope that we are getting closer to exiting beta, although we still have a ways to go. I honestly don't know what the requirements are, however. Patents.SE is fully published, but only has 881 questions (we have 1,287). CodeReview.SE has 10,945 questions and is still in beta. Bicycles.SE is fully published and has 3,953 questions.

  • 1
    \$\begingroup\$ Ask Patents is special.. It was never in the beta. \$\endgroup\$ – Johannes Kuhn Dec 28 '13 at 0:40
  • \$\begingroup\$ Oh, that's strange, haven't heard about that. \$\endgroup\$ – PhiNotPi Dec 28 '13 at 0:44
  • \$\begingroup\$ I changed the example to Bicycles.SE. \$\endgroup\$ – PhiNotPi Dec 28 '13 at 0:47

A nice way to limit the print "the sorted array" answers.

One way to do this is to require the trolling to actually happen algorithmically, within the code itself. If the "misinterpretation" of the requirements is just a matter of wordplay, then the code itself is meaningless.

  • \$\begingroup\$ But sometimes a wordplay may be interesting. I like victor's idea of allowing non-program answers, but disqualifying them from winning. \$\endgroup\$ – shiona Dec 28 '13 at 19:03
  • 2
    \$\begingroup\$ I've found that in the majority of cases the wordplay is something trivial and uninteresting. And indeed those answers would simply be disqualified from winning, not disallowed altogether. \$\endgroup\$ – Joe Z. Dec 28 '13 at 19:18
  • \$\begingroup\$ Take a peek at codegolf.stackexchange.com/tags/code-trolling/info that Victor wrote. I think the last bullet currently contains this point. \$\endgroup\$ – shiona Dec 28 '13 at 19:31
  • \$\begingroup\$ An answer that prints "the sorted array" still has code, though. The third point does cover it, but allows for some subjectivity. \$\endgroup\$ – Joe Z. Dec 28 '13 at 19:31
  • \$\begingroup\$ That is a good point. @Victor any idea on this? \$\endgroup\$ – shiona Dec 28 '13 at 19:36
  • \$\begingroup\$ @shiona Sorry, I missed your last comment (my notification box was flooded at that time). Anyway, what do you think that is still uncovered? \$\endgroup\$ – Victor Stafusa Jan 4 '14 at 6:27
  • \$\begingroup\$ @Victor Like Joe Z. said, the rules now require an answer to include code to be eligible to win. print "Array sorted" can be argued to contain code. I'm not sure if that's worth the change though, I think people will understand it as it is. \$\endgroup\$ – shiona Jan 4 '14 at 10:06
  • \$\begingroup\$ @shiona, I reread the rules and do not see how this could not be covered in the "Please be creative and original" item. So, I do not see any problem here. \$\endgroup\$ – Victor Stafusa Jan 4 '14 at 10:46
  • \$\begingroup\$ @Victor I agree. \$\endgroup\$ – shiona Jan 4 '14 at 10:48

Ok, but how are we going to get all the give-me-the-codez-for-my-homework questions migrated here? ;-)

Migration functionality on stackoverflow is unfortunately limited to the top-5 sites or so. Other than that, only moderators apparently can migrate questions.

  • 1
    \$\begingroup\$ +1 for being inspired by this with a fleeting thought to do the reverse... and post my solution to "separating a string" under a new user account to C tag on SO, adapted into a what's-wrong-with-my-code question. (What happens when the trolling answers get so instructive that they make people better programmers when re-issued as questions? mission ... accomplished) \$\endgroup\$ – Dr. Rebmu Dec 29 '13 at 21:17

(I am a newcomer here, i find it thanks to the first trolling question so I might not have very strong background here)

Anyway, the first question was funny because it was very original. But now it seems that with all those mindless coding changes they are not funny anymore.

The problem with them is that they are supposed to be joke but at the same time the are so explicitly telling you that they are only jokes. That it is very artificial and not funny.

I mean the purpose of Trolling is to make fun of somebody who has no idea that it is only trolling. This is not a trolling, you would have to be really trolling the person who asks and here everybody knows that both the question and the answer are not real. It does not make sense.

The purpose of the Stack Exchange is to help them find the answer to their questions. As those questions are not really questions and the answers are not really helpful.

As it is not trolling nor funny and most importantly not helpful I would go for banning the trolling questions.

(I would like to say that i liked the idea of the first question.)

  • 1
    \$\begingroup\$ 1) I don't think saying that a thing is a joke takes away from it being funny. I think the problem is more in the presentation of the posts. 2) Yes, this is not real trolling, I think SE won't allow that. 3) If you look at other questions in codegolf you'll see that here people don't really try to find help. I think of the questions are more like crossword puzzles or sudokus, just more interesting. \$\endgroup\$ – shiona Dec 30 '13 at 21:26
  • \$\begingroup\$ "The purpose of the Stack Exchange is to help them find the answer to their questions.", this is true for most sites, but not for this one. No questions at this site are intended to be helpful or useful, and code-trolling takes that to extremes. Or do you really think that programming in befunge, brainfuck or golfscript might be useful or helpful? Besides that, even in code-trolling questions, I learned some new ways of thinking outside of the box and learnt some interesting coding-tricks, so it was helpful afterall, just not so directly. \$\endgroup\$ – Victor Stafusa Jan 4 '14 at 6:32

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