Asking Code Questions.
Sometimes ( well many times ) your code is not working and you’d rather it worked, you then decide that asking the Internet or a coworker for some help is the best course of action and well crickets 🦗🦗🦗 you get no love, even worse no answers/angry answers and your code is still not working.
It is not you.
First things first, even if you made the perfect question and you contribute answering questions you are not guaranteed to get an answer back, maybe the person that can answer your question never read it, maybe he/she is tired or busy working on something else and on and on, so keep your expectations low and don’t take the crickets personal.
Maybe It is you.
Unfortunately out of 100 questions one encounters maybe 90 could be improved in some way and this would improve their chances of being answered, what’s more, you can answer most of your own questions if you ask the right way ( more on this later ), unfortunately no one really teaches you how to ask questions, so that’s what we are trying to fix here today.
The honor system: Whenever I ask and get an answer I feel compelled to answer someone else's question, that's my honor system... Sometimes I answer questions because I am bored, because they are interesting or I want to reaffirm my knowledge, getting a thank you also feels good. I am not immune to fake internet points but in my experience this leads nowhere, so yeah, ask questions but also answer them.
Ok, let’s get down to business, the number 1 reason your question is not being answered is because you want someone to do the work for you, not only answering the questions (that’s easy), but understanding your question in the first place.
Take for instance this seemingly decent ( innocent ? ) set of questions:
I want to do X or am getting Y error, how would you do it ? How would you fix it ? Why is this not working, look at my code.
Help me !
If I wanted to answer these questions ( which I don’t) I would start by asking you another set of questions:
What have you tried ? What is the context ? Have you googled it ? How can I reproduce your error ? Can you be more specific ? Your code is 2 pages long ! Help me !
It all boils down to time, if you want to save time by asking a question, chances are I am the sucker that is spending my time doing your work.
Asking good questions.
The hallmark of a good coding question ( to me ) is the thought and care that went into asking it.
Everything needs to be right, the title, the introduction to the problem, the research, the explanation and crucially a small snippet of code that I can use to troubleshoot your issue on my own environment, it also needs to be compact. Questions like this are rare.
I think Stackoverflow’s guide on how to ask good questions covers a lot of the above in detail so I’ll just point you to it, read it when you are done here:
How do I ask a good question? — Help Center
We’d love to help you. To improve your chances of getting an answer, here are some tips: …and keep track of what you…
Simply ask yourself how long did it took you to write and research the question ? About half an hour is the correct answer, seconds or a couple of minutes is probably not.
Keep it short. I know we just talked about spending a lot of time making a good question, but when you are in a chat room or real room , space along time can be scarce, plus you benefit from already having an agreed upon context.
The inverse also seems true, if you bring a very general and/or long question to either the water cooler or some chat room it might not fare so well…
Even then, small hints that you’ve done some research and focusing can work on your favor:
I followed X tutorial and got an error "#error 102" after googling it says my arrays are in disarray, what could it be, can share a snippet of code.
Contrast that to something more general and aimless :
Finding answers on your own.
Sometimes just asking the question in a detailed way can suddenly give you the answer, this usually happens while writing it down or researching, it is also not uncommon to answer your own questions on SO or elsewhere.
Well, we don’t have them but what we do have are beginner friendly chat rooms or forums like r/learnpython or a #newuser channel of some other project, if you tried reading the documentation and googling a quick fix, these are the right places to start asking questions and sometimes they are a bit more welcoming and lenient with the how you ask.
And that’s it, keep it short , to the point and user friendly and your questions will stand a better chance of getting answered, if I miss something please let me know down in the comments.
Thanks for reading !