Faith and Hope

January 12th, 2007

In the midst of one of those stream of consciousness conversations that sometimes take place late on a Friday, a Lab49 colleague asked me, “Is there a difference between faith and hope?” Now, I am not particularly an expert on either linguistics or philosophy but that never stopped me from trying to sound authoritative, so I gladly took up the challenge.

I offered, “To a religious person there certainly was a difference in that faith was an unquestioning belief while hope was more of a wishful expectation.” Those were not my extract words but it’ll due for the sake of brevity. Later that same day I was in a different sort of conversation with two other colleagues where, rather than trying to sound authoritative, I was apologizing for haven broken a Job Router service I was developing. After reflecting on both conversations I realized I could tie them together, hence this post.

In recent years I have become fairly religious about unit tests. I would not go so far as to characterize myself as a “born again” unit tester, but I certainly did preach the gospel of always writing a bare bones set of unit tests for all components. Even incomplete unit tests were better than none because they could more easily be extended later. I insisted that this should be done regardless of the pressure or enthusiasm to get something done. I also have always been an advocate of frequently check-ins to source control. In summary, code, compile, unit test, check-in, repeat. Furthermore, testable code is always better designed code.

Given this philosophy it is fair to ask how I found myself in the position of apologizing for breaking the service. It is here where I realized I could give another take on the difference between faith and hope. In my enthusiasm to add new features to my service, I became unfaithful to my philosophy. This was not a momentary lapse, for as it turned out, the Job Router service rested on top of a transport library I had developed that was completely devoid of unit tests (God have mercy on my soul). The service broke due to a recent extension of this library. To make matters worse, I had a working version of the service the night before but failed to check it in before making the changes (Bless me father for I have sinned it has been 30 years since my last confession).

Religious metaphor aside, I think there is an obvious message here and an answer to the difference between faith and hope. Writing unit tests gives me faith that my code is solid. This faith is not necessarily the belief that the code is bug free, but rather the unquestioning belief that any bugs found will be more quickly remedied and that the resulting unit test enhancements will move the code closer to perfection. Without the tests I could not have this faith; all I had was hope.

2 Responses to “Faith and Hope”

  1. Nick Says:

    Great post; I like the use of faith and hope.

  2. Sal Mangano Says:

    I hoped someone would like it. :-) Thanks.