While asking questions may seem rather simple, asking technical questions is actually really complex. Understanding these complexities is vital to your success. Let's explore a few tips that will equip you to ask technical questions in our Discord server, Stack Overflow, and in your future workplace!
Learning how to find the root of a problem, which is often referred to as a bug, is a vital skill for developers. Believe it or not, but when you get a job, their code base will have a number of bugs! Matter of fact, it is very likely that you will be assigned a handful of bugs to resolve to help you get acquainted with the code base. Therefore, it is important for you to practice finding the root of bugs in your own code, so we have some tips on How to Help Yourself Before Asking Others.
Once you have done your own legwork and chose the most relevant help channel, it is time to begin writing your very detailed question. In addition to explaining how you need help, the first piece of additional information that you must provide is explaining the big picture of what you are trying to do.
It is a common misconception to keep your questions short and concise so that you do not waste anyone's time, however there is usually a lot more to your question than you realize. If the person that is helping you knows the big picture, they are more likely to know if your problem is going to solve the big picture issue, or if it would be better to steer you in a different direction. This is commonly referred to as the “XY Problem”, which is a common pitfall for programmers to overcome as they learn how to ask detailed questions.
The second piece of additional information that you must provide is the relevant code, error message, terminal command, server output, etc. There are multiple ways to share this information depending on what your situation calls for, but you should never post a file for people to download.
If you are asking a question about code, you should provide it in a way that others can easily run it. Here is a list of our recommendations:
You may not have used the above resources before, but they are essential to making it as easy as possible for others to help you. Before you share your code, make sure it reproduces the problem that you are describing. In addition, if you are working on a large project, it is very helpful to isolate the problem to a small piece of code and only share the problematic code. If that is not possible, you should at least point to the exact function, method, or line number.
If none of the above ways make the most sense to provide the relevant source, here are a few additional ways to provide the relevant information.
!codein the #bot-spam-playground channel.
If your question does not provide the relevant source, you will only receive theoretical and vague answers. This often causes frustration for everyone. You may become frustrated because the answers are not helpful. Those helping may become frustrated because as you add new information, the meaning of your original question changes and they wasted time trying to answer it. If you truly want to ask a purely conceptual question, you should indicate this in your question in lieu of a relevant source.
The final pieces of your question needs to focus on providing all the surrounding context, such as:
If you'd like to read more about providing all of the surrounding context in your question, you should read one of our favorite articles, How to be Great at Asking Coding Questions, by Gordon Zhu.
Everyone in our Discord community is a volunteer. Our community includes those that write and maintain our curriculum, professional software engineers, and others that are working their way through the curriculum. We hold every user and their questions to similar standards as Stack Overflow, which is the world's most popular programming help resource.
Most of the time, your question will not just be provided with an answer. Instead you will have a back and forth conversation leading you to your own answer, a lesson to review, a resource explaining something in more details, etc. If this approach is different than you expect, you should read How to Help Others Solve Coding Problems
If you ask a question without providing enough context, you will be asked clarifying questions to gather all the relevant information. We occasionally see people taking offense or being impatient when asked these types of questions. Be assured that these questions are part of the process to avoid the frustration of helping someone with an incomplete picture. Your question may seem obvious to you, but it is often not obvious to someone with more experience.
Our curriculum and Discord community highly values helping you stand on your own two feet without holding your hand. Adjusting to this approach can be difficult, because it is different from the majority of your educational experiences. If you develop a pattern of asking vague questions or other “help vampire” behaviors, one of our moderators will privately address this with you.
One of the biggest benefits of taking the time to write a very detailed question is that you will occasionally solve your own problem. This is one of the best outcomes to have! You should celebrate this achievement and consider documenting the problem and solution in the
README.md of the project that you are working on.
If you do not find your own answer, following these tips will allow others to help you as easily as possible. It is highly recommended to review these tips each time you ask a question, at least until it is second nature to always provide this level of detail.