3 ms·
I'm sure thousands of words could be written about why code is like writing. The similarity in process is what strikes me most, but I found it easier to write
by dkarl 18y ago
I'm sure thousands of words could be written about why code is like writing. The similarity in process is what strikes me most, but I found it easier to write up a few aesthetic guidelines that apply to both.
1. You mustn't make your readers think hard without rewarding them for their effort.
2. Quality is apparent in many dimensions and at all scales. Defects from any perspective affect the quality of the work as a whole. Writers have strengths and weaknesses, but must strive for competence by every measure.
3. Readers strive for simplicity and coherence. For instance, if a character behaves in an unexpected manner, readers will try very hard to reconcile the character's behavior as the actions of a coherent, believable individual. Characters can be multifaceted and dynamic, but outright insanity should be used with caution. (See rule 1. What is true of characters is also true of objects, classes of objects, and functions.)
4. Verbosity dilutes good qualities and amplifies bad ones. (See rule 1.)
5. If a beautiful chapter can be replaced with a good sentence, or a beautiful sentence can be replaced with a good word, then the substitution must be made. (This may not be true for all writing, but it is true of all code.)
6. Innovation is welcome, but should be focused and purposeful. (See rule 1.)
7. Deviation from these rules is welcome, but should be focused and purposeful. (See rule 1.)
- bsaunder 18y agoI agree. Further, I think the creation process is similar (start with an outline or rough draft and make revisions). The more extensive the later revisions, the more painful they are to make. Even the smallest change later on in the process can result in a significant inconsistency. Unfortunately for software a small inconsistency can kill the whole thing, writings seems more resilient here.