[04/11/2019] How to ask a programming question

This blog post is dedicated to purely asking the question of "How do I ask a good programming question?". This will allow me to link it whenever I see a bad programming question asked for my own convenience. Lets carry on shall we? Firstly, I will list how to ask a question in order.

Checking Documentation

Most programming languages will have documentation for all functions included in them or their standard libraries. Most libraries also include documentation. Good documentation will include a list of parameters available for the function, code examples or alternate/related functions. Check through this first to see if your problem is just one of misunderstanding a function.

Googling answers in StackOverflow

If a programming language or library has been used, and you have a question, the likelihood is someone has asked that question, or a similar question beforehand. My standard search on Google will typically be as follows: NAMEOFLANGUAGE NAMEOFFUNCTION NAMEOFPROBLEM. Such an example includes, "C strtok example" or "C segmentation fault causes" or "GML blendmodes explained". Doing this makes your searches easily understood and will tend to give you Forum, Stack Overflow or Blog answers to your problem. From these, it's simply a case of understanding the answers and interpretting its relevance to your question or code. If it's relevant, you can "copy and paste" or rather more accurately, modify to your style and purposes in Code. If it's not relevant, you might have gotten a better understanding of your question, and its requirements.

Formulating a good question

To Formulate a good question, it requires multiple parts. What is the intention behind your question? What is the strict requirements behind your question? What have you done so far to try and answer it? What is the expected output(if relevant)? You should also provide source code and NOT SCREENSHOTS or GIFS of your code. Screenshots and Gifs make it harder for other programmers trying to help, actually help you. Badly asked questions make it harder for other programmers trying to help, actually answer the actual question.

Understanding the answers to your question

Most answers from programmers will vary. Some will be unhelpful providing poorly explained answers that are purposely cryptic or obtuse. These programmers are trying to help badly and showoff at the same time. Their answers will tend to have some underlying truths, but they will go on about bad practice or bad standards. Their concerns are true, but often times they undermine the actual question being asked. Some will provide example code, or fixed code without explaining. It's up to you understand it, I recommend going back to step 1 or step 2 and checking how this compares with documentation or stack overflow. Some programmers are born teachers and will provide links to the documentation and their own layman-terms to explain the documentation. They might also refer to the problems with it in limited depth but won't go on forever about it. Other programmers will often correct them as they leave out unimportant details for the sake of brevity and understanding. Sometimes these details are actually important though, so should be considered on their own merits. It's a shame that programmers are like this, and I myself am occasionally guilty of being useless at answering questions, but if you take time to ask a good or at least a well written/structured question, we will tend to help you better.

Thanks for reading, feel free to email me questions about this, and I can answer them.

<Latest><Next><List><Previous><Oldest>
Take me home!
Bad for health, Good for education