Skip to content

Don’t comment bad code—rewrite it.

“Don’t comment bad code—rewrite it.” quote by Brian W. Kernighan
Download Open image
““Don’t comment bad code—rewrite it.””

Brian W. Kernighan

About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Rewrite bad code instead of merely commenting on it.

In simple terms: Fix code, don’t just annotate.

Key Takeaway

Prioritize clean, functional code.

Themes

software development code quality best practices programming

Mood

practical direct concise

Type

Code:1 Comment:1 Software-craftmanship:1 Software engineering:1 Technology:1 Bad Code:1 Code Rewrite:1 Comment Bad:1

When to use this quote

  • code reviews
  • maintenance
  • team collaboration
  • learning new languages

Key Concepts

refactoring code hygiene software craftsmanship

Questions to Reflect On

  • When is it better to comment rather than rewrite?
  • How do you decide the cost of refactoring?
A Different Perspective

Time spent rewriting may delay delivery; balance with project deadlines.

★ ★ ★ ★ ★ No ratings yet

More by Brian W. Kernighan

Explore all 2 Brian W. Kernighan quotes

More Code quotes

Browse all 1,662 Code quotes