Justin du Coeur (jducoeur) wrote,
Justin du Coeur

And *that* is why we write a test harness...

I just made about two dozen changes to the DB schema -- little stuff, but pervasive. (I'm cleaning up the code to match Java coding standards, which are subtly different from the C# standards I'm used to.) In many cases, that would simply be too damned *scary* to do: since many of the changes are inside SQL strings, I don't have strong typing to save me from my mistakes. This fear of completely breaking the system is the source of much of the cruft in typical programs: routine and appropriate cleanups just aren't worth the danger that they impose on the system, so they never happen.

But this time I've built the system appropriately, with a reasonably detailed test harness coming in from the very beginning. It doesn't cover absolutely everything, but the coverage is good enough for me to have considerable faith that the system is still working. So I'm able to make a change that touches a couple dozen files, in various risky ways, in just a couple of hours, and check it in with confidence that I haven't caused the end of the world.

A little thing, but a good reminder of why it's worth putting in the time for this kind of overhead stuff from the start. It may be a little frustrating to slow down and build the system right, but it pays off big down the road...
Tags: programming

  • How I Spent My Birthday

    (Warning: diary ramble ahead.) Intercon was scheduled a couple of weeks earlier than usual this year -- our experimental hotel last year wasn't…

  • Hamilton Sing-Along

    Almost done with a *very* long weekend at Arisia. Generally been a great time -- worked hard, got to spend lots of time with friends, and have had a…

  • Musical Comedy

    The annoying cough I've been dealing with for a week finally turned into a full-on, OMFG, now-I-see-why-everyone's-so-draggy Monster Headcold…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment