Skip to content

Thoughts on "Clean Code"

Core Ideas

Code is written for humans, not for machines.

1. Naming

  • Use intention-revealing names
  • Avoid disinformation
  • Make meaningful distinctions

2. Functions

  • Small
  • Do one thing
  • One level of abstraction per function

Personal Thoughts

In daily development, we often neglect code quality to meet deadlines. But "Later equals never" (LeBlanc's Law). Bad code slows down the team and eventually leads to project failure.

Keeping code clean is not OCD, but professional ethics.