{"id":20511447,"url":"https://github.com/friedrith/clean-code","last_synced_at":"2026-03-06T20:31:00.394Z","repository":{"id":175823612,"uuid":"623436652","full_name":"friedrith/clean-code","owner":"friedrith","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-17T19:17:43.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T22:44:27.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/friedrith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-04T11:20:24.000Z","updated_at":"2023-04-04T11:20:24.000Z","dependencies_parsed_at":"2024-11-18T07:46:52.349Z","dependency_job_id":null,"html_url":"https://github.com/friedrith/clean-code","commit_stats":null,"previous_names":["friedrith/clean-code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/friedrith/clean-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friedrith%2Fclean-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friedrith%2Fclean-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friedrith%2Fclean-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friedrith%2Fclean-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/friedrith","download_url":"https://codeload.github.com/friedrith/clean-code/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friedrith%2Fclean-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30196172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:36:01.379Z","updated_at":"2026-03-06T20:31:00.373Z","avatar_url":"https://github.com/friedrith.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clean code\n\nThe 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\u0026qid=\u0026sr=)).\n\nThis repo is just a list of examples illustrated with code and is not intended to be exhaustive.\n\n\u003e 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.\n\n## Rules\n\n- [Prefer polymorphism to conditions](./rules/prefer-polymorphism-to-conditions.md)\n- [Boy scout rule](./rules/boy-scout-rule.md)\n- [Less comments is better](./rules/less-comments-is-better.md)\n- [Avoid flag parameters](./rules/avoid-flag-parameters.md)\n- [Given, when, then pattern](./rules/given-when-then-pattern.md)\n- [One level of abstraction per function](./rules/one-level-of-abstraction-per-function.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriedrith%2Fclean-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriedrith%2Fclean-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriedrith%2Fclean-code/lists"}