Clean Code: A Curated Collection
This is my practical collection of ideas from Robert C. Martin's "Clean Code". I have rewritten the principles I revisit most often and paired them with modern TypeScript examples.
The Articles
- Naming Things Clearly
- Functions Should Do One Thing
- To Comment or Not to Comment
- Handling Errors Gracefully
- Don't Repeat Yourself (DRY)
- Objects vs. Data Structures
- An Introduction to the SOLID Principles
- Unit Tests: Writing Useful Unit Tests
- Concurrency and Shared State
- Organising Code by Feature
- Keep Your Imports Tidy
- A Taste of Functional Programming
- Async/Await Without the Tangle
- Meaningful Constants
- Encapsulation, The Protective Shield
- Composition Over Inheritance
- Declarative Programming
- Immutability and Shared State
- Consistent Code Style
- Continuous Refactoring
- Code Smells: What They Are and How to Fix Them
- Speak the Same Language: A Guide to Naming Conventions
- Small Functions
- Parameter Objects
- The Guard Clause Pattern
- The "Extract Method" Refactoring
- The "Extract Variable" Refactoring
- Type Safety: Your Code's Guardian Angel
- Documentation That Helps
- Formatting Matters More Than You Think