Clean Code: A Curated Collection
Welcome! This is my personal and curated collection of principles from one of my all-time favorite books, "Clean Code" by Robert C. Martin. I found myself revisiting these concepts often, so I decided to rewrite and compile the most impactful ones in an easily accessible format.
Join me as we explore the world of clean, maintainable, and efficient code. Each article has been rewritten to be more conversational and uses practical, modern TypeScript examples to illustrate the concepts.
The Articles
- The Art of Naming Things
- 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: Your Code's Best Friend
- The Tricky World of Concurrency
- A Place for Everything (Code Organization)
- Keep Your Imports Tidy
- A Taste of Functional Programming
- Taming Asynchronous Code with Async/Await
- No More Magic! The Power of Meaningful Constants
- Encapsulation, The Protective Shield
- Composition Over Inheritance
- Say What You Want (Declarative Programming)
- The Power of Immutability
- The Power of a Consistent Style
- The Art of Continuous Refactoring
- Code Smells: What They Are and How to Fix Them
- Speak the Same Language: A Guide to Naming Conventions
- Keep It Short and Sweet: The Art of Small Functions
- Taming Long Parameter Lists with Objects
- The Guard Clause Pattern
- The "Extract Method" Refactoring
- The "Extract Variable" Refactoring
- Type Safety: Your Code's Guardian Angel
- The Art of Good Documentation
- Formatting Matters More Than You Think