Writing the Best Questions

For getting the best answers

September 8, 2014


As a developer, our greatest resource for solving problems is the developer community at large. There are a number of places that we can go to find the answers to our questions, including one of the most popular, stack overflow. When asking a question on the community we must follow a set of guidelines in order for them to be answered.

#1 Search Search Search

Before you post a questions make sure to search and search and search to make sure your question hasn’t been answered already.

#2 Things not to ask

Never ask someone to do your job or your homework. If you need an opinion, find the top contributors on your subject and shoot them an email.

#3 Write a good Title

1. Make the topic stand out.

attract people interested in your topic or who can give you an answer. People scan web pages quickly. Make it easy for them to notice your question.

2. Keep it short.

You don't have to put all the details in the title. There's plenty of space to expand your question in the body of the text.

3. Lead with the most important words.

4. Don't start with "How do I..."

This is a question site, and people will understand your titles are questions.

5. Don't sweat replicating a tag keyword.

Some Good Examples

Here are some good titles, taken from existing posts. They succinctly summarize the question and will catch readers' eyes whilst scanning down the list.

  • Turning Linux USB power on and off?
  • How to UPSERT in Oracle (update or insert into a table)?
  • Python: What OS am I running on?
  • Raise an existing X11 window via command line?
  • 64-bit XML-RPC values?
  • Move an existing X11 window via command line?
  • Sum 3 columns in SQL when one column has a null value?
  • Oracle: searching over a range of values?
  • PostgreSQL encrypted backups
  • Readable font for code presentations?
  • Object Oriented vs Relational Databases
  • Oracle: formatting number as xxx-xx-xxxx
  • PostgreSQL Long VACUUM
  • Best timing method in C?
  • Map Routing, a la Google Maps?
  • Constructing images using HTML markup?
  • Inserting PostgreSQL BLOBs at a high-rate?

Some Bad Examples

These titles, also taken from existing posts, accurately present the question when read individually, but make it hard to pick out questions of interest when scanning the list.

  • How can I format xxxxxxxxx like xxx-xx-xxxx in Oracle?
  • How can I programmatically enable and disable the power to a particular USB port on Linux?
  • How can I raise an existing window via command line in X11?

    How can I quickly insert a BLOB in PostgreSQL?

    What is a good font for code presentations?

    How can I sum 3 columns when one column has a null value?

    How can I construct images using HTML markup?

    What is the best book for software design?

    How can I generate unique random numbers in PHP?

    How can I quickly insert a BLOB in PostgreSQL?

    How can I tell what OS am I running on in Python?

    #4 How to Write the Question

    Make sure to put some effort in and show your own solution. Ask about where you’re going wrong instead. If you can, add a working example of your code. For example, if your question is JavaScript related you can use jsFiddle, or any other similar online tool. Use it to create a working example and post it as a part of your question, it will improve your chances significantly.If you manage to create a working example don’t forget to tell us how to recreate your problem. Write what’s wrong with your code, error messages, missing data. Stay at least a half an hour up to one hour looking at your question. People will leave you initial comments asking for more information, and you will need to be able to provide it.

    Resources:

    http://meta.stackexchange.com/questions/10647/how-do-i-write-a-good-title