Skip to content

Instantly share code, notes, and snippets.

View xplayer's full-sized avatar

Pietro xplayer

View GitHub Profile

#Functions ##Functions should be small Four to six lines long

  • "A long function is where the classes go to hide"

##Functions should do only one thing

  • "if a function manipulate more than one level of abstraction, it's clearly doing more than one thing"
  • "in order for a function to do one thing, it must not cross level of abstraction"

###Extract 'till you drop!

#Names

##The name that you use should reveal your intent

  • comments are a smell of a badly chosen name!
  • Only choose names that communicate your intent

##Use pronounceable names

##Avoid disinformation

  • Make sure that a name says what it means, and means what it says