|For novel ideas about building embedded systems (both hardware and firmware), join the 40,000+ engineers who subscribe to The Embedded Muse, a free biweekly newsletter. The Muse has no hype and no vendor PR. Click here to subscribe.|
By Jack Ganssle
An October, 1999 federal indictment charged an FAA team leader with deleting the sole copy of the source code for a program that relays critical flight information between the air-traffic tower at O'Hare International Airport and the tower in Elgin.
First, though, the culprit allegedly put an encrypted version of the source on his home computer. Federal investigators spent six months cracking the key. The Department of Transportation's special agent in charge of the investigation, Dieter Harper, claimed that had authorities not been able to break the code three to five years of development would have been lost.
Let's get this straight: the FAA, charged with maintaining the safety of the skies, a domain completely dependant on software, doesn't religiously control that code? A disgruntled worker could delete a half decade of engineering work by typing a simple command?
Whatever happened to backups? I don't know what development environment was used, but in UNIX there's not even a confirmation of a errant or purposeful delete command. Even Windows, with the "are you sure" dialog box and a last ditch recycle bin doesn't protect us from the dumb mistakes we all make - let alone willful destruction.
An isolated incident? I don't think so. Every month or two I get an email or call from a tortured soul looking for some way to recover lost files (my normal answer: you're outa luck, pal). Half the companies I talk to have no real version control system (VCS), the most fundamental of development tools, the first weapon in preserving source code. Sure, some might actually own a VCS program, but it's astonishing how many don't use one to control all development products.
I don't get it. Version control systems are the most basic element of managing any sort of software development effort. One person shop or mega-corporation, without a VCS you'll work too hard, probably lose code from time to time, and find it virtually impossible to track old versions of the project.
Since the VCS database is stored on a server, backups are simple. Code isn't scattered on developer's computers throughout the office. Better, old versions of the product never disappear; you can go back 50 releases with the press of a button to see how a bug crept into the application. And of course nothing beats a VCS to facilitate file sharing without multiple, different, copies of a module.
Some folks complain that the VCS isolates them from the code base. Sure, that's true. All software lives in a database of sorts rather than in a zillion random files. Just as C insulates us from the vagaries of assembly language and Java from C's pointer problems, the VCS keeps our cotton-pickin' fingers out of the source. Just follow the rules and all changes are logged, history is preserved, and the regular server backups mean no more lost code.
Years ago I came into the office one Saturday morning to discover all of the engineering department's computers were missing. Stolen. Every one, including the server and backup tape. Our VCS kept all code on the (missing) sever, which was backed up each night to the (missing) tape. But we rotated media daily; the previous day's tape was in the safe. We were out a lot of computers but only a day's work.
The alternative to version control is complete freedom to do anything you want anytime. Including lose changes and files. Chaos. The antithesis of professionalism.
Here's a few resources:
http://www.pvcs.com - PVCS - perhaps the industry-standard VCS. The site has some cool free guidebooks and papers as well.
Microsoft's SourceSafe (http://msdn.microsoft.com/ssafe/) - a pretty decent product, in my opinion after quite a few years of use. Unfortunately the web site is totally targeted
at Internet and PC users; fact is, it works great for embedded development.
GNU's cvs (http://www.gnu.org/gnulist/production/cvs.html) (also check out http://www.cvshome.org) - a version control system used by thousands. Hey - don't complain that the tools cost too much! This one's free.
QVCS is inexpensive and powerful (http://www.qumasoft.com/).
MKS's Source Integrity (http://mks.com/products/scm/si/) is another popular commercial product.