“There’s no such thing as a stupid question” is a nice sentiment to keep in mind throughout your life. You will be far more likely to ask questions every time you are unsure of something if you never think it is a stupid question. Asking stupid questions will also lead to you have deeper understandings of subjects you are interested in. It’s contradictory, but asking stupid questions is very intelligent. If you don’t know something you should definitely ask.
Although stupid questions don’t exist, smart questions most certainly do exist. When you ask a smart question, you essentially show that you have made a lengthy effort in attempting to solve the question yourself, prior to asking the question. If you are searching for help on a programming assignment, stack overflow is probably the place you will begin your pursuit of knowledge. It is extremely important to keep the distinction between stupid and dumb questions in mind while on stack overflow, as programmers don’t respond well if you ask a question that is not smart.
Above is a great example of an intelligent question! The inquirer is asking a fairly simple question, “Why is processing a sorted array faster than processing an unsorted array?”. At first glance, this seems like a stupid question, but as you continue reading the inquirer shows that they want to understand the process and logic behind arrays. They provide the program that sparked their curiosity, demonstrated what they did to solve the problem themselves, and what they thought the answer might be. The answers to this question show that it was a smart question, the programmers respond with lengthy statements and analogies with the intention of teaching their knowledge.
On the other hand, this is an example of how you should not ask a question on stack overflow. The inquirer attempts to appear as if they just want to understand loops more, but it seems that they are just searching for the answer to an assignment. It is also clear to see they did not research prior to posting this question. The programmers’ answers to this question are good answers, but some are confused about what exactly the question is, and one of their tips was just to use a “return” rather than “break”. If the inquirer had tested their code extensively they probably would have figured that out for themselves.