Monday, August 08, 2005

Development essentials

Here's a list of things that I currently think are essential for anything other than the most trivial .net project. Most of the tools I mention are either provided by Microsoft at no extra cost or are open source projects. There's no excuse not to use them! Dedicated build server You must have a dedicated build server that can build your entire software from source. At a minimum you must be able to run at least a daily build of your code from your source control system. It's best if it can automatically get the latest version from source control, build and run unit tests on demand, so that any developer can run the build after a check it. Breaking the build should be considered a serious offence. NAnt is a good open source build tool for .net. Build systems often overlook the database, this is understandable since the database if often the preserve of a separate team of DBAs, but it's no less essential that you can build your database from source. Maintaining SQL scripts in the right build order is a major headache, but there are some good tools available that can make database builds and updates much easier. I like DBGhost. I've worked on large projects which didn't have a build system in place. The pain is intense! Developers spend most of their time debugging deployment issues. No one really knows what version of the software is deployed on what servers. No one really knows what version of the source code is compiled into which components and no one really knows if the source code in the source control system actually compiles, let alone works! Automated Deployment Without automated deployment it's difficult and error prone to deploy your software and you are liable to be dedicating considerable resources to debugging deployment issues every time you need to spin a new rig. With automated deployment you can spin rigs easily which means that test teams get frequent, predictable, up to date test rigs and you can have confidence when you spin your production rig that it will perform without deployment issues. The Microsoft installer (msi) is a powerful scriptable tool that you can use for large multi server deployments. Source Control You must have source control. Most Microsoft shops use Source Safe which is just about OK for small projects but has major scalability issues. Microsoft will be shipping an enterprise source control system with VS2005. I've used Subversion with Tortoise which I was quite impressed with. You must only ever allow compilable unit test covered code to be checked in. Test Driven Development I would never write any software now without unit tests. NUnit is the the most popular .net unit testing framework. Microsoft will be releasing their own unit test tool with VS2005. It's also a good idea to use a tool to ensure that you've got full unit test coverage. NCover works well. If you're new to TDD read Kent Beck's book on the subject. Tool enforced coding standards You must have coding standards in place. The best way of making sure that programmers stick to them is to use a tool such as FXCop. Bug tracking database You need to be able to keep track of bugs. The best way of doing this is with a bug database like bugzilla. Bug databases can also be used to track features and are an essential piece of good software management. Once again, Microsoft are introducing a bug/feature tracking database with their VS2005 team system.


Anonymous said...

Well written, I agree with everything you have here, 100%. One thing I think you missed though is a wiki. For a company of 2 or more people you need to have a documentation repository and what better than a wiki? There are many out there, so again, there is no reason not to have one.

Mike Hadlow said...

Thanks dukebaby, that's a good point. I've worked in a couple of shops where they've had a wiki and I've found it really useful.