E11: Reflect on smart questions

12 Sep 2024

Oftentimes the most difficult thing we can do is to ask for help. It is usually seen as a sign of defeat or that you have failed to understand something you were supposed to learn. While this may or may not be true the attitude in which you ask for help can greatly influence how you get a response. Therein lies the importance of asking “Smart questions” as dictated by Eric Raymond in his article “How To Ask Questions The Smart Way” originally published in 2001 however it has been updated repeatedly since then. Raymond specifically focuses on how one goes about asking questions about tech using forums, email lists, ect. This is something incredibly pertinent to the field of software engineering, where communication is almost just as important if not more important than the actual engineering or programming. The ability to efficiently communicate what problem you are having, what you have tried, and what you think may be the issue without sounding defeated or needy is a tough skill to learn however it is incredibly important if you have any hope of getting a helpful answer. This skill will be useful not only online when utilizing a forum to ask for help, but also when asking questions on a team, weather its because you actually need help with something or just need to know about some other part of the code that you aren’t familiar with, clear and respectful communication is a vital aspect of any software engineers toolbelt.

Lets look at an excellent example of this from Stack Overflow, posted in 2012, the question asks “Why is processing a sorted array faster than processing an unsorted array?”. There are so many things that are great about just the title of this question alone first off, the question is fairly open ended, to the extent that there could be multiple reasons why a sorted array would be faster and none of them are going to be very basic answers like “turn it off and back on again” there will be some nuance to writing a response. Secondly, the question is asking about the general concept rather than just asking “why does my code not run like I want it to” which is something that is all too often seen on forum websites. The other great part about asking about the concept is that when other people come and search for concepts related to processing arrays and their efficiency, they can be linked to this question and will either have their problem solved or at the very least gain a better understanding as to what their real problem may be. As we start to read the content of the question, we can see that everything is well formatted, the user has even gone through and tested the issue in multiple ways before asking and includes these attempts in the question description in a succinct manner. At the end of the post the user gets very clear what they are asking about and links some other questions similar to this one (although this may have been added after the fact). The question is also asked in the right section of the forum and the code included is clearly written and commented so that anyone who knows enough about the language can read it with ease (i.e. no silly variable names or crazy one liners).

The response from the community is clear as well, all the answers to this question look like they are straight out of a textbook with how well they are written, there are pictures, examples, analogies and even benchmarks with how this problem is handled across machines. Additionally, the question has been repeatedly updated throughout the years to the extent that at the time of writing this, the last edit was made 3 months ago despite the post being well over 12 years old at this point. All in all this is a wonderful example of what can happen when you are clear with your wording and explain what you are confused about.

On the other hand, let’s see what can happen when you are not clear. The official title of this post is “How to use for loop in django email template”, however when you open the post you are greeted by a section of text all bolded and in a large font that contains a number of grammatical errors that do not clearly show what the user is asking for. Following that is the classic sign of a question being poorly asked which is two sections of code with very few comments or context provided as to what they do or why they are here. After that the post is completed, with no closing remarks or clarification as to what is being asked. There are obviously not any responses posted yet and I doubt there will be in the time coming, most likely the post will be flagged for poor formatting and the user will be asked to resubmit the question again.

This is a great example of remembering to stay calm when dealing with a problem, this user is probably quite stressed about this issue, as is quite common in software engineering and programming in general. However, a few more moments of thinking, rereading the post, looking at how it is formatted before posting it can do a world of good when trying to be respectful. I would like to end with an adage that I think is quite pertinent to this topic:

“Think before you speak”