7
\$\begingroup\$

I had the same doubt as specified here (which is why I haven't accepted any answers yet).

Reading it told me that both kinds of questions are accepted:

  • Catalog question - Users attempt to find the shortest code in every language. No answer is accepted.
  • Shortest code question - Users attempt to find the shortest code possible in any one language of their choice (often a golfing language). The answer that solves the task with the shortest code (irrespective of language used) wins and answer is accepted. Bounty may also be awarded.

Given that I have no personal opinion on the issue, which kinds of questions are more suited for which kind of challenge?

Detailed answer categorising various kinds of questions would be helpful.

| |
\$\endgroup\$
  • 7
    \$\begingroup\$ I think that so far, the trend has mostly been to only use "catalogs" for very simple or "standard" tasks such as HW, quine, etc. like the ones you would find on Rosetta Code. For actual "problems" that require some thought (in non-esolangs, anyway), catalogs don't really fit because it's not as obvious whether an answer is optimal or not. \$\endgroup\$ – Doorknob Nov 28 '15 at 16:51
  • 1
    \$\begingroup\$ How is the bounty relevant? Bounties can be (and have been) awarded on catalogue challenges too. \$\endgroup\$ – Martin Ender Nov 28 '15 at 18:07
18
\$\begingroup\$

This is a false distinction.

On every code golf question, people answer in a variety of languages, striving for the shortest solution in that language. If it were simply a competition for the overall shortest solution, there would no point coding in Java or Python or any language but a select few that are very concise or perfectly-built for the task.

At the same time, people are having fun with "my Pyth code beat your CJam code by 1 byte" and writing new languages designed to push the limits of golfing. And that's cool too, having a "heavyweight" league.

Pretty much any question supports both the overall-shortest league than the per-language competitions.

| |
\$\endgroup\$
  • 1
    \$\begingroup\$ Actually I would call those "lightweight" ;-) \$\endgroup\$ – Paŭlo Ebermann Nov 29 '15 at 12:31
17
\$\begingroup\$

I'm not a fan of catalogues for the sake of catalogues. A catalogue should have a raison d'ĂȘtre. The original question about catalogues talks about

the catalogue nature of challenges corresponding to simple (and common) tasks

So in my mind there are two reasons to turn a question into a catalogue:

  1. The task is so standardised that it's become a cliché. If there are 10 different languages on esolangs.org which include a reference implementation for this task on their page, it would fall into this category (unless someone has added them just to point back to this paragraph :-p ).

  2. The task is a basic building block which will be used as a minor part of lots of other tasks. Take, for example, sorting an array of numbers. It probably does fall under the first reason, but it would fit better under this second reason, because many many answers on this site use a sort as a component without being really about sorting. (And the value as a reference for people who want a sorting procedure to slot into their program and don't care whether it's shellsort, quicksort, or bogosort is the reason that when there were active discussions about how to do a sorting catalogue I campaigned for a single question without partitioning by algorithm).

| |
\$\endgroup\$
8
\$\begingroup\$

Neither is "better."

Catalog challenges are regular code golf challenges. As Doorknob noted in a comment, catalogs have thus far been used primarily as a code golf analog to Rosetta Code, where we find the shortest solution in each language to simple challenges, rather than the most idiomatic solution.

HOWEVER

Making a challenge a catalog shouldn't be an excuse for posting an extremely simple challenge with an overly broad spec. It should still be an interesting problem to solve, however simple, such as primality testing and truth machines, or a "classic" challenge such as Hello World and quines.

Sandbox your challenge.

This helps with a number of things, but in this case especially the community can help decide whether a challenge makes a suitable "catalog." It also never hurts to ask about a challenge idea in chat.

| |
\$\endgroup\$
1
\$\begingroup\$

Shortest code Q

Ask a catalog Q only if you had this thing in mind:

Disclaimer: I know this question is easy, trivial and there are many languages specifically designed for this task. But it is here for good reasons.

There are no real differences between a catalog Q and a shortest code Q.

| |
\$\endgroup\$

You must log in to answer this question.

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