{"id":47076385,"url":"https://github.com/codurance/refactoring-bank-kata","last_synced_at":"2026-03-12T06:43:09.896Z","repository":{"id":196916356,"uuid":"697449255","full_name":"codurance/refactoring-bank-kata","owner":"codurance","description":"Refactoring the bank kata while discovering and fixing code smells.","archived":false,"fork":false,"pushed_at":"2024-02-26T13:26:57.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-02-27T11:35:31.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/codurance.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}},"created_at":"2023-09-27T18:49:53.000Z","updated_at":"2024-02-27T11:35:31.051Z","dependencies_parsed_at":"2024-02-26T11:44:02.993Z","dependency_job_id":null,"html_url":"https://github.com/codurance/refactoring-bank-kata","commit_stats":null,"previous_names":["codurance/refactoring-bank-kata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codurance/refactoring-bank-kata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codurance%2Frefactoring-bank-kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codurance%2Frefactoring-bank-kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codurance%2Frefactoring-bank-kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codurance%2Frefactoring-bank-kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codurance","download_url":"https://codeload.github.com/codurance/refactoring-bank-kata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codurance%2Frefactoring-bank-kata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30417617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T06:40:58.731Z","status":"ssl_error","status_checked_at":"2026-03-12T06:40:40.296Z","response_time":114,"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":"2026-03-12T06:43:08.680Z","updated_at":"2026-03-12T06:43:09.890Z","avatar_url":"https://github.com/codurance.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# refactoring-bank-kata\n\nIn this repository, we try to refactor the bank kata, which can be found [here](https://www.codurance.com/katas/bank).\n\nWe start from a bank kata which works, but can hardly be understood, to a code which is way easier to understand and extend.\nWe recorded a video which can be found on our youtube channel trying to improve the code we have.\n\nBear in mind the final solution is not perfect. The idea with this project is to gradually improve the project, discover\ncode smells and make the code easier to understand and extend.\n\n## Code smells detected\n\n- Bad naming\n- Primitive obsession\n  - Transaction type needed\n- Data Clumps\n  - Duplicated variables in withdraw and deposit\n- Dispensables (something pointless and unneeded whose absence would make the code cleaner, more efficient and easier to understand)\n  - Comments -\u003e Are not needed\n  - Duplicated Code -\u003e deposit and withdraw\n  - Explain what a dataclass is, why clock is not and then refactor it\n  - Dead Code -\u003e unused code\n  - Speculative Generality -\u003e unused class, method or parameter\n- Large Class\n  - Bank class has too many responsibilities\n- Improvements\n  - Should printer know about the Transaction class?\n  - Who should be responsible for updating the balance, the bank class or the repository?\n  - Is the Clock class really needed or a function would do just fine?\n  - Is lack of typing a code smell?\n\n## Structure of the repo\n\nThe repo starts from the bank.py file which we want to refactor. Inside the _step_by_step_refactors_ folder, you will find\nsmall improvements, each improvement at a time in a different file. Each file has its corresponding test file. We keep all\nclasses in a single file to keep the exercise easier to follow.\n\nHope you enjoy the exercise and the youtube video. We are here for feedback :D\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodurance%2Frefactoring-bank-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodurance%2Frefactoring-bank-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodurance%2Frefactoring-bank-kata/lists"}