A while back there was an article on staff turnover, describing how this could be the biggest problem of 2012. This was recently brought back to my mind when a couple of awesome web developers announced they were leaving Mozilla. Staff turnover is indeed a problem and may soon be a much bigger problem at everyone's favourite IPO, Facebook.
So how do you cope with turnover in software development?
Unit testing and testing
The holy grail for developers is having a full test suite. I don't care how much of a ninja or a rockstar your new developer is, when a new developer makes changes to a non-trivial project they will break stuff. Inadvertently. Your only defense against this are unit tests.
Easy setup and install
The longer, harder and more obscure your project is to build, the harder it will be to get them up and running.
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
Debugging someone else's code? Even harder.
The right tools
For many years I used the ZODB. It's a good database, but finding someone who knows how to work with it is harder than finding an RDBMs expert. This shouldn't be a discouragement for using non-mainstream tools. If you just went for popular you'd be eating McDonalds, drinking Bud Light and watching Fox News. But it's a point to consider. Favourite language for helping job security? Perl.
If you're software is all internal, developers have a harder slope to climb. If you use open source software and frameworks that are used in multiple places, the slope has just been made gentler. But if you release frameworks and tools as open source and you are lucky... they might get picked up by other developers. Perhaps you'll have developers come on board half way up the slope.
One day I was assigned to help out on a project, I compared it to the specification. The specification read, table of contents, boiler plate, blank page, the end. Oops. Documentation is often wrong and out of date, but if there's nothing at all...
And finally there's one more point from that article.
a very different developer mindset for today's 20-something codersReadWriteWeb
Perhaps you shouldn't keep hiring 20 something developers. There's an awful lot of talented developers who aren't 20 something. But that's another post on how stop turnover in the first place.