Retour au glossaire
Code Review & Qualite

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.

Pourquoi c'est important

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.

Exemple

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; }

Termes lies

clean codewhat is clean codeclean code principlesRobert Martin

Automatisez le Code Review avec diffray

Systeme d'IA multi-agent pour code review. Trouve automatiquement bugs, vulnerabilites de securite et problemes d'architecture.