You don't need to read Clean Code in 2023

At least not the whole thing

Posted by vahid on May 17, 2023

If you are an experienced developer you don't really need to read the book clean code by Robert C. Martin now. Of course if you haven’t yet. At least you don't need to read the whole book. Recently we have reviewed clean code in our company’s weekly training program, and we came to conclusion that most of its practices are woven to the tools that we are using daily and tailored as conventions and styles in most code bases. It's a bit like watching the movie “2001: A Space Odyssey” in 2023. It's an amazing book for it's time but the ideas are so repeated in other books and tools that they don't look novel anymore. So, I listed the parts that still worth your while.

And here are the other parts that you still may want to read from the book.

·       Good Naming: Avoiding Hungarian notation is a repeated advice everywhere. and yes 

o   Use Pronounceable Names

o   Pick One Word per Concept 

o   Don’t Pun

o   Use Solution Domain Names

o   Don't prefix everything with solution name/abbreviation

·       Structuring your functions

o   Keep them small

o   Single responsibility principle

·       Comments

·       Formatting -> don't bother with it, it's implemented in almost every IDE

·       Objects and Data Structures

o   Don't include business rules in Active Records

o   Objects and Data structures are different stuff

o   treat the Active Record as a data structure and to create separate objects that contain the business rules

·       Error Handling

o   Use Exceptions Rather Than Return Codes

o   Don't return null

·       Boundaries

·       Unit Test

o   F.I.R.S.T: your tests should be Fast, Independant, Repeatable, Self-Validating, and Timely

·       Classes

o   Classes should be small

·       Systems

Ok, read this chapter ;)

·       Emergence

o   "Simple Design" rules:

§  Runs all the tests

§   Contains no duplication

§  Expresses the intent of the programmer

§  Minimizes the number of classes and methods

·       Concurrency

·       Successive Refinement

آموزش مقدماتی پایتون 10 آموزش مقدماتی پایتون 9 آموزش مقدماتی پایتون 8