Hacking Is Like Drafting

Posted 4 years ago | Originally written on 22 Oct 2020
All the revision in the world will not save a bad first draft: for the architecture of the thing comes, or fails to come, in the first conception, and revision only affects the detail and ornament, alas!
T. E. Lawrence

I've previously talked about the three stages of writing software. The first step, hacking, is akin to drafting a document. No one submits their first draft as the final draft. Yet why is a lot of code running on the first draft?

The stuff of software is exactly the same as written text. They are both subject to copyright but somehow we take text written to be read by human authors a bit more seriously. We are wont to re-read and polish our writing to make sure that our point comes across clearly. We 'refactor' our writing by reorganising the order and placement of the text to maximise the chance that the reader will not have to struggle.

I think we should think of code in the same way. It should be anathema to only go over code once. There should be some automatic way of making explicit the number of times a unit of software has been revised and edited. There should be code editors whose job is to read the code and edit it, not just for efficiency but for clarity so that future developers will be able to get going with minimal effort.

Great writing exalts the reader and demonstrates that the author values the reader's mind.

As writers of software we should embody the craft of the diligent writer knowing that as we writing for the machine we also have to consider the human behind it.