How to StackOverflow

Simon van Endern
2 min readDec 23, 2020

This is gonna be a brief one. You all know StackOverflow. (If you do not, check it out on stackoverflow.com. It is THE one site for any question in the world of software development). The common procedure is typing your question in google and then clicking on the StackOverflow link. We could wonder, why we do not go directly to StackOverflow. Well, Google’s search is just better than every search in the world. Usually, we find an answer to our question within a few minutes. Sometimes it takes longer and on very rare occasions, we do not find any solution. We go back to our problem and try to solve it in a different way or ask colleagues, etc.

What is wrong with that behaviour?

StackOverflow can be considered open-source. And like any other open-source, it depends on voluntary contributions. So, the biggest mistake you can make when not finding an answer to your question is to go away. It is selfish. Others might have the same question and benefit from the question or a potential solution. Therefore, when you cannot find a question covering your problem, POST ONE by yourself. It is easier than you think and brings along varies benefits:

  1. Improve your writing: The better your question/heading and the content of your outreach, the easier it will be for others to understand your problem and help you. It may take some time in the beginning but it helps you write more concisely — not only questions on StackOverflow but communication everywhere — with colleagues, friends and even family.
  2. You can come back to your problem (and potential solution) anytime. Sometimes you have a problem and you know that you had the same problem before but do not remember the solution anymore. Well, here you go. Just offload your brain’s hard drive and create room for the more important stuff.
  3. Having to write your question makes you think more in-depth about the problem. Stating the problem often already solves the problem.

There is one caveat to writing questions on StackOverflow: Put as much detail in the question as possible. Do not shorten things to make it easier for the reader. Why?

  1. Some readers might take the time to reproduce your problem in order to understand it. If you omitted e.g. the import statements in your code, it makes it harder and more time-consuming.
  2. Often the problem arises exactly from the lines of code that you omit. I experienced this by myself in this question. Originally, I posted the question with a test case calling a postArticle method and left out the implementation of this method for brevity. It turned out, that the problem I was having resulted from the actual implementation of this method. The used module had a bug and not my code. But of course, without the details of the implementation of the method, nobody could help me nor reproduce the problem.

--

--

Simon van Endern

Learner & Teacher. Software Developer & Agile Evangelist. Polyglot & Traveler.