On the day before WinHEC, the marketing VP of one of my smaller clients asked me to fix a problem with one of their applications. The CTO was in a plane on his way to WinHEC; the developer who used to own the project had left for another job; and the new developer was in the middle of a major modification to the program that wasn't in a buildable state. "Just take the current sources, drop in this What could be bad? It sounded like a five-minute job. Of course, let’s not forget that everything is easy for someone who doesn’t have to do it.I checked the project out of the repository. There were two branches in the tree, marked 1.0 and 1.1, so I checked out the most current sources from 1.1. There were no tagged versions. The CTO was the only one who would know which branch I should use, and he was on a plane. I promptly forgot that I’d guessed at the correct branch.I dropped in the new file, and tried to build the sources with Visual Studio .NET 2003, which was the IDE the previous developer had used. There was a problem: a source file that had nothing whatsoever to do with the issue being fixed wouldn’t compile on my installation of Visual Studio 2003. I tried a bunch of things over the next several hours, and the next day I sent an email off to the marketing VP, the new developer, and the CTO (who was at WinHEC and off email): I can’t build the project in Visual Studio 2003: it looks like it needs the current Platform SDK, which I don’t have installed on the machine with Visual Studio 2003 because I think it will break another project. I can’t build it in Visual Studio 2005, either: it has 12 errors and 198 warnings.It was becoming a case of not being able to drain the swamp because of the alligators. Eventually, I fixed that problem, and sent off another email to the same people: I have managed to build the project in Visual Studio 2003 by removing the reference to wincred.h. It appears to have been unused.I tested the new build on a Windows 2000 Virtual PC, and it loaded and ran fine, so I checked in the sources, and sent the new setup file to the marketing VP for broader testing. Running on one Virtual PC image isn’t much of a test, and I wanted to make sure that fixing one problem hadn’t introduced others.The following week, the testers came back with a bunch of errors. Some of them were errors that had been fixed by the version that broke compatibility with Windows 2000. I suspected that I hadn’t built from the most current sources, and that the former developer hadn’t checked in his latest changes. Fortunately, by then the CTO was back from WinHEC and had caught up on his email: he contacted the former developer, who claimed that the repository was up to date. The two of us got on the phone, and looked through the source history together trying to figure out what was wrong. Finally, the CTO remembered that the previous production version had been built from the 1.0 directory of the repository: the 1.1 directory was intended as an experimental development branch. D’oh.We’re going to restructure the repository with trunk, branches, and tags directories so that this doesn’t happen again. Meanwhile, don’t let this happen to you. Software Development