As a fledgeling programmer, you will run into a lot of cryptic error messages. Unfortunately, these error messages are often not very helpful for fixing the problem with the code. It can be incredibly frustrating to try all solutions under the sun until finally nailing what caused the programme to crash. Fortunately, there is a lot of help available online that makes it much easier to solve these pesky problems. However, mailing list and online message boards are often a bit intimidating. Asking a “stupid” question or forgetting to provide crucial details can rouse the scorn of other users. So, here is a handy guide on how to ask for help with your programming problems online. As a bonus, following these steps might help you to solve the issue on your own.
1. Isolate the problem
Do not fall into the trap of just dumping your problem in an online forum. It will not go down well if you just post your entire code and its output there. First, the message board is not there to do all the work for you. Second, there is no added value for other people if they can’t extract the similarities between your issue and theirs. Instead of the ‘this doesn’t work, please fix approach’, try to isolate the problem. For instance, find at which line the code fails. This is usually apparent from the error message. Then, check if there any syntax mistakes, i.e. are there any obvious typos? If the line contains a function call, check if the input to that function exists and if it is the correct variable type. If you are using your data, check if the code works with tutorial or dummy data. If not, it might have something to do with your data.
2. Create a minimal working example
The easiest way for others to help you with your problem is if they can recreate the problem. The minimal working example is the shortest bit of code that produces the error that you are experiencing. Now that you have isolated the problem, strip down the rest of the code to this minimum. In most cases, this will only be a couple of lines of code.
3. Describe the problem
Add a description of the minimum working example. The description should include a version number for the language you are using, e.g. Python 3.6. It can also be helpful to include exceptions if you spotted any, e.g. it works when running it with example input #1 but not when using example input #2. Together with the code example, this information should be enough for anyone to understand and reproduce the problem.
4. Posting etiquette
Before asking for help, you should carefully check that this question has not been answered already. For instance, Stack Overflow has a massive archive of previous questions and their answers. It might take some digging, but now that you have a clearer understanding of the root of the problem, it should be much easier to find out what is relevant. Also, make sure that you check in the right forum. For instance, if it is a problem with programming in Python, check a Python forum. However, if the problem has to do with the content of what you are trying to implement, an engineering or maths forum might be a better bet. Also, if you have problems with a particular package, e.g. ggplot in R, check if there is a dedicated forum for that package. Many of the bigger packages or modules have dedicated websites.
If you haven’t found a solution, get ready to post your question. Similar to the advice above, consider which forum is best suited for your problem. Be a good online citizen and do not post the same questions in different forums at the same time. It’s wasting people’s time if they are answering your question that has already been answered elsewhere. If it turns out that your first choice forum is not particularly well suited, close the question before posting it elsewhere.
Follow-up after posting the question
People may ask additional questions to get more information about your problem. Try to provide this wherever possible and state if it is not possible. Don’t feel like you need to respond immediately. Questions on forums often serve as a record for other people with a similar problem. Therefore, it is more important to include accurate information than to provide a fast response. When you found a solution, acknowledge that on the forum. For instance, on Stack Overflow, you can accept an answer to your question. If you solved the problem by yourself in the meantime, add your solution for the benefit of other people who may experience the same problem.
With these steps, you should get helpful suggestions from kind strangers over the internet without stepping on anyone’s toes. Of course, any IT support will also appreciate it if you follow these steps when contacting them. Happy programming!