Zuruck zum Glossar
Code Review & Qualitat

Clean Code

Code that is easy to understand, simple to modify, and clearly expresses the intent of the programmer. A philosophy popularized by Robert C. Martin.

Definition

Clean code follows principles from Robert Martin's book "Clean Code": meaningful names, small focused functions, clear intent, minimal dependencies, and no duplication (DRY). Clean code reads like well-written prose — each function tells a story at its level of abstraction. The Boy Scout Rule says to always leave code cleaner than you found it.

Warum es wichtig ist

Developers spend 10x more time reading code than writing it. Clean code reduces this cognitive load, making maintenance faster and less error-prone. Studies show teams with clean code practices have 50% fewer bugs and onboard new developers 3x faster.

Beispiel

Instead of: function calc(a,b,c) { return a*b-c/2; } — clean code would be: function calculateDiscountedTotal(subtotal, discount, tax) { return subtotal * discount - tax / 2; }

Verwandte Begriffe

clean codewhat is clean codeclean code principlesRobert Martin

Automatisieren Sie Code Review mit diffray

Multi-Agent KI-System fur Code Review. Findet automatisch Bugs, Sicherheitslucken und Architekturprobleme.