In the previous post I started talking about The Joel Test: 12 Steps to Better Code, which gives you a quick measure of software development organizations. The Big Swinging Developer Test is similar, but instead of sizing up organizations, it’s used to get a quick read on a developer. Now, on to step 2.
The Joel Test: 2. Can you make a build in one step?
The Big Swinging Developer Test: 2. Can you create a one step build from scratch?
At first glance, this seems to be one of the easiest development tasks ever. Build in one step? Sure, just click the green triangle in Visual Studio (or the equivalent step in Eclipse, Sun Studio, etc.) That’s not one step since you’d have to open the project in one of those tools to begin with. In addition, what about getting the latest code from version control? Not to mention the likelihood that the program you’re working on will be spread across multiple projects.
Like all things Big Swinging Developer, creating a one step build is less about technology and more about process. This one in particular requires a large dose of empathy because "it builds on my box" just doesn’t cut it when you’re working in a team, especially if you’re getting a monster bill rate to do so. There are three audiences for a one step build and if you can meet the needs of all three then your life will be easier on just about any project you join.
Audience 1: The New Guy Have you ever joined a project and spent the first couple of days just trying to get your development system set up? One of the most frustrating parts of the on-boarding process for any developer is getting to the point where you can start debugging, writing, and testing code. A successful one step build for The New Guy is a single command from a logical place (like the root folder of version control) that requires either zero parameters, or gives him the list of parameters when none are passed in. There should be no need to train him to build other than, "Run this command from this directory. Catch you later."
Audience 2: The Team The second audience is the rest of your team, or the teams that you work with in the case of a large project. Since team members have different needs, this is where options, parameters, and structure come into play. Maybe team members don’t want to build the whole system, so you break the build into sub-builds that can be run independently which are then all aggregated into the top-level master build. Maybe the team wants to run some tests, but not others. I was on a project once where there were more than 250 .NET assemblies built as part of the system. Compile time was about 7 minutes. Test time was nearly 3 hours. Even though I was paid hourly, I didn’t need to run all the tests all the time.
Audience 3: The Build/Release Team The final audience may or may not exist on your project. Sometimes you have dedicated release managers and sometimes you just have someone appointed to produce release builds. Either way, this audience has their own special needs. In particular, the ability to do things like build in Release/Optimized mode, the ability to synchronize version numbers across files, the ability to deploy to new directories, and more. A one step build that compiles, tests, packages, deploys to a timestamped directory, and emails everyone who cares is a thing of beauty.
NOTE: The less code you write, the more valuable it is. You may be thinking, "No, problem. Some Perl here, some DOS batch files there, throw in that hand rolled FTP client I wrote awhile back and I can build everything listed." Not so fast. A good build system is built on technologies that folks can understand, use quickly, and Google for help. Think Ant,NAnt, MSBuild, CruiseControl, WiX, even Make. Remember: Build something that people can use and improve even when you’re not around and you’re on your way to becoming a Big Swinging Developer.
Back in Y2K, Joel Spolsky posted The Joel Test: 12 Steps to Better Code. After reading it for the millionth time, I still think it’s a great list that can be used to quickly judge a software organization. Even better, the list can be used for gap analysis in looking for ways to improve.
I wanted a similar list for individual developers and the closest I found was Read Write Web’s Top 10 Traits of a Rockstar Software Engineer. Their list is great for identifying rock star programmers, but it doesn’t really lend itself to coaching good programmers into being great developers. To fill the gap, I decided to look for ways in which a developer can help an organization improve their Joel Test score and get more value out of what they’re doing.
The Joel Test: 1. Do you use source control? The Big Swinging Developer Test: 1. Can you teach developers to branch, merge, and reproduce releases in your source control system?
There’s "using source control" and then there’s "using source control effectively". Plenty of teams use source control as a way to backup their source code. The thought is "if it’s in source control, it’s safe". That’s all fine and good, but it’s really only the tip of the iceberg. The real advantages of source control are parallel development and release sets.
Parallel development is the ability for each developer to work on any part of the system without preventing other developers from working on the same part. If you’re using branching in your source control system effectively then all of the developers on your team should be able to work full speed all of the time. As they develop features or fix bugs they should be able to build and test based on their version of the code base. Once they’re happy with their changes, these changes should be safely merged back in to the public code base. If you’re a Big Swinging Developer, you should be able to go to the whiteboard and draw a branching strategy that supports parallel development. You should also be able to teach those with limited source control knowledge how (and why) to branch and merge. Given a source control system that you’ve never seen before, it should be less than a day’s work to learn how to perform these functions since the theory is the same regardless of the technology used.
Release sets are the ability to reproduce the code base at any important point in time. An important point may be a release to the testing team, a beta release, a version that shipped, or any other milestone. Release sets are usually handled by labeling or tagging within a source control system. Once again, regardless of how the technology handles the function, you should know how to reproduce the code base for a given release. For bonus points, you’ll champion ways in which to interrogate a system in order to determine its version. Things like assembly versioning, file versioning, versioning in config files, or a database table that knows the version of its schema are critical when someone reports a problem and you need to determine what version of the code to recreate. Of course knowing the version of the system that’s having the problem isn’t particularly valuable if you don’t know what code went into that build which is why having your release sets in place first is so important.
Knowledge of version control theory and branching strategies is important, yet often overlooked. I worked at a place that wrote .NET code and the developers used Windows, Visual Studio, and their version control system all day every day. Everyone knew Windows pretty well. Everyone knew Visual Studio very well. Almost no one knew how to use the version control system well and their development speed suffered from it. If you learn the theory, you can learn the tools and you’ll be one step closer to being a Big Swinging Developer.
Being a Big Swinging Developer is kind of like being a chef in a professional kitchen. There’s a lot of pressure, a lot of money on the line, and a lot of cursing. One of my favorite analogies from the cooking world is knife work and the difference between professionals and home cooks.
The key to not cutting yourself in the kitchen is to keep the knife from making unwanted contact with your body.
The home cook approaches this problem by eliminating the "contact" portion of the equation. They’ll cut slowly and deliberately in order to keep the knife away from their fingers. If you’ve ever watched a professional, however, you’ll notice that they put the blade against their knuckles and can cut very, very quickly while keeping all of their digits. Professionals remove the "unwanted" portion of the equation. Why does this matter? Because professionals cut all day long and the better their knife work is, the more they can accomplish.
A defect is incorrect code that gets released into the wild.
There are two parts to this equation as well: Don’t write incorrect code, or don’t release it into the wild. The beginning developer will take the first approach with the thought that writing great code is what it’s all about. The seasoned developer knows that releasing great code is what it’s all about and that mistakes happen. This is why unit tests, continuous integration, one step builds, etc. are so important: the more test shots you get, the more defects you’ll catch, and the better your released code will be. These tests and builds need to happen in isolation –on private branches, for example– rather than occurring in the wild. The ability to use your version control system well is like being a chef with strong knife skills: you’ll be able to experiment more, build more, test more, and simply do more than the developers who are too afraid of cutting themselves.
So learn your tools and use them with confidence. Move faster (and more safely) than everyone else and you’ll be a Big Swinging Developer in no time.