Dumber Developers?
Are sites like Stack Overflow and their ilk creating dumb developers?
When I was learning to code as a child in the 1980s, I would read something out of a Zx Spectrum magazine, laboriously enter the code, and then run the programme usually to find a typo stopped the entire programme from working as intended.
A few “L Break Into Program”‘s later, and plenty of source code reading, I’d gradually debug why things weren’t working and correct them until my hangman game or frogger clone ran as intended. When I write code now, I still often find that, for one reason or another, the code does not generate the desired output on the first run through.
If that happens, I start logging extensively, and spend time setting break points and stepping into and out of the code. Once it works (or even before) I can write unit tests to confirm validity for corner-case inputs for now and in the future. The fact we can even do this is fantastic. The development environments I use, (Microsoft Visual Studio, Eclipse and Netbeans mostly) have Wizards, syntax highlighting, auto-indentation, code-completion and hyperlinks to documentation. It has never been easier to develop and debug code. Furthermore, if we get stuck, we don’t need to lift “Sedgewick’s algorithm’s In C” off the shelf, or pore over Numerical Recipes. Instead a couple of hot keys and some auto-corrected mispelt google searches later and we’re looking at implementations, documentation, design-patterns and theory. Git-hub and Source-forge even give us access to source code which we can read and learn from.
In a nutshell we live in a golden age of software development.
One of the best resources for developers on the internet is Stack Overflow. If you can conceive of a question related to coding, odds are high that someone has asked it, and often some very smart and generous person has answered it. Even more amazing is the fact people often have their questions answered by the authors of the very libraries they have questions about. There’s a direct conduit from the fountain-of-knowledge to those who wish to drink there. It’s only recently I’ve started answering questions on StackOverflow: browsing over the latest questions in the endless queue and contributing when I believe I have the specialist knowledge required or can augment other answers I see there. In the past I’ve often found answers that helped me there, but I’ve never yet asked a question, as I’m in the habit of searching, testing and debugging and only going begging when I’ve exhausted other avenues… I reckon as long as you’re a competent googler, and know how to use your IDE, the answers are usually already out there.
But as I’ve started answering questions, I’ve found an alarming trend which I believe Stack Overflow’s model is partly to blame for.
You see, coders get “points” and “badges” for asking questions, contributing answers, voting-up and writing comments. Mostly one can get points for having an answer marked by the asker as “correct” when they give your answer a big green tick above and ahead of any of the answers they’ve received. It’s a bit like a Facebook Like for the coding population. The StackOverflow points give users privileges to participate in areas or aspects of StackOverflow that aren’t avaiable intially, such as forums, down-rating people, etc.
This model is like a 1980s gaming arcade where you can get achievements playing games and in the process end up pouring endless supply of coins into the machines. Instead of being rewarded for answering difficult questions or encouraging people to think for themselves, users can “level-up” quickly by answering the simplest, most inane questions, which have been asked a million times before, and the questioner could have found the answer to already if they’d just shown any intiative at all.
At certain times of day, dozens of questions appear in succession along the lines of:
My code isn’t working, why?
What is the best way to do this?
I have an assignment to write so-and-so, can you give me tha codez?
These questions increase the noise-to-signal ratio, reducing the quality of the site. The questions lack any merit for the wider community. In other words, there is usually very little value for other people looking on at the questions, when they’re so localized as to be asking things like “why I am getting an access violation when it turns out they’re clearly dereferencing null pointers).
Yet these questions are often the ones that get the answers, simply because answering them is easy and allows the answerers to “level-up”. Worst of all, it encourages the worst approach to coding. The one where someone doesn’t engage their brain, or their debugger, but instead just goes straight to writing a “give me the answer” type of question.
Just yesterday I saw a dozen questions that made me alarmed at the next generation of programmers coming along. Don’t get me wrong, I love helping people who are just getting started in programming, giving them some guidance in the right direction, it’s one of the reasons I write this devlog. But here are some examples of questions that are getting asked hundreds of times a day, filling formerly useful resource websites with cruft:
- Why is my MidPointRounding not rounding properly?
- A momentary glance at the code showed they were using C# MidPointRounding.AwayFromZero and had failed to understand the meaning of the Rounding type. Rather than go straight to the extensive documentation available to them via MSDN, they’d decided it would be quicker and easier to post a lot of source code, write a request for help and post it to StackOverflow.
- Why is my C++ code throwing an exception?
- This question was then followed by a couple of screens full of poorly written C++ with poorly named variables, no comments and employing worst-practice techniques. I get that everybody has to start somewhere using arrays and trying to write recursive functions just for the hell of it… but questions like this have no merit as a record to other developers, and just create a culture where people find it quicker and easier to ask for help than to learn the craft. There are no winners.
- I’ve got some code and I don’t know how it works. Can someone explain? If I don’t receive an answer, I’ll test it myself.
- What’s happened to the excitement of testing one’s own theories? Learning by doing? Instead, people are simply trigger-happy on asking for solutions to be served up to them on a plate from the “badge and reputation hungry” masses.
What can be done about it? As developers most of us want to encourage new developers to catch the problem-solving programming bug. But how do we teach people to experiment, debug, research and learn?
The very worst questions of all prompt me to comment on Stack Overflow, often it’s so bad I want to vote the question down, or have it locked… but I can’t, and the reason?
Voting something down requires too much reputation. And the easiest way to get that reputation? Be the first one to serve up answers to trivial questions on a platter, so that the asker gives your answer that big green tick and bumps you up a level in the Code Zoo reputation circus. It’s a self-defeating cycle that’s creating a culture of ask for answers first, learn to think later.
Sad times indeed considering the golden information age we live in.
These are not new problems. There are oodles of publications on gamification, what it achieves and what its weaknesses are.. too many to summarize here! I remember spending months on the Hibernate forums, harvesting votes for my answers. I see that the voting system there is now gone!
In SO, it works to an extent, though it’s hugely flawed. And since it’s a self-moderating system, there has to be some way to prove you’re a trusted user.
To get to 3k productively, the trick is to manage your favourite tags well. There are many genuinely interesting questions there. They’re just not in the vanilla php, javascript, c# or java tags. Start following quieter tags where you can help, and you’ll get points soon enough.
In the mean time, you’ve got enough rep for voting down and reviewing first posts. These are valuable tools to help keep the SNR down.