46

Today I have encountered a user who asks for help in the ongoing programming contest. His way of doing it is through posting the question from the contest, providing his naive bruteforce solution and asks for optimal solution.

Also he basically "has done some attempt" solving the question, everyone who participated in a programming contest knows that the main point is to find efficient solution (bruteforce is obvious and give you close to 0 points).

My solution was to flag to moderator (explaining that this is a contest), but is this the most efficient solution to this problem (or may be this is not even a problem here?)

Just to show an example: this user will not stop and will continue to post the same questions again and again till at some point of time someone will send him a solution. No matter how many times will you put on hold/close his hackerrank question, he will create a new one in the next hour. Check his questions (if you think that this is really high quality and decent questions), and you will see that this is either code I have found by googling, or nothing at all.

21
  • 6
    related meta.stackoverflow.com/q/252676/2982225 Commented Dec 9, 2014 at 6:45
  • 12
    Are the questions, removing the context of a contest, in themselves "worthy" of being an SO question?
    – deceze Mod
    Commented Dec 9, 2014 at 6:46
  • @deceze the concept from the question is useful in a lot of cases, but if you look at the question it is reworded in such a way, that it is hard to understand what is it asked there (thus in my opinion it is not useful, but I can point you to the example and you can decide by yourself) Commented Dec 9, 2014 at 6:51
  • To some extend I think that most such questions are pretty much garbage anyway, so it's mostly not really a problem because the question should go one way or another. Having said that, sure, I'm interested in a consensus on this topic as well, for the unlikely case that there will ever be a worthy question with this moral dilemma attached. :)
    – deceze Mod
    Commented Dec 9, 2014 at 6:54
  • @InfiniteRecursion this is actually regarding hackerank contests. Mostly it is asked by a 1 rep user, whos only idea is to get an answer (in any language, even if he has 0 clue regarding it), submit it and advance on the leaderboard. Then create another question and so on. Commented Dec 9, 2014 at 6:57
  • 1
    If asker has 0 clue about it, then we should close it. HackerRank needs cleanup Commented Dec 9, 2014 at 7:29
  • 3
    @InfiniteRecursion oh, we have a 'please close my question' tag :) Commented Dec 9, 2014 at 7:44
  • @PCT We have a 'I have no clue about my question' tag too :) Commented Dec 9, 2014 at 7:46
  • @Infinite Another one?! (I'm in the top 3 there, so... ;-P)
    – deceze Mod
    Commented Dec 9, 2014 at 9:02
  • 3
    Too much self-promotion @deceze ;-P Commented Dec 9, 2014 at 9:07
  • 17
    The fact that it is part of a competition shouldn't matter. If the user is cheating in a competition then that needs to be handled by the organizers of said competition, not SO. If the questions are off-topic, obviously VTC.
    – ivarni
    Commented Dec 9, 2014 at 9:32
  • Maybe he needs to take his brute force code to codereview for improvement rather than SO..?
    – T J
    Commented Dec 9, 2014 at 18:21
  • @ivarni +1. Agreed. But - is it cheating? Perhaps not. Maybe part of the competition is to evaluate how they leverage external resources such as SO to solve problems. Maybe not, but that's not SO's concern. Commented Dec 10, 2014 at 3:17
  • 1
    @DonBranson most probably the real reason for a competition is to find people who can manage to copy the string of text, paste it into SO, then copy the code back. When I was talking about the problem I meant really badly written questions, most of them not does not provide and use for future people (apart from people who came exactly to see the solution for this competition). If this is not SO concern, why do we bother so much with homework assignments? Commented Dec 10, 2014 at 3:23
  • @SalvadorDali If you weren't concerned with the fact that it's for a competition but rather about badly written questions then that was not really obvious from neither the title or your first paragraph.
    – ivarni
    Commented Dec 10, 2014 at 8:29

6 Answers 6

76

If you ignored the fact that these were questions from a programming competition, are they still good, on topic technical questions? If so, I have no problem with them remaining on the site. This is similar to homework questions, where the fact that something is homework is secondary to whether or not they are actually good questions.

Do not flag questions because they are part of an ongoing competition, a homework assignment, or they somehow violate someone's honor code.

It is not up to moderators to enforce the terms and conditions of another site, and we will decline these flags (as I have for these questions).

You may choose to comment and point out the source of the question, decide to refrain from answering, or choose to answer differently than you would if this wasn't a competition question. That's up to you.

5
  • 8
    I bolded for emphasis (it bears bolding). Feel free to revert. Not a day goes by where we don't get flags that say, "This is homework." Or "This is from a competition."
    – George Stocker Mod
    Commented Dec 9, 2014 at 13:23
  • 9
    I think a comment under the question is very valuable. If you know the end time of the competition, you could include it in the comment, and ask prospective respondents to post their answers only after that time. Commented Dec 9, 2014 at 23:12
  • 2
    I disagree, David. Moderating the site is enough work, we don't need to moderate the world too.
    – corsiKa
    Commented Dec 11, 2014 at 12:34
  • 3
    "It is not up to moderators to enforce the terms and conditions of another site, and we will decline these flags" - I never understood that reasoning and never will. If I own the rights on something and someone despite explicitly expressed will still copies content on another site, I would expect that other site to honor existing law and - especially if indicated by flagging - to act in a way that conforms to it. Such bold ignorance vis-á-vis intellectual property on a web page that lives from people granting the site rights on their stuff is beyond my comprehension.
    – JensG
    Commented Dec 12, 2014 at 1:32
  • 9
    @JensG - There is no possible way moderators can have the time to read and understand all possible laws and honor codes for every single country, jurisdiction, university, and site in the world. If you have a copyright claim, you can file a DMCA takedown request with SE via the procedure described in the help center and they will review it per U.S. law. Given the number of false claims we see filed on a regular basis, you really don't want us to accept these kinds of flags at face value.
    – Brad Larson Mod
    Commented Dec 12, 2014 at 13:25
35

I don't think there's anything wrong from Stack Overflow's perspective of posting a question from a competition.

If the question is within-scope and well written and provides a decent attempt at the problem whilst asking specific questions (i.e. not "make my code better please"), then it should be welcome here; if it's is poorly written, not in-scope then it is not welcome. The fact that it is part of an external competition should not have any bearing on its acceptance on Stack Overflow.

Summary: Vote according to the content of the question itself, not on the fact that it is for a competition.

5
  • 1
    they are ill written (copypaste of the full question, with few test cases). Here is my bruteforce O(n!) approach (this is in the best case, most of the time I have a bruteforce approach) and the question is: how to make it better. Commented Dec 9, 2014 at 20:52
  • 11
    While we may have clear guidance not to close or flag these questions, my vote is my own and I will use it against questions like the one described, as well as commenting discouraging people from answering until the competition is over. I get why it would be a nightmare for Stack Overflow to try to respect all the norms and rules of other communities. But if a question is a straightforward case of the asker being a first-class dickhead and trying to win a trust-based competition fraudulently, I won't hold back from pointing out - by word and by vote - that I think such conduct is wrong.
    – Mark Amery
    Commented Dec 10, 2014 at 11:26
  • @MarkAmery Of course, your vote is your vote. But the issue is when other people start being dragged into your opinion (e.g. mods by VTC, flagging).
    – dav_i
    Commented Dec 10, 2014 at 12:06
  • 2
    The competition questions are likely copyrighted. I think this may be an issue with posting them to Stack Overflow. Even if it is reworded, it may be a "derived work" or something. Commented Dec 10, 2014 at 15:54
  • 1
    @SalvadorDali "Make my code better" type questions should probably be posted on CR. Though if the question is poorly written, then it doesn't really belong on any SE site.
    – cimmanon
    Commented Dec 10, 2014 at 16:04
15

If it bothers you, downvote the question and move on.

It violates none of the rules of stack overflow, so a moderator flag is inappropriate. The moderators are not in charge of enforcing no-cheating on other websites.

On the other hand, you are free to think such questions are pretty useless to a professional programmer, and you can downvote. If 3 people agree with you (and nobody upvotes), it falls to -3 and most people who are not logged in can no longer see the question.

Do not vote to close, unless it qualifies as bad by some other measure: "programmer is dishonorable" is not a good close reason, as tempting as it is.

2
  • 1. But the problem is not in the question itself, so why downvote it? 2. It doesn't violate the SO rules if the user can utilize the answer to murder a bunch of people. I would still expect an SO user to do something about that, if they can. And by "something" I don't mean up or downvoting...
    – einpoklum
    Commented Sep 2, 2021 at 20:51
  • @einp SO users are free to downvote for any reason except a few (serial downvoting for example). You are also free to track down people on SO using it to cheat and report them to their teachers. There is isn't a universally recognized moral duty for bystanders to report someone cheating on a test; there is one for murder. Policing cheating would ve expensive even if SO wanted to. I get that "cheating on a test" seems extremely important to people in academia, but it really ain't. Commented Sep 2, 2021 at 23:59
4

If you feel the user is attempting to cheat the competition, and this bothers you, then don't answer the question.

1
  • That means OP is not helping the user cheat, but the user will still likely manage to cheat; and OP is turning a blind eye to the cheating. So it would still bother OP, and perhaps rightly so.
    – einpoklum
    Commented Sep 2, 2021 at 20:50
2

This Q&A is a dupe target for a similar one about exams, where a student asks for help with an exam question during the exam. So my answer below is primarily motivated by that situation, but it can apply to online programming contests too.

TL;DR: by answering such questions, in addition to helping people cheat, you may not actually be creating useful resources that will help future readers anyway.

When a student posts a question on Stack Overflow during an exam, they are trying to cheat and they know they are trying to cheat. This means that even if you don't care about helping them to cheat, these questions should not be dealt with just the same as any other question, because the OP has different motivations than a "typical" user asking a question, and those motivations conflict with Stack Overflow's goal to be a repository for programming Q&As which are useful to a broader audience.

The interest of Stack Overflow's community is for a question with good answers to remain available for future readers. The interest of a cheater in an exam is to get an answer to their question and not get caught cheating. As such, it is in the cheater's interest to delete their question after they have an answer, so that it is less likely to be found by the examiner. Likewise, and moreso for a programming contest, it is in the cheater's interest to delete their question after they have an answer, so that other competitors in the same contest cannot benefit from the same answer.

So if you deal with such a question in the same way as any other question, then there is a reasonable chance your answer will help only the OP and nobody else, because they have good reason to delete their question as soon as they get a good answer to it. For a concrete example, I answered this question (10k+ link) which in retrospect was likely for an exam, though the OP didn't say so; but they did delete it within seconds after I posted my answer. I only knew in this case because they were so quick, I hadn't navigated away from the page yet; there isn't a notification when a question you answered gets deleted.

Yes, in principle such questions can be undeleted by other users, but will they be?

-12

Downvote and vote to close.

Asking for optimal solution is primarily the same as asking for the code. It's not enough "attempt" to ask on SO.

2
  • 6
    You are essentially embargoing every other questions in algorithm tag - it is either hit or miss with algorithm, very rarely mid-way. (I don't disagree with closing questions which are essentially a question dump, though)
    – nhahtdh
    Commented Dec 9, 2014 at 8:32
  • 15
    This should not be the primary close reason. As I've argued before, "proving effort" should not be a prerequisite to ask questions here. Questions can be extremely good and useful without the OP having put in any effort whatsoever, and on the other hand questions can be extremely poor even if the OP has sweated over it the last two weeks. We want to answer the good questions and close the poor ones; not smack the OP over the head or hold their hand based on how long we perceive they've stared at their computer for.
    – deceze Mod
    Commented Dec 9, 2014 at 8:57

You must log in to answer this question.

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