Smart Strategies

22 Jan 2024

My Experience

As a student who is merely minoring in computer science with a stronger background in the natural sciences, about 90% of my time is spent asking questions about programming, algorithms, and mathematics I can make no sense of. Whether it be to my professors, TAs, peers, or even to online sources like StackOverflow, I will ask questions about anything and everything I am not fully confident about. However, as time has passed I have learned that asking questions in itself is a sort of art form. At the very beginning of my career as a computer science student, I didn’t even know things like StackOverflow existed, let alone how to ask effective questions on it. What I did know was that it was a godsend. I was ecstatic at the idea of a public forum that was built specifically to help people with programming. It was exactly what I needed! Until it wasn’t. My first few tries at asking questions on StackOverflow were met with comments from users not answering my question, but instead asking me questions. It would take several days for me to get a proper answer because of the back-and-forth I had to engage in to clarify my questions. Soon I realized that not only did I need to improve my programming skills, but I also needed to figure out how to ask smart questions.

On Smart Questions

A great example of a smart question can be seen in this example on StackOverflow.

The user asked a question about arrays in C++. They specifically ask why processing a sorted array is faster than an unsorted array in their code. The user follows the suggestions established by Raymond. They are asking a question about programming on the relevant site, StackOverflow. The title is specific to the question and is not overly general: “Why is processing a sorted array faster than processing an unsorted array?”. In the header, the user specifies the data structures they are working on, sorted arrays and unsorted arrays, and even specifies the programming language below that as C++. The question is written clearly, and is grammatically correct. They are precise about their problem, asking exactly what they are confused about. The user also supplies us with accessible formats and resources by embedding a portion of their code into their question. Additionally, this portion of the code is not overly long and only includes the parts significant to the question. Finally, the user doesn’t merely pose a problem, they also illustrate their attempts at solving it. They tell us what they did, what went wrong, and their ideas of fixing it before asking for assistance.

As a result, this user’s question has an immense amount of views and answers from people all across the StackOverflow community. It was viewed over a million times and has multiple different in-depth answers in its replies.

On Not-So-Smart Questions

An example of a not-so-smart question can be seen here.

This user posted a question on StackOverflow that was closed by the site moderators themselves. They have few responses and no answers. They ask the community to help them solve an algorithm proof of the “half-circle property”. Their first mistake was to post a question about algorithm mathematics on StackOverflow, a site that is primarily used to help with programming. Next, their title is too general. They merely state that they have a problem but they do not say what said problem is. Additionally, they provide little to no context or resources about the problem. There are 2 single lines of statements that have to do with the question and nothing else. Finally, the worst problem they have is stated in the note on the website. The problem was closed because they asked more than one question in one post. It is not good practice to do this because you run the risk of losing specificity in your descriptions when you try to cover multiple problems you are having in one post. Moreover, it makes it harder for other users to answer you when they have to address multiple different solutions in one comment.

As a result, this user received no set answer to their problem and only three responses. Two of which prompt the user to edit their question into a better one.

What Have I Learned?

As I continue to use online resources to aid in my education, StackOverflow has quickly risen to one of my favorite places to reach out for help. My experience with it has made me realize that smart questions are one of the most important learned skills of programmers because of how detail-oriented our work is. The more detailed the question, the more detailed the answer you will receive. And sometimes, while I figure out what questions to ask, I end up coming up with the answer myself in the process. Smart questions make a smart student.