Book 3 The Way to Clean Code

I finished reading the famous "The Way of Clean Code" in the evening - because a colleague who had left the company recommended this book to me, but I also read it intermittently for a month. The first half of this book is still very exciting, and the second half has been browsed because of sticking a lot of code.

  • meaningful naming
  • Functions do only one thing
  • Functions should be short
  • Functions have only one level of abstraction
  • The number of function parameters, more than three use the parameter object
  • Exception catch try...catch is only one thing
  • DRY 原则 do not repeat yourself
  • Advantages of Structured Programming
  • try not to comment
  • don't return null don't pass null
  • learn log4j
  • Classes should be short
  • Class name description rights and responsibilities
  • SRP classes have one and only one reason to modify
  • The system should consist of many short classes, each encapsulated into a responsibility
  • DIP classes should rely on abstraction rather than implementation
  • DCP classes should be open for extension and closed for modification
  • AT IOC
  • EJB Entity Bean
  • Transversal Surface of Concern AOP
  • Concurrency
  • JUNIT


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326339030&siteId=291194637