{"id":18756226,"url":"https://github.com/simonberner/coding-dojo-python","last_synced_at":"2025-11-29T21:30:13.067Z","repository":{"id":252415573,"uuid":"840348123","full_name":"simonberner/coding-dojo-python","owner":"simonberner","description":"A Coding Dojo in Python","archived":false,"fork":false,"pushed_at":"2024-08-25T14:40:22.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T01:58:46.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonberner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-08-09T13:57:08.000Z","updated_at":"2024-08-25T14:40:25.000Z","dependencies_parsed_at":"2024-11-07T17:52:29.839Z","dependency_job_id":null,"html_url":"https://github.com/simonberner/coding-dojo-python","commit_stats":null,"previous_names":["simonberner/coding-dojo-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonberner%2Fcoding-dojo-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonberner%2Fcoding-dojo-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonberner%2Fcoding-dojo-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonberner%2Fcoding-dojo-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonberner","download_url":"https://codeload.github.com/simonberner/coding-dojo-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239644129,"owners_count":19673582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-07T17:35:43.332Z","updated_at":"2025-11-29T21:30:13.004Z","avatar_url":"https://github.com/simonberner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Coding Dojo\n\nThis is my place for practicing coding in Python. Your are free to clone it and make it your own.\n\n## Setup\n\n- For creating a venv checkout the [docs here](https://python.land/virtual-environments/virtualenv).\n- Install/Upgrade the following things as dependencies in the projects venv (virtual environment):\n\n- `pip install -U pytest` (see [here](https://docs.pytest.org/en/8.2.x/getting-started.html#install-pytest))\n- `pip install -U pytest-watch` (see [here](https://pypi.org/project/pytest-watch/))\n\n### Update Packages\n\n- `pip list` (List all installed packages)\n- `pip list --outdated` (List all the outdated packages)\n- `pip install --upgrade package_name` (Update a specific outdated package)\n\n## Katas\n\n### Farkle Greed\n\n- [The Kata](https://codingdojo.org/kata/Greed/)\n- [More Information (Wiki)](https://en.wikipedia.org/wiki/Farkle#)\n\n## Approach\n\nTo solve the above coding katas I use [TDD](https://www.agilealliance.org/glossary/tdd/).\n\n1. Write a single failing unit test\n2. Write the simples possible code to make the test pass\n3. Refactor the code until it conforms to\n   the rule of simplicity (simplicity criteria)\n4. Repeat -\u003e accumulate more unit tests over time\n\n### [Rules of Simplicity](https://www.agilealliance.org/glossary/rules-of-simplicity/)\n\nA set of criteria, in priority order, proposed by Kent Beck to judge whether some source code is “simple enough”:\n\n- The code is verified by automated tests, and all such tests pass\n- The code contains no duplication\n- The code expresses separately each distinct idea or responsibility\n- The code is composed of the minimum number of components (classes, methods, lines) compatible with the first three\n  criteria\n\n## Learnings\n\n### Farkle\n\n\u003e`array_of_dice[:] = [x for x in array_of_dice if x != dice]`\n\n- The left side `array_of_dice[:]` is a slice of the entire list and points to all elements of the original list. It\n  does not create a new list, instead it allows assignment to all elements of the original list.\n- The right side `[x for x in array_of_dice if x != dice]` is the new list created by the list comprehension.\n- The assignment `=` replaces the entire content of array_of_dice with the new list.\n- This operation ensures that the original list object `array_of_dice` is updated in place, which is important if other\n  references to this list exist elsewhere.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonberner%2Fcoding-dojo-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonberner%2Fcoding-dojo-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonberner%2Fcoding-dojo-python/lists"}