What is a smart question?

30 Jan 2020

Computer science can get confusing very quickly, so asking the right questions is very important as your trying to learn. What makes a question “smart”? there are many factors to smart questions, and one of the first ones starts with the person asking the question. Have you done everything in your power to finding the answer before asking? A big part of learning is struggling through something until you find a solution.

1: Did you check Stack Overflow?

A lot of people will simply post a question about something so common, that they could have found a million other people that have already asked that same question. It’s important to ask yourself “Am I doing something someone else has done before?”. If what your doing is very basic, then yes, most likely someone has already asked that question and you can probably just look it up in less time than it would to get a response back.

2: Did you Google it?

If Stack Overflow fails you, try Google. Google not only can find questions from other forums then Stack Overflow, it can find web-pages made by other computer science enthusiasts. A majority of the time, I get my question solved by these first 2 strategies.

3: Did you check source code/documentation?

It should go without saying, that if you are using someone else’s code, they should have some sort of documentation on that code explaining what it is and how it works. It is a Good coding practice to comment your code well to give the next person (including yourself) a better understanding of what the code is all about.

4: Did you ask a class-mate/friend?

If you are a Computer Science student or thinking about taking the plunge, make friends with the people that have the same interests as you. You should be opening up in class to get to know the people around you so you guys can help each other when the time comes. Sometimes the people you make friends with have already learned what you are having trouble with.

Ok, so you still can’t find an answer…

Now’s the time you want to start getting the details ready for the question. The header should be helpful to the reader, it should give everything the reader needs to know about what you are trying to do and with what language and frameworks. The body of the question should contain your full question with source code with the trouble area clearly visible to the readers. A good tip is to Auto-Format your code with the code editor to make it look nice and clean instead of sloppy looking code. Like I stated in #3 above, comment your code so you know where everything is and the reader can easily see your design pattern and help you solve your particular problem.

Bad Question:

This LINK brings you to a great example of someone who has not put much effort into asking their question.

Header: “How to have only one person on a webpage, the others go on a waiting screen” — This header gives little detail into how they want it done, language, or framework.

If that person has even written any code, they expect the readers to solve his problem for him without knowing what he has even tried. he even goes on in the comments to say

“I decided not to post my code because I’m almost sure I am not getting anywhere with it. I just ask for new solutions I don’t know, or examples ppl have in mind ;)”

Good Question:

This LINK is an example of a good question.

Header: “How do I remove a particular element from an array in JavaScript?” — This person’s header is direct and gives the reader a good idea what the rest of the question is going to be about.

Body: — The body of this person’s question contains further details of the issue and some examples of what method they are using and what they want to have done.

“I have an array of numbers, and I’m using the .push() method to add elements to it.

Is there a simple way to remove a specific element from an array? The equivalent of something like array.remove(number);.

I have to use core JavaScript - frameworks are not allowed.”