Tuesday, 26. December 2006, 19:41:58
IntroductionEarly this year (2006) I worked on a school-project with three other students from my class. The goal was to create an asynchronous messaging protocol, server, two client APIs (one for Java and one for .NET) and a small Windows.Forms monitoring app that would use the client API to connect to a maintenance topic on the server, so we could keep an eye on how it was doing. And it all had to be done in four weeks.
We went straight to work. Didn't bother setting up or deciding on a development methodology, and during the course of the project, we didn't write a single unit test. All we did, was getting together every day and code away.
The project was a great success. We finished ahead of schedule so we had a lot of time for the presentation (preperation for exam), and we all got marvelous grades. We even had time to do stress/load testing on the server, and it was incredibly robust and performant - 300.000 messages a second on regular workstation hardware, anyone?
But how did we do it? How did we manage to produce high quality software, on time, within the limits of a tight deadline, without using any actual methodology? Without unit testing?
I've thought about this particular project on several occasions, and why it was such a success. I believe it dosn't boil down to a single punch line, but is the result of several factors interacting.
- Qualified developers
- Simple, light-weight, architecture
- Tightly knit team
- Domain experts
- Source revision control/SCM
Let me explain why I think these factors were vitally importaint to the success of this project.
Qualified developersThough some more than others, we were all excellent coders.
Having qualified people is absolutely critical. The difference between a good coder and a bad can be huge, and sub-standard coders can slow the excellent ones down, because they, on top of their normal work, are now also burdened with having to fix the code produced by the sub-standard coders, and they are burdened with having to go to greater length when explaining design and implementation descitions.
In our project, we
did have a drag in this area, denying it would be a lie. But the drag we had was manageable. That's a key point to note: in a project with more than one developer, there will almost always be a drag because some are better than others, or in other words; some are worse than others. The solution is not to fire everyone who dosn't live up to the super-star status (only fire those who are sincerely bad, and make sure the replacement is better), but to keep the drag manageable. And one of the ways to keep the drag manageable, is to have a simple, light-weight, architecture, as explained bellow.
Simple, light-weight, architectureWe wrote everything from the group up. The only APIs we used were the standard .NET and standard Java APIs. Our architecture was explained and described using patterns. It was possible than we didn't all understand the same patterns, but we all had the same pattern books, so it was no biggie to read up.
Because we were writing everything from the ground up, without any additional frameworks, we got precisely the frunctionality we needed, and we had complete knowledge of how the system did what. This meant that we got a rather simplistic architecture, that was easy to comprehend.
The thing about simple architectures is, that they are easy to code, and if something goes wrong, it's easy to figure out what it was.
The combination of the simple architecture and our shared, pattern based, terminology, meant that we could easily communicate design idears, and, as explained bellow, a teams ability to communicate is very important for its success.
Tightly knit teamWe knew each other before we started the project; we hard worked together on other projects before and we knew each others strengths, weaknesses and personalities.
This meant that we knew how to communicate with each other, and with our shared terminology, we could easily express our ideas. Our communication was further enhanced by the fact, that we met face-to-face every day, and that we were no more than four on the project.
Communication through Skype, Messenger, e-mail or even phone, is often a poor substitude for talking face-to-face. Face-to-face communication has lower overhead, is more expressive, more responsive and reduces the risc of misunderstandings. Secondly, I'm not saying that four is a magic number for project sizes, but there's a limit to how many people you can put in a team, without getting too much coordination overhead.
Domain expertsWe had knowledge of the problem domain. As a school-project, the intent was the practical application of the theories, patterns and technologies we had been taught the previous months.
This meant that we could all take on the role of domain experts, illiminating the communication overhead (are you sensing a pattern?) and the risc of misunderstandings involved in using domain experts that are external to the development team.
In short, the resources we needed to invest in research in the problem domain was considerably reduced by the fact that we already had thorough knowledge on the subject.
Source revision control/SCMDon't ever start a project without it. I've found this to be an absolutely essential part of any development project - even single-person hobby projects.
My personal favorite SCM is Subversion. We also used Subversion for this particular project, and everyone in the the group had used this tool before in previous projects. This meant that we were able to all work on the same source code, and constantly integrate our changes. In fact, we often integrated our changes over a dusin times a day.
We had an additional advantage in working in the same room everyday: we could yell to the others every time we committed a change, and coordinate our merges to prevent conflicting changes.
In conclusion, using an SCM saved us from a lot of troubles with differing versions and conflicting changes, and ensured that we were able to keep our development velocity and not worry too much about integration and merging details.
ConclusionSo, when does cowboy coding work? Who knows, but it did work in this particular project, and a number of things struck me as having been hugely contributing to the success of that project: The project had a manageable size - small, tight team and manageable architecture. The developers knew what they were doing and we had a good insight in the requirements. Our internal communication was extreemly efficient, and we made heavy use of SCM and frequent integration.
One thing is certain; I wouldn't develop cowboy-style if the project had been much larger, or our communication hadn't been as efficient as it was.
PS: Merry christmas and happy new year!