Super Summary of Clean Code

American Software Engineer and Author Robert C. Martin have done an awesome job by writing the book “Clean Code” in a detailed manner and with so many examples. By reading this book you can have a dramatic change in your coding mind. But who doesn’t have much time to read the full book and want to know the gist and utilize the concept of “Clean Code” this article can be the appropriate choice for you.

What is Clean Code?

  • Understandable
  • Readable
  • Changeable
  • Extensible
  • Maintainable

Overall

  • Standard conventions
  • Simple & Stupid
  • Cleaner than previous

Names

  • Descriptive and unambiguous
  • Meaningful
  • Pronounceable
  • Searchable
  • Contextual
  • Memorizable
  • Consistent

Functions

  • Small
  • Single Task
  • Descriptive names
  • Fewer arguments
  • Side effects less
  • Segregated

Classes

  • Small
  • Single Responsibility
  • SOLID
  • Encapsulated

Comments

  • Self-explanatory is better
  • DRY (Don’t Repeat Yourself)
  • Noiseless
  • Clarified
  • Avoid if you can

Source code structure

  • Separated vertically
  • Related Together
  • Similar Together
  • Shortline
  • Indented

Tests

  • One assert
  • Readable
  • Fast
  • Independent
  • Repeatable

What is Smelly Code?

  • Rigid
  • Fragile
  • Immobile
  • Complex
  • Redundant
  • Opaque

Anisuzzaman Babla

12 years of overall software engineering experience, including working in the Financial Technology (Fintech) industry.- Proficient in Microservices, Go, Java, Spring Boot, and Android. Strong focus on code reviews, ensuring adherence to coding standards and best practices.

Previous Post Next Post

Contact Form