How to Get Answers to Your Questions

I love helping people out with technical challenges. I don’t always have as much time as I would like to dive into the details of their code though. Occasionally I get requests for help that are completely unactionable on my part. A while back Eric S. Raymond wrote a great guide for How to Ask Questions the Smart Way. If you haven’t read it I recommend it. I’ll summarize some of my tips here, which may or may not agree with his write-up. Hopefully these will be useful as you ask for help elsewhere. These are the steps I use when I ask others for help, or post on Stack Overflow.

One note, this isn’t intended to be taken as a complaint or rant. Just some useful tips to expedite the process of asking for help.

  1. What are you trying to do? – Just saying “This doesn’t work” is not enough information. Let me know what you are trying to accomplish. Also, if you can tell me some context and why, then I might be able to suggest an alternative method to accomplish the objective – you may be trying to do something the hard way. A while back a friend of mine asked me of the DOS Interrupt to reverse the scroll direction of text. I didn’t know, so he spent a few more hours researching it. When he was done he showed me the assembly routine he wrote to delete a line of text and then move the text bellow it up to take it’s place. Once I knew what he was trying to accomplish I could tell him there was already a routine in the CRT unit that did exactly that.
  2. What have you tried? – What debugging steps have you taken? Did you set a breakpoint? Did you try it on a different device? Did you consult the documentation? Did you consult the platform APIs? Did you reboot the device? Did you read what the error message said and try adjusting your code appropriately? Depending on what you are doing, there are different troubleshooting steps you should be taking. If you can tell me what you have done, and what the results were then that saves me from asking you if you “tried turning it off and back on again?” I’ve forgotten that simple step many times, and it is amazing how often it fixes the problems. If you haven’t tried anything else yet, do that first.
    We've tried nothing and we're all out of ideas
  3. Include a link to related documentation – Believe it or not, I don’t have every API memorized. To save me from doing some Googling, include some links to the pages you consulted in your troubleshooting. If you don’t have any links, then either you need to do some searching, or you need to let me know there is no documentation for what you are working on. Also, this may explain better what you are trying to do, and where you are getting your information. If you are reading an outdated document then that may be the problem, but if I don’t know where you are getting your information then I probably won’t know to suggest that. Also, by showing me the resources you’ve already tried then I won’t waste your time by sending you those links.
  4. Let Me Google That For YouTry searching Google, Stack Overflow, Forums, etc. first – Occasionally it is nice to get the question that I can answer just by pasting it into Google and replying with the first link. Makes me look smarter than I really am, but after a while it gets old. Often times I’ve found that after I search for something and don’t find any results, I’ll compose my question to a real person differently than my original search terms. I then take that question and paste it back into Google and the answer appears.
  5. Be Specific and Relevant – For example if you are having some issues calling the Facebook API from a FireMonkey mobile application, it is useful to know you are only seeing the issue from your rooted Android tablet, using XE5, running the beta of Android “L”. On the other hand, I probably don’t need to know the color of your device’s case or your Facebook password.
  6. Don’t send source unless asked – Please don’t paste in your entire project source code, including forms, etc. unless I ask you to. Often times it just results in an unwieldy long email message or blog comment that I need to scroll through to find the pertinent information. Sometimes it is useful to send source though, and I generally recommend trying to recreate the issue in a sample program before asking for help, just as a troubleshooting step. That isn’t always possible though, so explain why in your email too. Now when asking on other forums, etc. observe the tradition there. If you are submitting a bug report then a test case is a good place to start.
  7. Avoid Personal Attacks – I used to work with a guy that whenever dealing with someone else’s code, software, library, tool, etc. would say “If I wrote code like that I’d lose my job.” One time I pointed out it was his code. He didn’t learn. It is never necessary to insult someone, even if you believe you’ve found a bug. I’d wager that any programmer who has not written any bugs has not written enough code. Even if you are not attacking me, I don’t like working with people who feel it necessary to belittle others.
  8. Stack OverflowDo some leg work yourself – This one is kind of hard to explain, but on sites like Stack Overflow they call them “homework questions.” Sometimes someone ask a question that sounds like it was part of their homework. The corollary is if you are asking a question like “What happens if I try to reference an object after I free it?” Or even more complex questions, but where the answer is obtained by simply doing what you ask and observing the outcome. I might know the answer off the top of my head, but often times I would need to do the same level of work you would to test it. Now if you are curious if “X works on Y” where you don’t have access to Y, then let me know in your question. Likewise if you did test something, and are getting inconsistent results and what a better understanding, explain that as well.
  9. Explain it to a Teddy Bear – The Teddy Bear PTeddy Bearrinciple is where you try to explain the problem out-loud to a Teddy Bear, as if you are trying to get an answer. It is amazing how often just going through the process you will answer your own question, or maybe realize your question doesn’t make any sense. If you don’t have a Teddy Bear you can use your dog, child, spouse, statue of Blaise Pascal, picture of Niklaus Wirth, shrine to Charles Babbage, etc. You can take it to the next step by imagining what answers, questions or challenges might be offered to your question. It is OK to have a full on conversation with an inanimate object.

Personally I’ve found that frequently when I prepare a proper question I find the answer before I need to ask it. Especially if I try to create a test case. That won’t always be the case though, and that is fine.

What tips do you have for getting better answers? What do you do before asking for help?

This entry was posted in Commentary. Bookmark the permalink.

10 Responses to How to Get Answers to Your Questions

  1. Will Watts says:

    Broadly in agreement with all that, with two caveats:
    1. The Teddy Bear Principle, though much cited, doesn’t really work. The ‘understand the problem by saying it’ thing only functions properly if you are actually wasting a real life colleague’s time. I believe this is because it is somehow fuelled by the kick of embarrassment that you get 0.25 seconds after realising the truth.
    2. Sadly, nobody who needs this advice will ever read an article like this.

  2. David M says:

    Good advice. I have bookmarked this and may use it in one of those too-common ‘please clarify’ comments on a Stack Overflow question 🙂

  3. Bruce McGee says:

    I frequently ask “who wrote this crap?” when reviewing my own code. And yes, I know it’s my code at the time. 🙂

  4. SilverWarior says:

    I also generally agree with what you have written. Forming question corectly is the first step in getting the answer, either from others or finding it by yourself.

    But the min problem is that forming correct question is someties extreemly difficult. Quite many times you will know basically what the end result would be but you won’t have a slightest idea of how to get there. And becouse of that you probably won’t be able to ask the right question.

    I know this from my own personal expirience. You see I’m a self taught Objective Pascal programmer who doesen’t have any kind of education from any of the computer related technologies. Becouse of that I had quite great difficulties understanding proffesional terminology. And that can be a great obstacle of finding out the required answer by yourself.

    I can’t even count how many times finding an answer for me is just figuring out the correct professional term for the job I wannaa do.
    And becouse of that I’m also often reinventing the wheel quiote often by implementing some things by myself from scratch. And usually once I’m done implementing them I found code solutions for those implementations which were available all along but I just didn’t find them since I didn’t quite know what to look for.

  5. In addition to the obvious RTFM this is great advice that I’ll now be linking to a lot!

  6. Joseph says:

    I have this terrible picture in my mind right now of touring the Delphi development facility and encountering row after row of Romanian programmers talking to teddy bears.

  7. Jim McKeeth says:

    Joseph: They all have busts of Blasie Pascal.

  8. Lars Fosdal says:

    An almost certain way to get the right answer, is to post a wrong one on the internet 🙂

    Seriously, though: These 9 points are a must, although point #9, should probably go to the top spot.

  9. Jim says:

    Jim, your comments were thoughtful, but they didn’t tell how to submit our well-formulated questions.

  10. Jim McKeeth says:

    It really depends on who you are asking. Either posting in a newsgroup, sending an email, posting on Stack Overflow, etc.

Leave a Reply