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

  1. The Art of Naming Things
  2. Functions Should Do One Thing
  3. To Comment or Not to Comment
  4. Handling Errors Gracefully
  5. Don't Repeat Yourself (DRY)
  6. Objects vs. Data Structures
  7. An Introduction to the SOLID Principles
  8. Unit Tests: Your Code's Best Friend
  9. The Tricky World of Concurrency
  10. A Place for Everything (Code Organization)
  11. Keep Your Imports Tidy
  12. A Taste of Functional Programming
  13. Taming Asynchronous Code with Async/Await
  14. No More Magic! The Power of Meaningful Constants
  15. Encapsulation, The Protective Shield
  16. Composition Over Inheritance
  17. Say What You Want (Declarative Programming)
  18. The Power of Immutability
  19. The Power of a Consistent Style
  20. The Art of Continuous Refactoring
  21. Code Smells: What They Are and How to Fix Them
  22. Speak the Same Language: A Guide to Naming Conventions
  23. Keep It Short and Sweet: The Art of Small Functions
  24. Taming Long Parameter Lists with Objects
  25. The Guard Clause Pattern
  26. The "Extract Method" Refactoring
  27. The "Extract Variable" Refactoring
  28. Type Safety: Your Code's Guardian Angel
  29. The Art of Good Documentation
  30. Formatting Matters More Than You Think