The Benefits of Asking Smart Questions

05 Sep 2023

Why Ask Smart Questions?

Asking smart questions as a software engineer is important when trying to come up with solutions to a problem. By specifying what one needs help on, others are able to provide helpful hints or answers in an efficient manner. Asking smart questions and providing background information also showcases your current knowledge on the problem and lets others know how one wants the problem to be solved. Furthermore, smart questions expand one’s knowledge on a topic and creates a collaborative learning environment with other software engineers, as other developers may have the same question and can learn from the information given by and to the original developer.

A Smart Question

An example of a smart question on Stack Overflow is given by a user who is having compiler issues. This person is having trouble compiling code using the “C/C++ Compile Run” extensions in Visual Studio Code. The user explains what they do when trying to compile the code and shows the error message they receive. The developer also explains what type of compiler they’re using, a cygwin64 compiler, and what type of operating system they’re using, Windows 7. They also show their extension settings and packages they installed within cygwin. Additionally, they describe the different methods they used in an attempt to solve their problem. The user tried different solutions such as reinstalling cygwin, reinstalling the extension and checking the system environment variable PATH. However, despite their attempts at solving the problem, they still have compiler issues, prompting them to ask others for ideas on how to fix their problem and/or why they are receiving this error.

By giving a detailed description of their problem and the solutions they tried out, other users were able to give helpful feedback. One user gives an in-depth explanation about who and what VSCode is made for and why their code isn’t compiling, citing the reason that Windows 7 is an older, no longer supported platform. Another user points the writer to a tutorial while someone else recommends using Linux or Visual Studio Community, as it comes with everything included and configured from the start and running the installer will allow them to compile their code. These tips help the original user by explaining that their operating system and compiler is outdated and offer potential solutions by suggesting other platforms the original user could use.

A Not-So Smart Question

An example of a not-so-smart question is given by a developer on Stack Overflow who coded in Java and received an error message when trying to convert a string to an integer. When trying to convert a string to an integer, the user received an error that said “bad source file: .\Integer.java file does not contain class Integer”. Although they clarify the error message, the user only posts a snippet of their code and doesn’t clearly explain what their code is supposed to do.

As a result, other users in the reply section ask the developer to post more of their code or a reproducible code sample that will allow other users to reproduce the original code’s issues. However, the original user does not follow up with these requests. Furthermore, one user tries to help the developer by explaining that a chunk of code can be replaced with just a few lines of code that would produce the same outcome. However, although the developer thanks this user for their help, they explain that they’re not allowed to write a program with a few lines and only wants to know where they made a mistake in their code, hinting that this may be a homework assignment. Furthermore, this shows that the user wants someone else to solve their problem for them rather than wanting to solve it together with other users and learn from their mistake.

Gained Knowledge

By looking through various questions on Stack Overflow and reading through an example of a smart question and non-smart question, I learned that it’s best to fully describe the goal of the program, the problem at hand, the steps one has taken to solve the problem, and how these other steps were not helpful. If one has tried out other solutions before asking for help but does not specify this, other people trying to help the developer may give information the user already knows or tips that don’t relate to the user’s intended question. By giving detailed information about the problem and failed solutions, others may know how to help fix the problem or provide helpful tips. This also helps others give answers that get straight to the point since they’re aware of what the developer may or may not know, allowing the developer to have a higher chance of receiving the type of help they’re looking for.