Saturday, October 29, 2011

Proving the Utility of Assertions in Software Development

Sven, this is for you:
The team observed a definite negative correlation: more assertions and code verifications means fewer bugs. Looking behind the straight statistical evidence, they also found a contextual variable: experience. Software engineers who were able to make productive use of assertions in their code base tended to be well-trained and experienced, a factor that contributed to the end results. These factors built an empirical body of knowledge that proved the utility of assertions. 
At one company I worked, assertions were discouraged by the head of software development, he considered them "bad style" – he now works for Adobe… And yeah, working for him sucked, big time. BTW, I was interviewing for Adobe when he went there (unbeknown to me) AND AM I A GLAD THEY DIDN'T HIRE ME.

Come think to think of it, assertions are the poor men's Test Driven Development, kind of inline tests.

No comments:

Post a Comment