Stackoverflow is good… but

1 minute read

Stackoverflow is a phenomenally useful resource with a huge community. You can post questions that span the full gamut of programming, from ponderous questions like, “what makes a great programmer?” through to the very specific, “why does this LINQ code fail to compile?”. I’ve gleaned quite a lot of useful things from that site and occasionally resorted to posting questions, too. However, it does lack something.

My concern with Stackoverflow and other sites of its ilk is that, very often, folk will simply focus on the how rather than the why. I’ve read numerous questions in the past where the question author was trying to do something that was either debatable, counter-productive or downright wrong. It’s often the case that any attempt to drill into the problem to suggest a different approach will be ignored in favour of the the “fastest on the draw” answer; indeed the site is set up to reward people who answer quickly. Before you can even say, “why are you trying to do that?”, someone has answered with a line of code that does the trick. The person asking the question sees that it compiles and runs and gives them what they want, clicks the “correct answer” button and goes on their way, unaware of any problems they may be storing up.

It’s reminiscent of bad requirements gathering: People often ask for a particular solution (“we need a web filtering application”) instead of stating their problem (“our network is too slow”). Just because you want something doesn’t mean it’s actually what you need.