Programming is not surgery

When I was first courting Dawn, she taught me two surgeons’ mottos: Dawn-Small

Get in, get done, get out

Minimize time, trash, and trauma

(”Trash”, here, is foreign material introduced into the body.)

I’ve been fond of repeating these, but I now realize the first one is bad advice for programmers. It should be:

Get in, get done, improve, get out

You see, while a surgeon is in there fixing one problem, she might also fix another one she discovers, but there’s not really any practice like refactoring. Maybe there ought to be, since your body is a gross kludge, but there isn’t.

The un-amended version of the motto puts too much weight on time and will almost certainly lead to a slow decay of the code.

The second motto, then, should be something like:

Minimize time and trauma,
but don’t forget to pick up any trash lying around

Not nearly so catchy.

2 Responses to “Programming is not surgery”

  1. bobcorrick Says:

    I tend to find that reading and refactoring is most effective before making a change, and I tend to do less refactoring once I have a new feature running and tested. (Get in, improve and get done, get out?)

    And if the second motto implies any priority, I’d suggest: minimize trauma (don’t break other features), minimize trash (remove unused code/comments) and minimize time (for yourself and others, now and during “after-care”).

    Thank you for the analogy.

  2. Zac Says:

    Get in, get right, get out?

Leave a Reply

You must be logged in to post a comment.