Don’t take any wooden nickels, part 3

Improvement, Techniques

So don’t trust consultants and don’t trust Microsoft (and by Microsoft, I really meant any vendor’s guidance). And it’s more a case of trust, but verify. But I digress…

Open source software can be a great solution to a problem you need to solve. Finding the right tool or library can cut precious time off of your schedule and greatly decrease your maintenance costs. Of course, if you aren’t careful an OSS solution can be the anchor that drags your project down to a watery grave.

As I said about consultants and vendors in the other posts in this series – it’s your responsibility to explore the in’s and out’s of the open source solution. Will the license work for your business model? Is it well supported? Is it a fairly good match to the way you and your team build software? Lastly make sure it really is better than the alternatives.

The alternatives you have to consider are commercial solutions and building it yourself. If you need to figure out how best to carry out that evaluation, there are plenty of sources out there to guide you. But that’s another show. If you can’t wait and need some pointers I use, feel free to email me.

The point of this series is that software is a tricky game. There is no one best solution that will apply to all problems, not even for a small related subset. Carefully consider the options. Learn from multiple sources. Read articles and books about things outside of your stack of choice. Heck, read about things not directly related to software at all (I’m a sucker for pop econ and statistics books – Freakonomics and Drunkard’s Walk are very good books).

Don’t blindly follow.

Advertisements

Don’t take any wooden nickels, part 2

Improvement, Techniques

Microsoft Patterns and Practices is an extreme case of my theory about consultants. These guys appear to have never shipped anything that will be used by real users. That wasn’t always true. Early versions of the Data Access Block were quite useful. But then they started building examples that showed every possible facet and feature they could think of. And people started using these examples as guidance. Probably because P&P told them to.

The problem was, these things were too complicated for any real use and too complicated for a mere mortal (or even one of those rockstars. or was it ninjas?) to be able to extract just the little bits that could help them. And so people just started using these things whole hog, even if they only really needed 10% of the functionality. And don’t get me started on how big consulting firms (like the Big 6, or however many are left these days) love to use them as a basis for their lowest bidder projects that overrun schedule and budget…

What’s even worse is that typically these things do not follow sound software development principles. To them, OO is a typo where someone forgot to include the "W" (WOO!). People use these things as guidance to learn from. There’s an idea that there is nothing worse than to lead an innocent to sin. I’m not calling them evil or anything, but this guidance isn’t doing anybody who’s learning how to code in .Net any favors.

And of course, most sample code has this problem. In the sample code accompanying an article or a presentation, sometimes it is necessary to leave out the parameter checking and error handling code so that your point is clear. Its not the greatest thing, but its usually worth the tradeoff. It might be nice if maybe we started including the "well written" version in our sample code downloads.

The problem is, P&P ships these things as guidance. They implicitly say – if you write your code like this, everything will be great. And that’s probably true for version one but the omissions and issues of version one tend to live a long time. Not following good OO and development practices makes it hard to maintain and improve the application and that’s no fun.

Don’t take any one source as the guide for how you build software. Microsoft has provided a lot of very good tools and some very good guidance about how best to use those tools. But that guidance does not apply to every situation and some of it really doesn’t apply to any. Make sure you look at all sample code (or even open source project code) with open eyes. The author probably has a viable solution to a problem and it might even be your problem. But don’t assume it is the best solution for your needs.

Don’t take any wooden nickels, part 1

Improvement, Techniques

Shipping software is hard. Even if you are just packaging it up lightly so you can put it on a couple machines in Accounting down the hall, once it leaves your protected little world, anything can happen. And usually does.

And so we have TDD and BDD. Code reviews. Pair programming. Code coverage reports. Programmer testing. QC testing. QA testing. Performance testing. You get the idea – we have a lot of ideas about how best to make the transition of our software out to the real world as smooth as possible by making sure the software is good enough.

Good enough. That’s the key words here. Unless you have written a very trivial application, you will never ship something bug free. Think about that for a second. It’s depressing if you let it get to you. Now, think about some of the things that count as bugs – some of them are issues because the software doesn’t work the way the user expected. Or other things you couldn’t have possibly envisioned anybody doing with your software. It happens.

If you try to fix all of the possible issues, you will never ship. This leads me to a theory I’ve been toying with, the one that has to do with shipping software: Never trust a consultant who hasn’t shipped software in X years.

I haven’t decided yet exactly how many years. Maybe you just have to go with your gut. But the more I read from industry luminaries who espouse things like all code must be covered by tests that were developed in a TDD fashion or that you have to develop on the trunk so you can continuously deploy, the more I think that my theory might just be worth  something. 1

I’m not saying to forget about this advice. Its good advice, in theory. But don’t take it to an extreme. Extremes tend to cause pain.

1 In fairness, I’ve been a change agent at various points in my career. I know that sometimes you have to make an extreme statement (and follow through with it) in order to break old habits and effect change. Ask me about stored procedures sometime…