An open API service indexing awesome lists of open source software.

https://github.com/friedrith/clean-code


https://github.com/friedrith/clean-code

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

# Clean code

The clean code method is a opinionated way to clean your code promoted by Robert C. Martin in the book _Clean Code_ ([Apple Book](https://books.apple.com/ca/audiobook/clean-code-a-handbook-of-agile-software/id1556265951), [Amazon](https://www.amazon.ca/Clean-Code-Robert-Martin-Craftsmanship/dp/B08LF126HT/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=&sr=)).

This repo is just a list of examples illustrated with code and is not intended to be exhaustive.

> Never consider the following rules are absolute. They are best practices to follow but the job of developers is to understand the context and constraints and estimate when it is useful to apply these rules and when it is better to break them.

## Rules

- [Prefer polymorphism to conditions](./rules/prefer-polymorphism-to-conditions.md)
- [Boy scout rule](./rules/boy-scout-rule.md)
- [Less comments is better](./rules/less-comments-is-better.md)
- [Avoid flag parameters](./rules/avoid-flag-parameters.md)
- [Given, when, then pattern](./rules/given-when-then-pattern.md)
- [One level of abstraction per function](./rules/one-level-of-abstraction-per-function.md)