Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
add comment

4 Answers

up vote 12 down vote accepted
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
!
share|improve this answer
    
I love it! This is the sort of answer that makes me wish I could upvote some things more than once... –  Mason Wheeler Oct 8 '10 at 19:10
add comment

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.

share|improve this answer
add comment
  1. capitalizationIsUsuallyAtTheBeginning
  2. underlines_are_usually_under_the_words_not_the_spaces
  3. subject.verb(noun,noun)
share|improve this answer
add comment

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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