Thursday, January 13, 2011

The Spiritual Discipline of Debugging

I've been working on a software problem off and on for many weeks now. It should have been done a few weeks ago, but I keep getting it not quite right. It involves transforming about 100 million lines of data from one format to another, with some complicated rules. Mostly it works, but there are a few lines that convert wrong.

Each time that it fails I have to look at my program and figure out what I did wrong. I was working on it this morning when I had an aha about the debugging process itself. Successfully debugging your own code requires several habits:

1. Be methodical

2. Look at the whole problem

Up until this point, it is could be considered just a mental discipline. But there is an important habit that takes it out of the purely mental domain:

3. Approach your code as if anything you did has an error.

This last habit is humility. The debugging "Eureka!" came when I looked at a line of code that I had reviewed ten times or more, and always assumed that it was of course correct. I decided to think about it one more time, and suddenly saw an error. The program may not be done yet, but I definitely found an important bug. Not because I thought smarter, but because I thought more humbly. The Aha was about the debugging process itself. If you had asked me, I'm not sure I would have emphasized humility as critical to the debugging process.

I leave the application to the rest of life to the reader.

Monday, January 3, 2011

Being versus Acting

I recently had a discussion about "being called" to the ministry. The topic came up of persons who "want to be" a minister, and their reasons. I'm not simply trying to be pedantic about words, go with me on this for bit.

Shift to my work field, software. I have encountered two different kinds of people: those who "want to be a programmer" and those who "want to program." The former group is often attracted to what they see as above average pay, flexible work hours, and a certain (nerdly) status. The second group has a passion for programming and working with computers, and want to do that as a job. One person I know in the former group has slowly bounced from job to job because she wants to "be a project manager." She's quite smart, detail oriented, with good communication skills - but her passion is for the position, not the work.

I wonder about some of our ministers. Do they what want to "be a minister" - or do they want "to minister?"