How to ask good software questions

How to ask good software questions:

 

How to ask questions when you work as a programmer?


The best software engineers never stop asking questions because they know it is the most efficient way to gain deeper insights into the projects they are working on. You should specify requirements by asking the right kinds of questions, based on the problem you’re trying to solve. If you keep raising questions, you will keep finding better answers and implementing exactly what should be done. You will never misinterpret any requirement.


If it is obvious that asking questions is such a powerful way of learning, why we hesitate to do it, why questions are so hard to ask?

Unfortunately, most developers are lazy. They assume they know all the main things they need to know and they don’t bother to ask for more. They remain certain in their assumptions and don’t event think what exactly needs to be done.

Moreover, programmers are afraid that by asking questions they will look weak, ignorant or unsure. They fear that asking questions might introduce uncertainty or show them in a poor light. In fact, asking questions is a sign of strength and intelligence, not a sign of weakness or uncertainty. Great leaders constantly ask questions and are aware of not having all the answers.

Finally, some people are in such a hurry to get things done so they don’t stop to ask questions because it might slow them down. They risk rushing headlong into the wrong actions.

When you ask a yes or no question (should I?, do you?, does it?, is that?), you will, more often than not, get very short and insufficient information. You will most likely know whether something is required and must be done but you won’t know the rationale. Instead, ask a follow-up question (why?, how?). By using an open-ended question, you get insights and additional information you might not have known existed. These questions let people give some thoughts to their answers and provide much more details.

Instead of asking:

Do you think this feature is important now?

Ask:

Why is this feature important now?

Be aware why to do something instead of just what to do.

You may have to ask the same question a few different ways before getting a response which gives you the information you’re looking for. These are likely not well-thought questions. By asking them, you are helping others rethink what they really need.

If they appear annoyed that you are asking so many questions, it may be because they thought they had it all gone over. You just made them realize they haven’t even begun to figure it out.

The truth is, it is possible some people may get frustrated with the questions. Don’t let this deter you. It isn’t personal, you have a job to do, and clues you need to gather.

Explain why it is necessary to truly understand the problem. You are all here to solve it together so explain that in the long run it will likely save a lot of time. Thank them for their understanding and cooperation (even if they are being quite the opposite of cooperative).

Don’t give the impression you are trying to prove them wrong. Approach the conversation with genuine curiosity and a lot of empathy. You are both working toward the same goals here! Be as polite as possible when doing it. This way you show the respect to that person.

When asking a question, you have to know what you want for an answer so make sure you put it in the right context. You need to also make sure this is the right person to be asked. People like to give the impression they are decisive and in command of the relevant issues.

You may waste your time just because you asked a wrong person and you got an invalid decision. After that, it turns out someone else has better insights into the feature and it should look completely different, thus it needs to be totally redesigned now.

How often have you found yourself seated in front of your computer speculating about what your client or potential users think about something? How often have you used your assumption to make a point to support a recommendation about what you should do in terms of developing, improving, adding or eliminating a feature?

It’s an easy trap to fall into and we all do it. Sometimes we even qualify as a member of the target group we’re speculating about. But our personal, and generally limited, experience is usually not enough to represent a solid information to base go-forward implementation on. We need to ask them! We need to ask our client or even users to ensure we will have a valid decision.

Most people spend too much time talking and too little time listening. They could get much more done with their team by listening more. Don’t interrupt the person with whom you are talking. Interrupting stops their chain of thought and directs the conversation the way you want, not necessarily the way it should go. It also tells the person you don’t value what they are saying.

Start getting comfortable with asking a question, waiting for response, listening to the response and then waiting a bit more. Many times the person you are questioning has more information and will bring it out when you wait for it. You have to get used to that silent period before the dam breaks. People feel a need to fill the holes in the conversation and often they will then bring out the critical bit of information you seek.

Ask relevant questions to make sure you understand. Paraphrase what you think the other party is saying with responses such as: “What I’m hearing is…” or “Let me see if I’m following you…” Reflecting back what you’ve heard signals you’re attempting to understand fully. Say something like, “I want to make sure I understand you. What I heard you say is…” and then bring them back on point to the point.

Asking questions is hard. Asking amazing questions is a skill like any other skill — it takes practice to master. So just get started practicing by asking more and more adequate questions. Your skills will improve over time. Remember, if you want good answers, they will come by asking proper questions.

Subscribe to get the latest content immediately
https://tinyletter.com/KamilLelonek

Further reading

I‘ve already written two related articles you may be interested in:

How to Ask Great Technical Questions

Or non-technical, if that’s what you’re in to

Reed Rawlings
Jul 3, 2019 · 8 min read
Photo by Camylla Battani on Unsplash

I’ve been working as a support analyst in Looker’s Department of Customer Love (DCL) for the past six months. In the last 12 weeks alone, I’ve taken over 600 questions from our customers. Before that, I worked as a data analyst for five years, taught students, and spent countless hours answering questions on Reddit and StackOverflow.

My experience has exposed me to a broad range of questions — some completely lacking thought, others answering themselves. But, when I think about great questions, I focus on the time it takes to get to the next steps, not just a resolution.

It’s because of this that I believe great questions flow. They provide relevant context, the question itself is clear, and they share what has been tried so far. Poor questions force both parties to open a back and forth dialogue while they nail down the issue. You end up spending a lot of time thinking about the question itself, rather than finding an answer.

Disclaimer: This is how I would love to see questions asked. More so now that I answer 15–20 a day. But, this article in no way represents how customers need to or should approach Looker or DCL with questions.


Give Great Context

This happens all the time. I see it on Reddit, at work, and in conversations with friends and family. If you’re seeking help, you need to provide context. This means keeping the scope of your question to the relevant information. If you’ve got a question about syntax, your business case probably isn’t relevant.

Everyone at StackOverflow and I want to know the following:

  • The language and dialect you’re working in, especially if we’re working on a coding error.
  • The exact error message or issue with what we’re seeing, what your goal is, and what you’ve tried as a fix already.
  • If it’s a git issue, who’s your provider?
  • Seeing a permissions issue? What access controls are you using?
  • If you have constraints around solving your problem, what are they?

“A prudent question is one-half of wisdom.” — Francis Bacon


Share the Documents You’re Using

If you’ve got a document, post the link. If you’re stuck at a particular step, share it with me. I want to see what you’re seeing so I can make sure we’re on the same page. DCL, StackOverflow, and your peers are all going to want to know what you’re working with. It provides extra context you may not know is important. Don’t waste time waiting for them to ask — bring the link along with your question.

If you’re ever “following along with a guide” or “see something confusing in the documentation” those are the exact times you should be passing links along.


Describe Your Goal

Alright, you’ve got a “quick question.” Something “super simple” you want to do as part of a broader aim. A simple solution may be the linchpin to your entire approach and also impossible. But, that doesn’t mean someone can’t find another way to reach your goal.

I had a customer come on who was brand new to Looker. He wanted to create a table of dates and their difference from today. He wanted to know how we could use DATEDIFF to implement this and then save it as a persisted derived table in Looker.

To me, this was an odd request, and I was a bit hesitant to dive right in. From his description, this seemed like something innate to Looker we could implement far quicker in another way. So, I asked, what’s your end goal?

“I want my users to be able to filter by a specific number of days from today.”

Great, that’s super simple. So, I asked if he was open to another solution. He was, and I showed him how intuitive Looker made this in the UI. It took a couple of minutes to pass along the documentation and provide some example syntax, and he was good to go.

With a straightforward question, what could have been an exceptionally long and challenging chat turned into a five-minute explanation.


Ask a Question

Yes, that’s a real issue. I’ve done this exact thing on StackOverflow countless times. It might seem silly, but it’s effortless to do. People believe that context is the same as asking a question. More often, it convolutes things. Here’s an example:

“We’re a medical supplier whose primary customers are hospitals and individual practices. We often see folks ordering the same item over and over again, but we’re having a difficult time understanding why. We assume it’s because they’re going through the product so frequently, but in some cases, the ordering doesn’t make sense. We’re worried that the items we supply aren’t of high quality or possibly aren’t being used appropriately. Or, even worse, we’re getting bad data. We’re trying to analyze this data, but we’re having some problems.”

I can definitely see how that could be challenging, but I don’t know how I can help. I could make up a ton of questions from the paragraph, and they could all be off the mark.

That paragraph forces the person you’re asking to respond with, “Alright, how can I help?” Which is fine, but not ideal.

Typically, in this situation, people don’t know what they need. And that can create a frustrating situation for both parties because they end up circling around this ephemeral topic rather than solving a specific issue. When I’m on a chat, I’m happy to narrow things down. But, that’s not going to be right for your peers who need to get their work done or the folks at StackOverflow who are helping for free.


What Is Your Issue?

I can’t count the number of times someone has told me, “I have an error” or “these results aren’t right” with nothing to add. I don’t understand why. How am I supposed to help if I don’t know what’s wrong? I can’t see your screen, and I can’t read your mind. I need to know what the issue is.

I see this all the time on Q&A forums for Excel and other coding languages. People will say, “I’m using this formula, and it doesn’t work. Why?” Oh my Silicon Valley, what doesn’t work? Does the output look wrong? Is there an error? Does your computer shut down?


Read Your Error. Please, Read Your Error

“To err is human — to blame it on a computer is even more so.” — Robert Orben

Errors can be scary. I totally get that. Sometimes, they lack useful information and finding a solution based on them feels impossible. But, that doesn’t mean you shouldn’t have to read them. Designers and developers work on error messaging — they know just as well as you that a vague error is frustrating. They strive to give clear instructions. Here’s a great example from the Athena DB:

Amazon Athena

It’s great because it tells you exactly what it expects when using that function. That’s clear guidance on where you should look. Even if you don’t understand what that error message tells you, you can at least explain what part is confusing to you.

I want to take a brief moment here to mention a distinction between bugs and errors. An error is an error. Sometimes a bug will cause an error to happen, but they aren’t one and the same. Without more information, all an error means is that something somewhere isn’t running correctly.

It may be a bug, but it’s just as, if not more likely, that you’ve done something wrong. And that is totally OK. We all make mistakes.


Research

If the total amount of time passed between you hitting a roadblock and calling for help is under five minutes, there’s a good chance you haven’t done enough research.

That’s not to say you can’t seek help from a colleague or the internet, but they’ll probably have to spend an equal amount of time learning about your issue and teaching you the problem before they can solve it. From there, they’ll have to show you the solution to help you avoid the same issue in the future. That’s a lot of time spent on what could be a relatively simple issue.

Far worse, it’s going to undermine your learning completely. If you’re consistently in a state of “just fix this,” you’re not allowing yourself to learn something new. You’ll end up ingratiated to outside help.


Be Flexible

What you want may not be possible. If it is, it may be significantly more complicated than you think it will be.

A great example of this is nested aggregates in SQL. In Excel, something along the lines of SUM(AVG(value)) is rather simple. I define some grouping logic, and it’s done. The same is true for R. Overall, they feel intuitive. With SQL, you generally have to write a subquery which can feel advanced and abstract for beginners. Once you learn more about SQL, though, you quickly understand why things are done this way.

Every piece of software, coding language, or hardware has some inherent limitations that allow it to do something better than its competitors. Whatever line of work you’re in, you’re going to run into that roadblock. When you do, embrace it, understand it, and learn to work with it. It’s not going away anytime soon.


After You’ve Written Your Question

When you’re done drafting your question, imagine you have to answer it. Is there enough information, is it formatted well, can you cut anything out, is the question you’re asking clear? If there’s something unclear to you, spend a few minutes rewriting the question. You’re going to be intimately tied to your problem and underlying goals — let them guide the structure of your question.

While in this process, you may just rubber duck yourself to the answer. And that’s a beautiful thing. Sometimes we believe our understanding of technical behaviors is far more complete than it truly is. Walking yourself through the behavior you’re seeing is a great way to know if you actually understand what’s happening.


Using These Guidelines

I don’t expect every question to follow each of these guidelines. If I did, I’d probably never ask a question myself. When you’re stuck on an issue, you’re bound to be stressed, and that will limit your critical thinking. It can make your complicated explanation seem straightforward because you’re familiar with the problem. It can make you feel hurried and your tone brash.

But, if you can incorporate a few of these principles in each question you ask, you’ll become a question-asking machine that folks will love to have around.


Example

I’m going to borrow from the Athena example above, so we know exactly what we’re referencing. For my own ease, I’m assuming this is a question from a customer at Looker, but anyone should be able to follow along.

“I’m getting this error <screenshot or message> the issue is, I’m casting this datatype to a bigint using the following syntax,
sql: SUM(${weight} :: bigint)

I’m using these docs to build this. All I’m trying to do is get an average weight measure to group on our customers and other fields. What do I need to do to change my type?”

This question gives great context, shows I read the error, gives an example of what I tried (input), and includes the documentation outlining why I tried it. I shared the end result I expect to see and that demonstrates what workarounds may be viable. Finally, it asks a specific question.


Resources

Aside from my own experience, I styled this guide with inspiration from Jon Skeets post on the same topic for SO users and this YouTube Video, “How (not) to ask a Technical Question.”