{"id":18474420,"url":"https://github.com/codecop/lcd-numbers-di-framework-kata","last_synced_at":"2025-04-08T12:32:15.438Z","repository":{"id":52625823,"uuid":"273761727","full_name":"codecop/LCD-Numbers-DI-Framework-Kata","owner":"codecop","description":"Refactoring LCD Numbers to remove the dependency injection framework.","archived":false,"fork":false,"pushed_at":"2021-04-22T21:54:23.000Z","size":226,"stargazers_count":19,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T12:41:28.471Z","etag":null,"topics":["code-kata","dependency-injection","exercise","kata","refactoring"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-20T18:18:48.000Z","updated_at":"2023-12-14T08:00:59.000Z","dependencies_parsed_at":"2022-08-21T07:40:13.664Z","dependency_job_id":null,"html_url":"https://github.com/codecop/LCD-Numbers-DI-Framework-Kata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecop%2FLCD-Numbers-DI-Framework-Kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecop%2FLCD-Numbers-DI-Framework-Kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecop%2FLCD-Numbers-DI-Framework-Kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecop%2FLCD-Numbers-DI-Framework-Kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecop","download_url":"https://codeload.github.com/codecop/LCD-Numbers-DI-Framework-Kata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247842758,"owners_count":21005342,"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":["code-kata","dependency-injection","exercise","kata","refactoring"],"created_at":"2024-11-06T10:29:25.069Z","updated_at":"2025-04-08T12:32:12.871Z","avatar_url":"https://github.com/codecop.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LCD Numbers Remove DI Framework Kata\n\nRefactoring LCD Numbers to remove the dependency injection framework.\n\nThis is an implementation of the [LCD Numbers Kata](http://rubyquiz.com/quiz14.html)\nusing (excessive) outside-in development and making use of a dependency injection framework.\n\nThe starting point is available in different programming languages.\nThe `Main` class is the entry point to the application. Run it to see the LCD Numbers working.\nIt prints help how to run the application using the build tool (Maven, Gradle, ...) or standalone.\nThe production code is based on my\n[LCD Numbers Mocking Kata](https://github.com/codecop/LCD-Numbers-Mocking-Kata)\nwhich contains a diagram and a description of the solution in each language.\n\n## Detailed Requirements (copied from Ruby Quiz)\n\nThe `LcdDisplay` creates an LCD string representation of an integer value using a\n4x7 grid of space each, using minus and pipe characters for each digit.\nEach digit is shown below:\n\n     --      --  --      --  --  --  --  --\n    |  |   |   |   ||  ||   |      ||  ||  |\n    |  |   |   |   ||  ||   |      ||  ||  |\n             --  --  --  --  --      --  --\n    |  |   ||      |   |   ||  |   ||  |   |\n    |  |   ||      |   |   ||  |   ||  |   |\n     --      --  --      --  --      --  --\n\nThe bar size should be adjustable. The default value is 2 - as shown above.\nRead more about it at [RubyQuiz](http://rubyquiz.com/quiz14.html).\n\n## Tests\n\nThere are (integrated) tests covering the whole application.\nThere are sample LCD outputs in the `src/test/resources` folder\n(or similar depending on language) to be used in tests.\n\n## Your Refactoring Task\n\nThe original idea by [Nat Pryce](https://twitter.com/natpryce/status/1273916454317015040) is to\n\"replace use of a dependency injection framework with plain old functions and\nclasses that model the application domain.\"\n\n### First Steps\n\n[Phil Webb suggests](https://twitter.com/phillip_webb/status/1274417744205606913)\na few things you could do to your app to make the dependency injection\nframework a bit less invasive in the first place. (These might not apply to all\nlanguages.)\n\n* The first is you can use constructor injection. This will make it easier\n  to create objects without the framework.\n* If you use constructor injection it's possible (and often recommended) that\n  you write tests without involving the framework at all. This will help with\n  the migration.\n* Remove classes only created to support the dependency injection mechanism, e.g.\n  `ScalingArgument` or `CommandLineArguments`.\n\n### (Spoiler) Problems of the existing solution\n\nThe code contains loads of the dysfunction I see in apps that use DI heavily.\n\n* Needs a special test framework.\n* Dependencies obscured by reflection.\n* Objects that should be functions.\n* Loads of pointless logging.\n* Slow to start.\n* DI annotations in domain classes.\n* A bit of polymorphism making code navigation in the IDE more difficult.\n* And even more smells. \"It's like a fractal of code smells.\"\n\n### License\n\nThis work is licensed under a [New BSD License](http://opensource.org/licenses/bsd-license.php), see `license txt` in repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecop%2Flcd-numbers-di-framework-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecop%2Flcd-numbers-di-framework-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecop%2Flcd-numbers-di-framework-kata/lists"}