Question

It seems that some rules of writing code are in direct contradiction with the rules of human writing. For example in code it's advisable to define each piece of information in only one place and in writing for humans it's normal to repeat important points (though usually phrased differently).

What rules of writing good code contradict the rules of good writing?

Was it helpful?

Solution

Indentation rules (most coding standards impose) really contradict
    rules of good writing,
    the way people perceive information,
    and the grammar rules.
Making things (that group naturally, but not syntactically) inside 
parenthesis also contradicts how texts are usually typed.
If (you try to type text that way)
    you'll face misunderstanding even (if programmers read you)
otherwise
    your text will be easy to read,
    and your writing will be productive
!

OTHER TIPS

  1. capitalizationIsUsuallyAtTheBeginning
  2. underlines_are_usually_under_the_words_not_the_spaces
  3. subject.verb(noun,noun)

Good code doesn't require interpretation whereas good writing often can. Shakespeare comes to mind as an example here. The vagueness of some writing doesn't exist in code often is another way to see this.

Good poetry in writing lets the reader appreciate music of sounds that resonate together.

Good poetry in code (I wouldn't be surprised if someone came with an example from IOCCC) lets the reader only appreciate the performance (and the compiler wouldn't notice at all).

Licensed under: CC-BY-SA with attribution
scroll top