{"id":24535705,"url":"https://github.com/jamesbroadberry/codingchallenge-bees","last_synced_at":"2025-03-15T23:44:47.473Z","repository":{"id":104351518,"uuid":"261595909","full_name":"JamesBroadberry/CodingChallenge-Bees","owner":"JamesBroadberry","description":"An OO based coding challenge written in C# with a WPF based UI implementing MVVM","archived":false,"fork":false,"pushed_at":"2020-05-06T17:49:03.000Z","size":238,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T12:32:47.597Z","etag":null,"topics":["code-challenge","csharp","mvvm","wpf"],"latest_commit_sha":null,"homepage":"","language":"C#","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/JamesBroadberry.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":"2020-05-05T22:22:06.000Z","updated_at":"2020-05-18T13:17:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"51bbdfcc-f6aa-4d37-88f6-ffa87359cfc7","html_url":"https://github.com/JamesBroadberry/CodingChallenge-Bees","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/JamesBroadberry%2FCodingChallenge-Bees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesBroadberry%2FCodingChallenge-Bees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesBroadberry%2FCodingChallenge-Bees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesBroadberry%2FCodingChallenge-Bees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesBroadberry","download_url":"https://codeload.github.com/JamesBroadberry/CodingChallenge-Bees/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806040,"owners_count":20350775,"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-challenge","csharp","mvvm","wpf"],"created_at":"2025-01-22T12:26:38.092Z","updated_at":"2025-03-15T23:44:47.467Z","avatar_url":"https://github.com/JamesBroadberry.png","language":"C#","readme":"# Coding Challenge\n\nThis coding challenge is an OO based challenge for C#.\nThe specification of the challenge can be found [here](Challenge.md).\n\n## Part 1\n\nI have addressed Part 1 by creating the \"Bees.Core\" project as a .NET Standard class library to be later re-used. It's design is loosely coupled so can be further extended later on if required.\n\n## Part 2\n\nI have addressed Part 2 by creating the \"Bees.UI\" project as a .NET Core 3 WPF application using MVVM concepts. This is not my strong point since my usual UIs are web-based and my knowledge of MVVM and WPF is limited.\n\nThe Boilerplate file \"RelayCommand.cs\" is a file re-used from a previous MVVM project to make using an ICommand easier.\n\n## Testing\n\nUnit tests have been written to cover the requirements provided to ensure that all required functionality is present.\n\nNUnit 3 was chosen as the testing framework since it's what I'm comfortable with and didn't see any reason to use something different right now.\n\nThe format of the tests follow a GivenASituation_ThisActionShouldHappen format.\n\nA report of the test coverage can be found [here](TestCoverage.zip).\n\n![A screenshot of the dotCover test coverage report](TestCoverage.png \"Test coverage screenshot\")\n\n## What I'd do differently next time\n\n- I'd change is the way which the view model populates the bees by extracting that functionality to a more commonly used pattern.\n- I'd change is to take some of the hard-coded values out in to an application settings file to be able to adjust them on the fly. Examples of these values include the intial health of the bees, the 0-80 range for how much damage is dealt, how many of each type of bee are generated.\n- I'd also dependency inject the Random class to be able to mock it in tests to be able to test how much damage will be dealt. This is because there is a (very) small chance that it can return 0 and potentially deal no damage.\n- I'd also look at some UI testing frameworks to be able to test things such as all elements being visible, actually pressing the buttons and seeing UI elements react to that.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesbroadberry%2Fcodingchallenge-bees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesbroadberry%2Fcodingchallenge-bees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesbroadberry%2Fcodingchallenge-bees/lists"}