April 3, 2013
MarkBernstein.org
 
Follow me on Twitter

Progress

My first big programming project was a summer project in the gait lab at Rush St. Luke’s Presbyterian Hospital. I spent six or eight weeks there, building a graphics library for Tom Andriacchi that would take measurements of joint angles from experimental subjects and reconstruct where their legs were from moment to moment.

This was an exciting project, investigating the brand-new technology of replacement joints. Joint replacement was a big deal then; nowadays, people get new knees and hips and they’re quickly back on their feet.

I was thinking about that project this morning. I think my graphics library took a couple of months. Today, I could do a much better job in a week, and might be able to get a decent result in a hard day of work.

One reason is that I’m better. I spent a lot of time debugging the library, testing small changes in the hopes that each small change would make things right. The trigonometry quickly got gruesome, so there were plenty of opportunities for sign errors everywhere, but scattershot debugging of a mucked up system almost never succeeds. And I didn’t yet know about separating model and view logic, since Smalltalk-80 was well in the future.

One reason is that the tools are better. I remember that I lost a week on a compiler bug in which FORTRAN’s call by reference semantics permitted me to redefine the constant number “1” to a different value. Compilers still have bugs, but nothing as low-hanging as that!

This library would have been much nicer if it had been written with some object-oriented encapsulation. But object-oriented languages were only beginning to get off the ground, and I still hadn’t discovered that the Computer Science literature was much better than the (already dismal) Information Technology literature.

The big reason is that, now I have a computer. This library had to be written and debugged on a shared departmental minicomputer, and computer time was a scarce resource. You’d sign up for a brief slot, and try to get as much done as you possibly could. Other eager programmers queued for any minutes you didn’t need.

Of course, everything was memory constrained then, and everything was terribly slow. So edit-compile-run cycles took forever. There was no debugger; just diagnostic writes. In one long day of test-driven development on my MacBook Pro, I’d probably get more compiler-edit cycles done than I did in the whole summer.