Improving Communication and Code to Solve Errors
We have all had times where we didn’t know something so we did the old fashion thing and googled it. And I bet you nine out of ten times your solution was on StackOverflow. StackOverflow is an online forum where coders can post a question or problem they are having and receive help from someone in the community.
Unfortunately, StackOverflow has lately been known to be occupied by a bunch of armchair experts who are full of information but are guilty of condescending deliveries. This has been exacerbated by StackOverflow’s reputation system, which gives more users to site features like commenting and downvoting. People trying to up their reputation will end up just taking action for the sake of reputation points. This leads new users, who don’t have the ability to comment or contact more experienced users and coders, to feel hopeless or/and helpless.
After a few years of frustration with the site myself, admittedly much at the fault of my own, I began to teach myself the proper etiquette when posting a question with the hope of getting better responses. After going through the extra work of formatting, proofreading and using the proper StackOverflow conventions, I realized I answered my own questions more than half the time. This improved my writing, my coding and even my own reputation.
This is what is to gain from writing and answering your own stackoverflow posts:
- Explaining what you expected, want, and need
- Identifying and vocalizing the problem
- Consolidating Research and Open discussion
You are about to externalize, as well as add documentation, to an internalized process. When we code we have an image or concept in our mind about what we hope to have as a final product. Then as we begin to code do we really start thinking what needs to be done and start beginning a checklist of things to do. But then the checklist grows rapidly — ‘node app needs to be scaffolded’, ‘start creating the database’, and ‘start adding my routes and resources.’
It’s good when posting to these sites to think about it as if you’re in another user’s shoes. Think about what is most likely going to make you respond and offer a solution or explanation. These users are there answering questions for no real benefit to themselves than reputation points. If it’s too difficult to understand and answer your problem why would they invest in the time to do so?
Explaining what you expected, want, and need
You really should start out with what you hoped, wanted, or need. More than ninety percent of the time do people even know what they are really trying to achieve. This goes by the good salesmanship way of thought that rarely does the customer know what he needs — rarely do new coders think in depth about what they are trying to implement. Take the time to write out your title try and make it small and concise. A good headline will give a lot of context and make an answerer aware of what the post might entail.
Identifying and vocalizing the problem
Now let’s get into the description of your problem. First explain what you want to do and hoping to achieve. Do you want to sort a list? Send a request and receive a response with certain type of data? For anyone to really be able to help you they need to know your goal.
Now explain what you were expecting. Were you hoping for an image to appear? Were you hoping for the list of integers to be sorted?
Post Your Code but Not the Whole Project
The next part is to post the code itself. Now this part gets a bit trickier. Users often wonder how much code should they post. Do you post the entire project or do you post just the function that throws the error?
Because programming can sometimes involve a lot of moving parts I would say the more the better but posting an entire project of code would often deter many away from providing any help.
I usually post the function that throws the error and the part of the code that calls that function as well as any portions of config files that are connected to libraries the function might use. It’s okay if you don’t post enough code you can always add more when requested. Just be sure to add enough so someone can trace back the errors by eye.
I also tend to break up a long piece of code into blocks and explaining each block. Once again not a lot of people are going to have the motivation to read a large chunk of code.
Post The Actual Error
Next post the error you’re receiving. Often when I help someone they try explaining their problem with little context, and more often than not do they actually even show me the error they receiving until I ask. A good way to get help for a problem is by showing the actual error you’re getting.
Your chances of someone providing feedback increase as you explain what you tried to do to solve your problem. It prevents people from telling you what you already know, and from getting to know what your real problem is quicker. Plus, people usually don’t like to help those who can’t first try and help themselves.
Consolidate Knowledge, Discuss and Update
Once this is done and you have exhaust all your resources then I would submit the question. I usually keep working on my problem even after submission and just add new information as I go. Usually I get people who comment that provide me some guidance. Then from there I am able to get a better understanding of my problem. I constantly update the post with the latest information so that I don’t get a million responses saying the same thing.
If you look at my own stackoverflow posts I may not have many upvotes on my actual posts, but I do have a lot of responses or I usually answer the question myself within a week or two. If I wasn’t able to answer my question I usually had someone help me out and give me a greatly detailed answer. I respond to the detailed answer with my own updated explanation.
By posting to StackOverflow you are identifying your problem. You have to vocalize your problem and write it down. Usually when we run into a bug we just have to know what’s wrong in the context of our sight — “whoa, this image was suppose to appear” or “I got a compile error.” This process has not only improved my programming and computer skills but even my communication skills.
By answering my own questions, making good posts, and engaging with the community my own reputation went from 40 points to 190 points in just one year. But more importantly, I now have each one of my problems well documented and I was able to come up with the answer on my own. My writing skills also greatly improved.
It can be a bit scary to ask for help especially on public forums but if you ask properly in the end you may find the help you need was from yourself all along.