21
\$\begingroup\$

The tag wiki for programming puzzle says:

A programming puzzle includes a goal, a partially completed program, and rules outlining how the program can be modified. The program is specifically designed to make achieving the goal difficult. An answer to a programming puzzle takes the program and modifies it only in ways specified in the rules, so that the goal is achieved.

In its basic form, a programming puzzle is just a puzzle, like this one. An answer either solves it or it doesn't.

However, we require an objective winning criterion to select a single winner. It's not enough to judge a submission correct, it must be possible to compare submissions against each other.

Some programming puzzles achieve this with an additional judging criterion, like a popularity contest to let voters decide on the best solution, or as code golf to reward efficient solutions. But, about half are simply puzzles, in apparent violation of the policy. Moreover, new users who read the tag wiki are led to believe programming puzzles can stand in their own right.

What should we do about this?

\$\endgroup\$
  • 3
    \$\begingroup\$ The tag should be renamed to something else as the site's name gives the impression that it is 50% about programming-puzzles. \$\endgroup\$ – feersum Jul 20 '15 at 21:26
  • \$\begingroup\$ Related. \$\endgroup\$ – Peter Taylor Jul 21 '15 at 13:22
  • \$\begingroup\$ @feersum If nothing else, the wiki for the programming-puzzles tag should be improved. \$\endgroup\$ – Alex A. Jul 21 '15 at 19:30
16
\$\begingroup\$

This is, perhaps, a comment prompted by Alex A.'s post, but too long to be one.

Why exactly do we need challenges to have a clear winner?

To accept an answer, maybe? But only 62% of questions have an accepted answer. The goal of this site doesn't seem to be to find the one best solution, but for people to have fun making their own. Even in popularity contests, where upvotes determine the winner, the interesting thing is reading the many very different solutions people come up with.

The goal of an objective winning criterion is that any two submissions can be compared, but some of these comparisons, while doable, feel silly. Sure, you can compare a CJam golf with a C++ golf by character count and get a result, but it's a meaningless comparison. It's like comparing "abc" > 123: Python 2 will tell you it's True, but why are you doing that? And sometimes popularity contest scoring seems like a hack as well, adding a .get_votes() method just to implement Orderable.

Now, I don't want the site to collapse into a heap of "Do something cool" and "Make this code better, somehow", so I think it's important to require some element of objectivity and challenge. But beyond meeting the spec, I'm wondering if we actually need submissions to be comparable against each other as a broad rule.

\$\endgroup\$
  • 5
    \$\begingroup\$ On a code-challenge, it is important to have some objective method of comparison (even if it is silly) because a code-challenge is by its very nature a competition. I see no reason to force that standard on programming-puzzles, since they are not competitions. They are puzzles. I do not mean to say they should be on topic--that is an important decision to make--but I would argue that if we decide they are on topic, there's no reason to hold them to the arbitrary constraint of having a winning criterion. \$\endgroup\$ – BrainSteel Jul 23 '15 at 16:12
  • \$\begingroup\$ On a purely rep-based level, a few upvotes is worth much more than an accept. And that sort of challenge is a bunch of fun. But by going this way, we open up to a whole world full of disastrously low-quality not-contests. \$\endgroup\$ – Robbie Wxyz Jul 31 '15 at 4:14
10
\$\begingroup\$

Yes, they are on topic

To address some common reasons why people think they shouldn't be on topic:

  1. They don't have a winning criterion. By default, the winning criterion is first posted. Even if you don't like this criterion, it is objective. That said, first posted should be your last choice; the OP needs to attempt to identify other possible scoring criterion, using first posted as a last resort.

  2. It's unfair to those that aren't currently online, checking the newest challenges. While this is true, I don't think its grounds to reject them. We see this "unfairness" frequently on challenges, where two users have different submissions of the same length, and the first gets chosen. This is especially true when the winning answers are 0-byte or 1-byte answers.

  3. It provides no lasting value; I should be able to go back to any question and answer it. This is the best argument I've heard, so I'll try to address it thoroughly:
    1. Challenges are still fun in the short-term. Cops-n-robbers, KoTHs, and fastest-code challenges all usually have an end date. Especially in the case of Cops-n-robbers, all "answers" get revealed after a given number of days, but we still have fun.
    2. Programming puzzles are fun even if the winning answer has already been posted. I'd argue that we do what Puzzling does, namely, require that submissions be placed in spoiler tags, so that people can still do the challenge if they wish (and find other creative answers).
    3. A small amount of value is still better than no value. Much of the posts on Stack Overflow provide little value. After a day or so, it will rarely see the light of day. Yet, one of the greatest strengths of Stack Overflow is the vast amounts of these questions, because of their cumulative value. We often consider questions here valuable because they improve people's ability to code. Programming puzzles provide another avenue to do this, and people will still learn when going back and looking at existing answers.
\$\endgroup\$
  • 1
    \$\begingroup\$ Re "first posted is an objective winning criterion". Yes it is, but I think anyone posting a programming-puzzle should still consider if there's a better scoring criteria. As discussed earlier in chat, "first posted" means someone can come along with a crappy but valid solution and take out all incentive to look for other/more interesting answers. In fact, technically further answer would be disallowed by our rule that every answers needs to "be a serious contender for the winning criteria in use." If there's any chance at all for a different scoring, that's almost certainly better. \$\endgroup\$ – Martin Ender Feb 28 '16 at 16:28
  • \$\begingroup\$ I completely agree. I think we should use "first posted" only if no other better scoring criteria exists. \$\endgroup\$ – Nathan Merrill Feb 28 '16 at 16:29
  • \$\begingroup\$ @MartinBüttner also, I'd consider multiple distinct answers to be the same as different languages in code-golf. My java answer may never have a chance at winning a code-golf, but as long as it follows the criterion, we still accept it. (That said, the answers can't be improved, but that's simply the nature of the challenge) \$\endgroup\$ – Nathan Merrill Feb 28 '16 at 16:39
  • 1
    \$\begingroup\$ I'd argue against spoiler tags in almost all cases (assuming this goes forward). They're ugly and detract from searchability IIRC. Not only that, but code blocks in spoilers are notoriously difficult to get right the first time around. And yes, I'm against them on Puzzling, too ;) \$\endgroup\$ – Geobits Feb 29 '16 at 1:24
8
\$\begingroup\$

A programming puzzle is on topic only if it has an objective winning criterion

Here I would exclude time posted except as a tie breaker after a more meaningful winning criterion.

I think it's worth preserving Peter Taylor's comment that sums this up well:

A scenario in which there is no "best" answer, just the fastest, is not conducive to quality. Programming puzzles as defined in the tag wiki have a natural win condition, which is the least Levenshtein distance from the original code, and that allows someone who spends more time thinking about it to come up with a better answer. It also means that questions have long-term value, because someone can come along six months or two years later with an improvement, whereas fastest-gun-in-the-west questions are usually dead within 24 hours, and sometimes within 24 minutes.

\$\endgroup\$
  • \$\begingroup\$ I don't think there has to be a single winner for every challenge. I think of it like a popularity contest, but there doesn't need to be an accepted answer or a single, objective winner. It doesn't mean that the first post wins either, if there's more than one way to solve the problem. \$\endgroup\$ – mbomb007 Aug 3 '15 at 18:43
4
\$\begingroup\$

Yes, pure programming puzzles are on topic.

In a programming puzzle, the obvious objective winning condition is simply solving the puzzle. It's indisputably objective, and to differentiate between multiple correct solutions, a tiebreaker such as earliest post might be added.

One might argue that this doesn't provide any real differentiating power, because everyone will just answer the question, and then it's simply whoever answers first wins. However, this senario does not reflect the lack of an objective winning condition. It is caused by the questioning being too easy, which is a perfectly valid reason to downvote any question, programming puzzle or not. But it is not a reason to ban an entire class of questions.

Programming puzzles do have an objective winning condition, and they belong on this site.

\$\endgroup\$
  • 6
    \$\begingroup\$ Solving the puzzle is not a winning condition: it's a "meeting the spec" condition. \$\endgroup\$ – Peter Taylor Jul 21 '15 at 12:02
  • 1
    \$\begingroup\$ @PeterTaylor Why can't meeting the spec be where the dfficulty and challenge lies, and thus appropriate for a win? \$\endgroup\$ – isaacg Jul 21 '15 at 20:03
  • 7
    \$\begingroup\$ A scenario in which there is no "best" answer, just the fastest, is not conducive to quality. Programming puzzles as defined in the tag wiki have a natural win condition, which is the least Levenshtein distance from the original code, and that allows someone who spends more time thinking about it to come up with a better answer. It also means that questions have long-term value, because someone can come along six months or two years later with an improvement, whereas fastest-gun-in-the-west questions are usually dead within 24 hours, and sometimes within 24 minutes. \$\endgroup\$ – Peter Taylor Jul 21 '15 at 21:42
-3
\$\begingroup\$

No, pure programming puzzles are off topic.

All challenges on this site require an objective winning criterion so that the choice of a single answer to accept is unambiguous and indesputable. Challenges which do not have an objective winning criterion are off topic.

The issue with pure programming puzzles is that they don't have a clear winner. As in any challenge, for a submission to be valid at all, it must meet the challenge specification. But simply meeting the specification is insufficient as a winning criterion. Once you have a collection of valid answers, there isn't a clear way to choose just one to accept. This shows a clear lack of an objective winning criterion.

Though off topic for this site, some pure programming puzzles may be on topic for Puzzling.

\$\endgroup\$
  • \$\begingroup\$ Why is "the first answer which meets the spec" insufficient to be a winning condition? \$\endgroup\$ – isaacg Jul 21 '15 at 20:04

You must log in to answer this question.

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