> For the complete documentation index, see [llms.txt](https://petozoltan.gitbook.io/simplecode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://petozoltan.gitbook.io/simplecode/clean-code/clean-code-introduction/origin-and-overview.md).

# Origin & Overview

### Uncle Bob & The Book

* [Clean Code book](/simplecode/clean-code/clean-code-outline.md) <img src="/files/-M1fWXiUcG6NuCZSWuw5" alt="" data-size="line">
* Robert C. Martin a.k.a. *Uncle Bob* <img src="/files/-M7mtpto8WHCTtAtfJzx" alt="" data-size="line">

### Named principles

* In the book: SRP, OCP, DIP, (IoC), DI, DRY, LOD, BSR, F.I.R.S.T.
* Not in the book: LSP, ISP, YAGNI, KISS, S.O.L.I.D.

Coding

* **SRP** Single Responsibility Principle
* **OCP** Open Closed Principle
* **DIP** Dependency Inversion Principle
* **(IoC)** Inversion of Control
* **DI** Dependency Injection
* **DRY** Don't Repeat Yourself
* **LOD** Law of Demeter
* **BSR** Boy Scout Rule
* **LSP** Liskov Substitution Principle
* **ISP** Interface Segregation Principle
* **YAGNI** You Ain't Gonna Need It
* **KISS** Keep It Simple Stupid
* **S.O.L.I.D** SRP + OPC + LSP + ISP + DIP

Testing

* **F.I.R.S.T.** Fast, Independent, Repeatable, Self-validating, Timely

### Why clean code?

* [The total cost of owning a mess](/simplecode/clean-code/clean-code-outline/why-clean-code.md#technical-debt) <img src="/files/-M1fWXieduUp2uGbybE9" alt="" data-size="line">
* [The real measure of code quality](/simplecode/clean-code/clean-code-outline/clean-code.md#possible-measurements) <img src="/files/-M1fWXiX5DDYJbGdYSxM" alt="" data-size="line">

### What is bad code like?

Readability

* Spaghetti code
* Dependencies
* Fragile code
* Unreadable
* Mind mapping
* Duplication
* Unexpected
* Magic numbers
* Overcomplexity
* Code smell
* Antipatterns
* Technical debt

Functionality

* Bugs
* Does not fulfill the specification
* Side effects

Programmer style

* Careless
* Sloppy
* Lazy
* Quick and dirty

### What is clean code like?

* Elegant
* Simple
* Direct
* Readable
* Expressive
* Carefully written
* Tested
* Bugs cannot hide
* Art
