Play Silly Games, Win Silly Prizes

09 Sep 2021

A PG-version of the common phrase succinctly describes the value in asking smart questions as a smart software engineer. When one asks a silly question on forums such as Stack Overflow, the questioner should not be surprised if at best the question does not get answered and at worst gets sordidly criticized by developers sitting behind a computer. To avoid wasting everyone’s time and successfully getting the answers we desire, it is important to ask smart questions.

Ask silly questions, get silly answers

As an example of what not to do, I deliberately searched on Stack Overflow “javascrit” in hoping I would catch a terribly asked question and as luck would have it, I caught quite a few. This particular one is titled “How to Visual c++ like javascript date?” and at first glance, the subject header does not even make grammatical sense no less briefly explains the key problems. The body of the question fails to elaborate on what the questioner is asking: I am copying it here as it is so short, “Visual c++ like Javascrit (new Date()).getTime() function? Function return (1475262776012) milliseconds.” There is no obvious question asked, there is a typo in “javascrit”, and there are clear grammatical errors. And expectedly so, there are multiple comments lamenting about how terrible the question is, with one even stating that it is obvious the questioner is new to Stack Overflow and that they should know how to ask questions. There is also no courteousness about answering the question and coupled with the question’s vagueness possibly explains why the question has net 3 downvotes. This is also a obvious case of RTFM (“read the (f-expletive) manual”) and STFW (“search the (f-expletive) web”) as the top answer was easily Google-able, assuming that the unclear question was indeed asking for that specific answer.

Ask and it shall be given you; seek, and ye shall find

On the contrary, if one asks a smart question, oftentimes the answer received back will be incredibly helpful not only for the original questioner but also other inquisitive people surfing the web. One such example is this question that has been viewed a whopping 1.9 million times, 5658 upvotes, and 1958 bookmarks: “Which equals operator (== vs ===) should be used in JavaScript comparisons?”. Of course, the question is not particularly complicated and possibly a case of STFW but keep in mind this question was asked 12 years, 9 months ago, and so the same resources available now may not have been back then. Starting off with a clear and straight to the point title, the body is also descriptive and explicit enough to specifically ask about the performance benefit to the using of == compared to ===. There seems to also be obvious prior inquiry into this issue and the questioner is open to “any performance improvement”. And so, in typical fashion of Stack Overflow, the top answer really answers well the original question and provides not only two example scripts but also a truth table to show the difference between == and ===. Despite the relative shortness of the question, it has evidently been helpful to many a reader and the numerous excellent answers show the willingness of the community to engage and provide additional insight to the original query.

Knock, and it shall be opened unto you

Now, I may be biased as I have yet to post a question on Stack Overflow and so cannot confirm nor deny whether I would be a smart questioner but that is also because I truly STFW out of what I need to ask before asking anything. Despite my lack of questioning experience, from this vantage point I can safely assume that any future questions I ask will tend to the smart side and veer away from the silly side.

PC user image source; Stack Overflow logo source