16
\$\begingroup\$

posts are one example of can-get-tricky post titles, since we're a bunch of users posting "Ultimate Tic-Tac-Toe" entries.

Lots of other small projects have the same issue:

  • Convert Farenheit to Celsius
  • Rock-Paper-Scissors
  • Fizz-Buzz
  • Simple Calculator
  • Project Euler #XYZ
  • ...

Question titles have to be unique, for obvious reasons. What actions [are we taking|can be taken] to avoid, in the long run, titles like "Simple Calculator Implementation #429"?

\$\endgroup\$
  • 2
    \$\begingroup\$ And perhaps especially titles that include the word "this" ("How can this code be written better?" for example) \$\endgroup\$ – Simon Forsberg Mar 4 '14 at 20:56
  • \$\begingroup\$ Have you ever tried searching for a specific answer?? Damn that's confusing. you always get the question title, the [useless] excerpt, tags and usercard (as well as votes). is that a problem? probably not. will it be a problem with questions? probably not... \$\endgroup\$ – Vogel612 Mar 5 '14 at 12:43
10
\$\begingroup\$

Questions have four types of visible metadata that can be used to distinguish them from one another:

  1. The title, which is the first thing one sees of the question. In some lists, this is the only identification for a question.
  2. The tags, which allow filtering
  3. The excerpt, which is mostly useless
  4. The user card, which is usually some subset of {name, picture, rep, date}.
  5. (also, the vote count, but that's not useful for identification)

Undoubtedly, the title is the most important of those, but it is not the only one, and there is no cultural need for it to be unique(1). Together, these pieces of metadata and especially the title have three uses:

  • to enable future users to find the question when writing similar code

    In an ideal world, people would come here to get their code reviewed after being certain that this is the best code they can write. Reading through other code reviews on similar scenarios would help here, and a good title would help them decide whether that question is sufficiently similar to the code they are writing.

    Unfortunately, a code review is highly localized to the asker's code, and not a general repository of knowledge with lasting value (this is where CR is radically different from other SE sites). So this audience is probably irrelevant.

  • to serve as a mnemonic identifier for the question

    When talking about similar questions, we might refer to them by title. There are also many cases where the title is the only available identification, for example:

    • In the “hot network questions” list
    • In various lists on our user pages, e.g. reputation or activity.

    The title should therefore be sufficiently informative on its own.

  • to make a potential reviewer curious about the code

    I believe this is their most important job.

    The tags play an important role here, as I am not interested in some technologies (), whereas I positively must review all questions about another one ().

    The title should not be “How can I improve my code” or “Please review this”, as that is fairly obvious given that this site is about code reviews. It should instead contain information on what that code is doing, and how that code is doing it:

    • Please review my Fizz Buzz implementation – asking for review is implicit.
    • Fizz Buzz implementation – ok, this is telling me what the code is doing, but I have no interest in reviewing yet another Fizz-Buzz solution. All that can be said has already been said for other questions. See my above point about reading similar questions.
    • Fizz Buzz without hardcoded rules – oh, something new. This is a good title.

    I find it absolutely acceptable for a title to only address the what, but a good title will offer additional information to make it more interesting. Note that language or library choices do not generally make a question more interesting – that info belongs into the tags.


  1. The SE software does indeed enforce unique question names, which is IMHO unnecessary (should this discussion spawn a ?). I do not have access to mod tools, but I guess we have very few duplicate questions on CR anyway. Every piece of code on CR is different, whereas on SO the same problem will likely use the same title and get the same answer.

    This could be reduced by namespacing questions with the language used (“Java: Fizz Buzz” vs. “C#: Fizz Buzz”), but this is silly – that's what tags are for.

\$\endgroup\$
  • 3
    \$\begingroup\$ "there is no need at all for [the title] to be unique" Except that the Stack Exchange software requires it. \$\endgroup\$ – svick Mar 5 '14 at 13:37
  • \$\begingroup\$ @svick didn't know that, thanks. That's a pretty useless restriction in our context (but I get why this is useful for other sites). \$\endgroup\$ – amon Mar 5 '14 at 14:03
  • 4
    \$\begingroup\$ @svick Hah, the uniqueness filter can be fooled with extra spaces! \$\endgroup\$ – amon Mar 5 '14 at 14:11
8
\$\begingroup\$

I like amon's answer a lot here, but I wanted to contribute with some extra suggestions

What actions [are we taking|can be taken] to avoid, in the long run, titles like "Simple Calculator Implementation #429"?

If it is a common implementation (Linked List Implementation, Fizz-Buss, some kind of Calculator), focus on what makes your implementation stand out of the crowd. Is there anything that makes it unique?

I also think that you often can make your titles sound a bit more "fun", such as Ready? Set. Fight! and Recursive Regular Expressions (OK, perhaps not so fun but it's IMO more fun than "Regular Expressions that are almost written in a recursive way" or similar)

(Sorry for only using my own questions as examples so far, but titles is something I've really been thinking about lately)

Examples:

Some things to think about for common implementations can be:

  • Are you using generics?
  • Are you implementing an interface or perhaps providing some interfaces along with your implementation?
  • Is your code highly flexible and standalone?
  • Are you trying to optimize for speed?

Using these questions (and probably many others), you can use a bit of combinatorics to come up with titles such as "Fast and generic calculator", "Fast and Flexible Linked List", "Linked List with embedded Foo".

Some of the linked list questions focus on a specific task of a linked list, such as deleting from a linked list. This can also be a part of your title.

So, bottom line:


Focus on what makes your question stand out in the crowd. If there is nothing currently standing out, then make the title stand out. Be creative.

\$\endgroup\$

You must log in to answer this question.

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