Which challenges are on topic here?
First and foremost, the same rules apply to all challenges, whether they are popularity contests or not. These rules are outlined in our help center. They were phrased differently in the past, but their essence was the same ever since the help center was created in 2013.
Programming Puzzles & Code Golf is for programming contests and challenges. We welcome questions from beginners and experts alike.
All challenge questions on this site should have:
- A clear specification of what constitutes a correct submission, so that it is possible to indisputably decide whether an entry is valid or not. Test cases are highly encouraged.
- An objective primary winning criterion, so that it is possible to indisputably decide which entry should win.
Now, let's take the following, theoretical challenge:
Write a program that prints an unpublished poem to STDOUT. Shortest code in byte wins.
Clearly, this challenge has an objective winning criterion (second sentence). Is this challenge on topic? Of course not! Where did it go wrong?
There is no objective validity criterion.
What exactly counts as a poem? If you google the term, you will find definitions full of weasel words, and you'll soon come to the conclusion that indisputably deciding whether any arbitrary collection of words is or not a poem will be impossible.
It isn't a programming contest.
The lion share of the challenge is coming up with the poem. Printing it should be straightforward in most programming languages.
What does that have to do with anything?
Unfortunately, many popularity contests are strikingly similar to the above example. Now, I don't think is because popularity contests are inherently worse than other challenge types, but because off topic challenges are much more likely to be labeled popularity contest.
Yes, popularity contests are judged by the community's votes, and yes, best vote tally is an objective winning criterion. However, that does not excuse popularity contests from complying with the remaining rules.
I'll use Paint the Mona Lisa in 1 KiB of code‡ as an example.
There is no objective validity criterion.
As far as validity criteria go,
Your task is to reproduce the Mona Lisa in 1024 bytes or less.
is as vague as it gets. Sure, it's easy to form an individual opinion for each submission, and for very good or very awful submissions, all involved people may agree that they do or do not "reproduce the Mona Lisa", but the same people may have different opinions anything in between.
In particular, the reference implementation produces this output, which doesn't look at all like the Mona Lisa in my opinion.
It's not a real programming contest.
There's nothing in the challenge's rules that forbids using an image manipulation program to compress the original image to ~1 KiB and find a golfy way to print it.
I did exactly that with GIMP, recompressed the image with LZMA and obtained a 1,110 byte Bubblegum solution that prints this image.
Creating this theoretical submission required little to no programming skills.
Fixing this shortcoming could be rather easier, for example, by changing the contest to accept an image as input and producing a compressed version, not longer than 1,024 bytes. This eliminates the possibility of handcrafting an image, and turns an image manipulation contest into a programming contest.
Beyond being on topic
There are easy ways around the validity criterion problem. For example, one could just specify
Print any image. The image that looks the most like the Mona Lisa (decided by vote tally) wins.
creating an objective validity criterion (output is an image). Such a contest should still be closed as too broad, since there are too many possible answers. At the very least, the challenge should have specified a desired resolution and a list of acceptable image file formats. Ideally, it should be more restrictive than that. For example, American Gothic in the palette of Mona Lisa: Rearrange the pixels contains a strict set of rules and even a validation snippet.
Furthermore, good guidelines for voting can also help to narrow down the challenge. Let us examine the Mona Lisa challenge once more:
Voters are expected to judge answers according to the following criteria:
- Resemblance of the output image to da Vinci's masterpiece, in terms of colour, composition, details etc.
- The extent to which it captures the famous "enigmatic smile"
- Novelty and cleverness of the techniques used (answers should clearly describe this)
- Elegance and quality of the code in general
The first suggestion says a lot without actually saying anything. With the size restriction, answers will have to choose between similar colors and details, and there's no indication which one should be preferred.
The second point highlights the smile. Does that mean the rest of the image is less important?
I'm not sure how what counts as novel or clever in this scenario.
Finally, I think judging the coding style is an absurd idea if the point is producing the best possible image in a limited amount of bytes.
Further suggestions for posting challenges
X has been asked before an was well received, so Y will work out as well is usually a bad starting point.
Many older challenges that met the quality standards in their time would be instantly closed if posted today.
Use the sandbox and give it time to work.
A good rule of thumb is too leave challenge proposals at least one week in the sandbox, to give it as much exposure as possible. Most users do not visit the sandbox every day.
Consider several scoring options.
Popularity contests are ideal for challenges which should be judged by humans, but only for those. Calvin's Hobbies' answer contains an interesting proposal for judging the Mona Lisa challenge, which has two advantages over a popularity contest:
While existing image compression utilities and algorithms are designed to please the human eye, finding an existing one that would score well in a code challenge should be significantly more difficult.
This means participants have to write their own image codecs.
It makes the winning criterion objective, which automatically narrows down the challenge.
All participants immediately now what their submissions should aim for.
‡ Apologies to @Nathaniel for picking his challenge apart, but is the challenge that started the whole discussion.