Mar 29, 2010

Formating, Objects & Data Structures, Error Handling

Formating, team rules out weigh personal rules.  Make it clean and consistent.

Objects & Data Structures

Procedural code (code using data structures) makes it easy to add new functions without changing the existing data structures.  OO code, on the other hand, makes it easy to add new classes without changing existing functions. 

Error handling, used exceptions rather than return codes.  Wrap third party exceptions. Don’t return null if you can avoid it.

public List getBooks() {
if(..there are no books)
    return Collections.emptyList()
}
About
Developing software should be simple and rewarding, not painful and overly complicated Subscribe via RSS.