The Code Zombies of StackOverflow

I believe that this is the greatest time to become a programmer. Whereas I remember paying 149$ for an undocumented Microsoft Visual C++ 1.0 twenty years ago, almost all languages and tools have now become extremely accessible, free and well documented. The amount of information that one can find online is bewildering. We now speak in exabytes. There are more tutorials out there than you could read or watch in your lifetime. As a coder, I also doubt that you will find many algorithms in your code that have not already been analyzed and cleanly displayed online. To illustrate this, StackOverflow currently has about 8,3 million questions. 8.3 million… Just think about it for a second… There are 48 times more questions than the number of words in the English dictionary! And while this includes many duplicates, there are still new questions pouring in every day. This means that any time I have a question on any specific code subject, I can be 99% sure that I can find a perfect and constructive answer on StackOverflow along with instructive comments. And while this is in part a wonderful thing, I think that this has turned a lot of us into code zombies, coders who reach their objective without understanding the problem or thinking about the solution.

Like a growing disease, I feel that this has become a growing trend. With so many quality answers at our disposal, developers quickly make the huge mistake of taking away the most constructive part of the problem solving equation: the path leading to the solution.

Now, I am an utter fan of Jeff Atwood and Joel Spolsky. I was closely watching as StackOverflow was being built and seeing their hardware specs, I believe that it is one of the greatest website implementation of all times. I am in no way encouraging you to stay away from it. But if jumping to StackOverflow is the first thing that comes to your mind when faced with a new problem, you are clearly missing out on the best part of programming.

A lot of people tend to rush to StackOverflow for every question they have. Some even hope for a nice prebuilt jsFiddle where they can view the results before even looking at the code. They justify this by time constraints, or by not wanting to waste energy reinventing the wheel. They wrongly believe that they would be wasting time by finding a less-optimized solution than the most upvoted answer out there. They merely think about the problem, and tackle each new algorithm like someone who solves crossword puzzles with the answer page left open. They are delegating the research part of their jobs. While they may still be learning a bit by looking directly at solutions, they learn a lot less, if not nothing, compared to the ones who go through the “painful” process of laying down the problem, thinking about the solution, coding the answer, testing it out, optimizing it and then comparing it with the top answer from StackOverflow.

Bringing research back into your code.

A coder can only become a master of his craft through time and experience, tackling each problem through solution-seeking, testing, error making, hitting walls, going through eureka moments, rebuilding wheels, compiling, and perfecting its own code. Not only do I think that each step is crucial as a learning experience, I also believe that it is vital for personal satisfaction and well-being. In fact, I truly believe that a coder can only be satisfied with its job when the latter stimulates its intellect and forces him to learn something new every day. Depending upon your current tasks, you may or may not be faced with a lot of unknown each day. Here is my personal approach to the problem :

  1. When faced with a new problem, don’t hop on the Google wagon right away. Give yourself at least 10 minutes to try and solve it by yourself.  Take a piece of paper, draw the solution, open a source file, code, compile, test. 10 minutes is not a lot of time, and you will quickly see that the investment pays off.
  2. When looking for information, look first at the official documentation instead of trying to find the direct answer on StackOverflow. The docs usually give detailed and updated information that will help you understand what needs to be done to tackle the problem.
  3. When you find something useful, write about it. Keep a journal, a blog or some written notes about your discoveries.
  4. When giving out a solution on StackOverflow, do not just spit out a jsFiddle answer. Point towards the right direction, write in pseudo-code, help the coder help himself.

If you have become weary of just gluing code together or feel like a zombie writing code, I promise that if you strive to bring research back into your code, you will discover a renewed, instructive, and rewarding experience.

Cheers

9 thoughts on “The Code Zombies of StackOverflow

  1. I think a lot of the issues with being a “code zombie” are a by-product of things being made easier and easier. Users are given these amazing frameworks that hide some of the more challenging tasks and just aren’t used to needing to actually SOLVE a problem themselves. While things being made easier isn’t necessarily a bad thing, it’s the fact that a lot of developers don’t take the time to dig into problems – instead they get so hooked on the idea of things being made easier that they just look for the answer instead of trying to figure it out themselves.

    I talked about the idea briefly in an article I wrote on my own blog: http://xangelo.ca/#!/2014/7/the-straw-that-broke-the-camels-back

  2. Your point not correct if developer use soft with good design spirit. Microsoft Visual Basic 6.0 is only soft with good spirit. Possible make big application as fast as can write code without mistake.

  3. I have to disagree. Most of questions on StackOverflow are not problem solving, but more about how to do a specific thing in a specific context, e.g. how to accomplish something using the Spring framework or how to allow user’s file upload using Servlet. Those questions require little or no thinking at all, rather, they require the experiences and knowledge of the persons who actually worked on it to produce the optimal solution (usually means which class/library to use). StackOverflow is a kind of cheat-sheet, it helps you find common, best practice solutions (mostly code snippets) without you having to dive into lengthy documentations or trial and error. And you can always improve their solution or provide your own when it is not up to your expectation.

    I think, and believe many people will agree with me, you as a programmer should concentrate your effort in solving your or your customer’s unique problem in the best way possible. That’s is where you need a piece of paper and brainpower. Leave your wheel re-inventing for later.

    If you would like something more problem-solving focus, more helpful for programmer’s learning, or, in your own word, less “zombie”, head to SO’s sister site: programmers.stackexchange.com

    • All of the questions on stack overflow seek to have a problem solved. The problem being something the person asking the question can’t seem to solve for themselves. The context doesn’t matter.

      Regardless of the code you re-use from SO, you should always double check it for soundness as it relates to your specific usecase – it doesn’t matter if it’s a snippet with a million upvotes or sponsored by Dev #182736 from Big Company D as a best practice.

      • If you want to be strictly semantic, then yes, even the question “how to print a text to the console in Java” is a problem-solving question:) But my point was, what problem is worth your effort to figure out yourself. And what is trivial enough its better to just re-use other’s code. And, you don’t need to ask a question to get the information, because like the author said, 99% of the questions you might ask already had answers there.

        On SO, of course upvotes or accepted answers are not absolute measurements of an answer’s quality, but they are the first signs you should look at to filter out low quality ones. Whether you believe it or not, a 100-vote asnwer is always better then a 10-vote answer. Granted, any sane person would then verify that the best answer is really the best for their needs. Not only that, he will apdapt the code as needed for their specific use case. And like I said, readers always can improve upon an answer, or provide one themselves.

        In summary, StackOverflow is one of the best things that ever happened to developers. Use it. Contribute to it. Make the best out of it. Have priorities, spend efforts on what matters.

      • Disclaimer: I have no affiliation with StackOverflow or any of its affiliates. I just happen to be one of its enthusiastic users, like many other does, after moving from other Java developer’s forums like JavaRanch, TheServerSide, etc.

  4. I disagree with this in two ways:

    1 – “Give yourself at least ten minutes.”
    Wrong. Make an attempt at the code. Until you have code which you think should work, you’re not ready to post a question on StackOverflow. If you haven’t done that yet, you have a 90% chance of your question being closed as Off Topic (Looking for a Resource), or Too Broad, or Not Clear. Time doesn’t matter. It doesn’t matter if you spent 10 seconds or 10 days. All that matters is if you wrote code that you thought would work (or at least pseudo code with an algorithm that you think will work.)

    2 – “When giving out a solution on StackOverflow, do not just spit out a jsFiddle answer. Point towards the right direction, write in pseudo-code, help the coder help himself.”

    Again, wrong. If someone does what you say, that answer will be deleted for failing to answer the question. If you feel like you need to teach the person how to ask questions first, you don’t – if they failed to properly ask their question, vote to close it if you can, or flag it if you can’t.

    • Seems to me that you don’t agree with a lot of things you misread (or I misexplained):

      1. The issue at hand is not with posting a question, it is looking up the answers without thinking about the problem. So basically my advice is to not jump on the SO for answers right away. Give yourself 10 minutes to try and find the solution yourself, by wording it out or “make an attempt at the code” like you said.

      2. It’s not about teaching the person “how to ask questions”. You can have a perfectly asked question. To which you can either 1/ give out a fleshed out code snippet ready for CtrlC/CtrlV, 2/ explain the solution using words, describing the problem and the algorithm necessary to solve it, linking associated docs, and potentially including code parts for tricky portions.
      My advice is to always go for 2/ instead of 1/, even if it is not as reputation-rewarding.

  5. StackOverflow is a rather useful resource for programming noobs who can withstand the hostility of the StackOverflow “establishment”. It’s increasingly useless for programming experts, though, as difficult questions are rarely answered and many of the best questions tend to get closed for the most arbitrary reasons.

    So if you’re an expert, you’re likely to end up having to reinvent the wheel over and over anyway, because nothing you’ll find on StackOverflow will be useful and any questions you ask yourself are unlikely to ever get answered.

    See also http://www.embeddedrelated.com/showarticle/741.php

Leave a Reply

Your email address will not be published. Required fields are marked *