Twelve Ways to Make Code Suck Less
summary
Twelve concrete practices: schedule regular time to pay technical debt, prefer high cohesion and remove or relocate coupling, replace custom code with JDK utilities when possible, use Java streams to express intent (example: filter primes, map sqrt, limit K, sum), catch surprising metrics like cyclomatic complexity 864 or a 40,000‑line method, keep methods at a single level of abstraction, name things well, comment why not what, review tests before code and write a failing test to show bugs, and minimize mutable state.
AI-written summary · about
chapters (17)
- 0:00ORACLE CODE
- 2:31What's Quality Code?
- 3:18Schedule Time to Lower Technical Debt
- 5:54Favor High Cohesion
- 6:37low cyclomatic complexity
- 8:33Favor Loose Coupling
- 11:07Program with Intention
- 13:43Avoid Primitive Obsession
- 15:34Imperative code is packed with accidental complexity.
- 23:29Prefer Clear Code over Clever Code
- 27:42Apply Zinsser's Principle on Writing
- 33:55Write Expressive Self-Documenting Code
- 36:59Avoid Long Methods-Apply SLAP
- 39:24Perils of Long Methods
- 43:17Variable Names Represent Abstractions
- 43:41Do Tactical Code Reviews
- 44:37Facilitating Tactical Code Reviews
related talks
15mHow to Write Bad Java Code
48m97 Things Every Java Programmer Should Know
42m97 Things Every Java Prog. Should Know
46mStrengthening Java Apps: Best Practices in Secure Coding for Java Developers
51m5 Tips to Make Your Java Apps More Awesome!
57mTen Common mistakes made in Functional Java
57mReal World Lean Java Practices, Patterns, Hacks and Workarounds
57mLearning To Code In Functional Style with Java
