- Introduction
- Process
- Style
- Consider Code Generators Carefully
- Optimise For Readability
- Prefer Readable Code To Comments
- Javadoc Judiciously
- Remember Kiss And Yagni
- Prefer Composition
- Keep It Solid
- Keep Your Code Dry
- Prefer Reversible Decisions
- Make Dependencies Explicit
- Prefer Immutable Objects
- Use A Consistent Code Layout
- Group Methods For Easy Comprehension
- Keep Methods Small And Simple
- Methods Should Do One Thing
- Avoid Null
- Use Final Liberally
- Provide No More Than One Worker Constructor
- Avoid Checked Exceptions
- Specifics
- Know How To Implement Hashcode And Equals
- Do Not Reassign Parameters
- Limit Scope
- Prefer For Each Loops To For Loops
- Prefer Maps And Filters To Imperative Loops
- Avoid Apis From Prehistory
- Beware Casts And Generics Warnings
- Do Not Use Magic Numbers
- Do Not Use The Assert Keyword
- Avoid Floats And Doubles
- Do Not Use Reflection
- Know The JDK One Liners
- Tests
- Write Specifications Not Tests
- Think Units Not Methods
- Name Tests With A Specification Style
- Pick Examples Carefully
- Make Tests Easy To Understand
- Understand How To Use Mocks And Stubs
- Understand Your Options For Code Reuse
- Write Repeatable Tests
- Only Unit Test Code It Makes Sense To Unit Test
- Testing FAQS
- Bad advice