How to Ask a Question

Date: Oct 19, 2022
Author: Adeepa Gunathilake

It’s September again!

Today’s the 10,640th September. People usually ask me questions related to IT, specially related to programming. Many questions are just garbage. People don’t know to ask questions the right way.

I see many of these “garbage” questions on stackoverflow. When I see them, I just leave a advice in the comments and move on, but if the question is utter garbage, I immediatly downvote. This is the same procedure many other stackoverflow users follow. I know this can make newbies frustrating.

I myself started using the Internet in a day in Eternal September. When I was a newbie, I was not perfect at all (it’s true for even today 😒). In all these years I learnt many things by experience. As a newbie, you’ll never have these experiences because it takes time.

I’m writing this article to teach you how to get support, both online and in real life from me. Let’s learn the right way to ask a question.

If you’re new to the [real] internet, I’m sure this article will help. But if you’re lazy, make sure to atleast read the second part.

Things to do before asking a question

Eric Steve Raymond is a popular figure in open source software community. He once wrote an excellent guide on asking a smart question. There he list some things a person is expected to follow before asking a question.

  1. Search the web
  2. Read the manuals and FAQs
  3. Do some experiments yourself and try to solve the problem your own
  4. Ask from a skilled friend you know

Based on the amount of knowledge you have, you may not be able to follow some points. Anyway, here’s what each point means.

Seaching the web

This is the most fundamental thing you need to do if you need to solve a technical problem. Just use google (or ddg or whatever the search engine you use). 90 out of 100 percent, you will definitly find the answer by just searching through internet.

Based on the level of knowledge you have on the subject you may not able to find the answer online because you don’t know what keywords to search. In that case, proceed to the next step.

Read the manuals and FAQs

Most of the digital products you use have manuals, just like physical products. When a company develop a software, you don’t know how it works. So developers release a manual or a documentation with that software.

Many programming languages have manuals. For example, python (version 3) manual is here and java manual is here. But a programming language like javascript don’t have this kind of one standard manual. That is because many browser verndors implement javascript engines the way they prefer and therefore, there are many varients of the language.

For javascript, mozilla developer network is a great resource.

Again, if you’re a newbiest newbie, you may not be able to digest a documentation, but most of the times, you are being super lazy and not read the docs. This is ok if you have a skilled friend who forgives you for being lazy but if you plan to ask the question in a forum, never skip this step.

Do some experiments

This step is self explainatory. Try to do some experiments yourself until you finds a solution. For example, log the variable values to terminal to see if they contain what you expect.

Again, this step need some knowledge. So if you’re in the begginer level, you may not be able to do this. Then go to the next step.

Ask from a skilled friend

Just ask from a friend. If you don’t have friends (like me), only option remaining is to ask in a forum like stackoverflow. Either way, don’t annoy you friend or forum users by a “garbage” question.

Next section of the article explain how to ask a good quesiton.

How to ask a good question

I often times see students just copy paste their homework questions on stackoverflow, but the people who answer the questions on are like real chads. These chads get easily annoyed by these kind of low effort help grabbing attempts. So don’t expect a stranger in the internet would do your homework for free.

Before posting a problem on a forum or asking a friend, try to solve the problem youself. When doing so, you either succeed or fail. If you failed, think why you failed. The reason for failure is the real problem.

For example, assume you need to write a python program for some task and you try to do it. Then you get a error. Now, writing the program is not the problem itself. Your problem is the error you get. Lisitng out the requirements of your program on a online forum will never help, but explaining the error you get would help.

In case you know nothing about the subject matter, you may not even be able to approach the question. Online forums will not help here. Ask a real life friend to explain the subject matter.

After you identify the problem, next step is to ask. You can ask from strangers in the internet or you can ask from a real life friend. Either way, you need to be informative about the problem you’re facing.

Just saying “hey, I need to write a software for XYZ needs. I tried but I’m getting an error. Please help,” will not work. Not only that, by doing this you’re wasting other people’s time.

Describe the full problem you’re facing. Tell what you tried so far. Explain how you approached the problem. Then explain the error you’re having. Explain the expected behaviour of the program. See the below example.

Hello. I need to write a program to do Task XYZ. This is how I’m planning to do that. Here’s the code I tried to far. However, the code gives me an IndentationError. This did not happen until I wrote the while loop. I attach the complete error message I get below. How can I fix this issue. Thanks in advance.

You see, in the person who asked it do not expect others to do his work. He don’t just list out the requirements. He actually tries to write the program himself. Then he gets an error. Also note that he do not just say “hey, I’m having an error.” He explains the error he’s having. Not only that, he attaches the full error message he gets. Then he post the code he wrote and also he explains his code/approach to the reader so they can understand what’s going on easily.

This is how a good question looks like. IndentationError problems is something to fix very easily. If you’re asking how to fix an IndentationError from someone, it’s definitly because you’re a beginner. However, this don’t make the question a “garbage question,” because the question is descriptive and very well asked. If you want help from others, ask questions this way.

So to summarize, when asking a question,

TL;DR, keep in mind that nobody can read your mind, so be descriptive about your problem.

That’s it. If you read this properly, you know how to ask a question on stackoverflow without getting down voted. Congratulations!

Thanks for stopping by 💗