Martin Heller
Contributing Writer

A Comedy of Errors

analysis
May 25, 20073 mins

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.

Martin Heller

Martin Heller is a contributing writer at InfoWorld. Formerly a web and Windows programming consultant, he developed databases, software, and websites from his office in Andover, Massachusetts, from 1986 to 2010. From 2010 to August of 2012, Martin was vice president of technology and education at Alpha Software. From March 2013 to January 2014, he was chairman of Tubifi, maker of a cloud-based video editor, having previously served as CEO.

Martin is the author or co-author of nearly a dozen PC software packages and half a dozen Web applications. He is also the author of several books on Windows programming. As a consultant, Martin has worked with companies of all sizes to design, develop, improve, and/or debug Windows, web, and database applications, and has performed strategic business consulting for high-tech corporations ranging from tiny to Fortune 100 and from local to multinational.

Martin’s specialties include programming languages C++, Python, C#, JavaScript, and SQL, and databases PostgreSQL, MySQL, Microsoft SQL Server, Oracle Database, Google Cloud Spanner, CockroachDB, MongoDB, Cassandra, and Couchbase. He writes about software development, data management, analytics, AI, and machine learning, contributing technology analyses, explainers, how-to articles, and hands-on reviews of software development tools, data platforms, AI models, machine learning libraries, and much more.

More from this author