https://github.com/friedrith/clean-code
https://github.com/friedrith/clean-code
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/friedrith/clean-code
- Owner: friedrith
- License: mit
- Created: 2023-04-04T11:20:24.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-17T19:17:43.000Z (over 2 years ago)
- Last Synced: 2025-03-05T22:44:27.965Z (over 1 year ago)
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)