Tuesday, May 22, 2007

I suppose it's like skydiving


This is one of those things you tell your kids, "Now, it's OK for me to do this but you shouldn't try this." Last night, we had to run a test of our system. It was supposed to be an all-night test so we could still see everything running when we came back in the morning. We're being put under increased pressure to make faster progress on this project. Most of the group have been staying late and/or working at home on this.

So, just before I left for the night, a need arose for a function (or method as we object-oriented programmers say :-) to read a large data file and get the information at the beginning and save that to a separate file. The "end" of the section at the beginning varies and you have to read part of the beginning section (the beginning section is called a "header" in Information Technology) to find out where the end of the header will be. Not hard but not obvious, either. We have other methods to do parts of this but nothing to do the whole task and do it simply. So, I stayed a little later to write the code and then add it to our code repository (we use CVS on this project) so the other programmers can get to it. I didn't have time to test it because I needed to leave (I was late already) and because my test program hadn't been updated in a long time. So, I told the fellow who was running the all-night test about my untested code being available. He said he'd use it - we both took a leap of faith!

We came in this morning and the test had run successfully all night. One more milestone to cross off the list and we didn't waste an evening. But I'd never make it as a skydiver. I worried about this all night. When I found out the test ran successfully this morning ("You mean the 'chute opened?"), I promised myself I'd never pass untested code on again. I hope I can keep to that promise.

No comments: