Coding without confidence

As a favor to my wife, I developed an Excel application to help her employer out with scheduling and status in a small wood manufacturing shop.  Excel was chosen as it was the lowest barrier to entry, and the quickest to get out the door.  It wasn’t a mission-critical app and I wasn’t getting paid or anything, so I thought I could get something delivered fairly easily.

After all, what was needed was “no big deal” and “we just need something that works”.

The final solution used a lot of hidden columns to calculate intermediate results, and macros to make it easier for the end user to interact with the spreadsheet.  The problem is that there are absolutely zero tests on anything, nor can their ever be.  There’s no such thing as “ExcelUnit”.  I found a “VBAUnit”, but it was last released over 4 years ago.

For a while, I couldn’t figure out why I was so worried about releasing (i.e., emailing them a copy) the Excel app.  I realized that I had been coding without any confidence that what I was delivering worked, and would continue to work.

I’ve been so accustomed to having tests and automated builds as my backup, coding without them felt dirty and a little scary.  I was asked “so does it work?” and my only answer was “I hope so”.  I was entrenched in ”CyfDD”, or “Cross-your-fingers Driven Development”.  Does it work?  I dunno, better cross your fingers.  CyfDD is a close cousin of “GoykapDD”, or “Get-on-your-knees-and-pray Driven Development”.  Releasing only once per year or two leads to GoykapDD.

Sometimes I get asked why I bother with automated tests and builds.  Frankly, without automated tests and builds, I have zero confidence in my code.  Nor should I, or should anyone else for that matter.  Confidence in code written without automated tests and builds is just delusion.

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Jimmy Bogard

I'm a technical architect with Headspring in Austin, TX. I focus on DDD, distributed systems, and any other acronym-centric design/architecture/methodology. I created AutoMapper and am a co-author of the ASP.NET MVC in Action books.
This entry was posted in Testing. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://www.lostechies.com/blogs/joe_ocampo/ Joe Ocampo

    That is awesome! I would also ask what is your level of confidence in estimating new features? Is there a direct correlation to test coverage?

  • http://grabbagoft.blogspot.com/ Jimmy Bogard

    It’s definitely a contributing factor. Having tests doesn’t guarantee my changes won’t have unknown side effects, though. But at least I’ll get quick feedback if there are any.