BarcampLondon3 - inside the googleplex - session 3 - Norm’s Law
November 24th, 2007
“Always code as if the guy who ends up maintaining your code will be a violent psychopath who know where you live” Damian Conway
- Use spaces not tabs.
- Code goes no further than column 77.
- no-one ever died from too much whitespace.
- Separate operators and braces.
- Indent by four spaces.
- Line up assignments.
- Space keywords not functions.
- vertical rhythm.
- k & R bracketing
- one statement per line
- break lines before operators (except in JS)
- Use single quotes where posssible.
- Always use /x on regexps (removes all whitespace)
- Hungarian code is harmful.
- Short variable names harmful
- Use underscores not camel case.
Leave a Reply
You must be logged in to post a comment.