Recently, someone suggested to me ( putting it mildly ) that our build automation should ignore failed unit tests in order to get further down the process. I instinctively bristled at this notion. Later I decided to google the subject to see if anyone else in the world was actually entertaining such non-sense. There was an answer on StackOverflow that referenced a story from the Pragmatic Programmer called Software Entropy. It’s an interesting story about the effects of Broken Windows on a building and what it means for software rot. (See Active Rot )
There’s a few expressions I like to use: (Fair warning, these are cynical and/or sarcastic)
- Entropy is a bitch
- Once is an exception, twice is a pattern
- Death but a thousand cuts
- What’s the problem with a little poo in the installer.
- Garbage In, Garbage Out
- Fix the installer and not the application. That’s a great idea.
The point of this is it’s really hard to maintain high quality installers when forces are constantly acting to bring chaos. This is why I bristle at comments made about how Agile Installation means everyone can contribute and you don’t need specialists. I’ve seen developers contribute to installs… contribute chaos. This is what happens when you bring people to the table who don’t understand MSI. They understand things like Regsvr32, Regasm, SC.EXE, InstallUtil and OSQL.exe and then try to wedge them into the installer.
Every one of those things is a broken window and frankly, I don’t allow broken windows. Unfortunately, that doesn’t always make me a very popular person because developers are often quite self-convinced that their solution is acceptable.
So back to my initial comment about unit tests failing builds. For installs this is Windows Installer validation and I suggest custom ICE’s to enforce quality standards. I suggest writing tests that enforce your coding standards. Don’t allow selfReg? Write an ICE that checks the SelfReg table. Don’t allow InstallUtil CA’s? Write an ICE that scans for those. Allow only sanctioned DTF custom actions? Write a unit test that reads in a white list file and make sure only those custom actions exist.
Enforcing standards through automation is the best way to fight entropy that I know.