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?

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)
    your text will be easy to read,
    and your writing will be productive
  • I love it! This is the sort of answer that makes me wish I could upvote some things more than once... Oct 8 '10 at 19:10
  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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.