When writing code, you often meet errors upon errors. Sometimes you even find yourself writing solutions to bugs and issues that themselves contain errors. In times like these, it can be frustrating due to a complete lack of direction towards what you are even trying to fix. In this way, it can be extremely helpful to seek guidance from others, by asking questions.
Telling when to ask a question regarding code can be difficult. This is due to the fact that solving bugs and errors is simply a part of computer programming at its core. When you stumble upon a problem, your first thoughts should be to solve them yourself. However, this doesn’t always work. When this occurs, you shouldn’t always start by asking your question to others. You should instead begin by searching for documentation regarding the code you’ve implemented. This can be on manuals, found across the web, or even from other people who have asked similar questions before. If you have tried these options yet still find yourself stuck, then it would be a great time to ask for help.
Questions and Queries shouldn’t be vague or poorly worded, as these can limit others’ ability to help you. They should be to-the-point, specific questions that directly state your request for help.
One example of a well-asked question is shown in the first citation. In it, a user requests help on reading a txt file after writing on it. The user clearly states the coding language, Python, and shows the point in the code causing the error, and all related parts. They also concisely state the issue they are trying to fix and are polite. This leads to an efficient response which properly solves the problem of reinitializing the file variable to read the newly written parts. Through the proper formatting, the question was quickly resolved in an efficient manner.
One example of a poorly-written question could be simply asking “why is my code not working properly” with a screenshot of your entire code. This would be a poorly-written question because it doesn’t explain what you need help with solving. It also doesn’t allow users who interact with the question to test the code presented, since it’s a screenshot rather than text. Responses to this question would likely be inefficient due to requiring queries such as what language the code is run in, the error seen, or what newly added code could have caused the issue. This would slow down the process of solving the issue at hand or even prevent it from being solved at all.
Overall I’ve learned a great deal from this effort of writing proper questions. It’s often best to learn the tools related to the current problem you are facing. This way, even if you don’t end up resolving the issue, when asking for help, you will be more informed and able to create a more direct and helpful inquiry. It’s also good to paste your code that is facing issues, rather than screenshotting, so that others can replicate your issues to better solve them. Through these efforts, your ability to ask questions will greatly improve, leading to better and faster answers.