emilybache / Racing-Car-Katas

Several code katas on a racing car theme
https://youtu.be/ldthYMeXSoI
MIT License
302 stars 351 forks source link

Contribute Swift version of the Telemetry and Leaderboard katas #80

Closed gsl-anthonymerle closed 5 months ago

gsl-anthonymerle commented 5 months ago

Hi Emily,

I just watched your Youtube video regarding this series of coding katas! I wanted to give it a try but didn't find all exercices in Swift, so here is my contribution for the Telemetry and Leaderboard katas

Thanks, Anthony

codecop commented 5 months ago

Thank you. Do we need the main files? Regarding deleted files, were they added by accident? Why do we not need them any more? (Sorry little Swift knowledge here ...)

gsl-anthonymerle commented 5 months ago

Hello @codecop,

Thanks for your answer, here are some explanations (I should have added them in the PR's description, sorry πŸ™):

We need the main files because I created the projects to be executables, so that we can use the main file to do some manual tests for example (as in the TelemetrySystem's kata, the executable runs a single systemCheck and prints the result) I could have done the same kind of example on the Leaderboard kata, or maybe better: make the Leaderboard a library (instead of an executable) so that I can get rid of the main file. What would you prefer ?

Regarding deleted files, the two already existing projects were out of date and came with a whole iOS application project for each because we were forced to do that until Apple's Swift Package Manager was released. Because of that, the Swift kata was aggregated with UIKit/iOS-app code that may distract the person trying to work on the kata. With the Swift Package, it is now focused on the kata's classes and nothing more (no ViewController, Storyboard, AppDelegate to deal with) Also, the TirePressure project has now been migrated into its own github repository, in which I made a swift contribution as well (https://github.com/emilybache/TirePressure-Kata/pull/5)

Sorry little Swift knowledge here ...

No worries, there are so many languages out there... I personally don't even know how to HTML/CSS 🀷 πŸ˜…

codecop commented 5 months ago

Thank you. The other languages which I know do not have main functions so please get rid of both

codecop commented 5 months ago

And if you have port/fix fir tire pressure Kata it would also great to have it here too (duplicated) as this repo has all 5 micro katas

gsl-anthonymerle commented 5 months ago

Hello @codecop,

I made the changes you requested πŸ‘ Because I also made a swift port of TurnTicket and HtmlConverter katas, I added them as well to the repository.

I removed all main.swift files as asked πŸ‘

I also reorganised how the swift katas were organised. At first I made it so that each kata had its own Swift Package project, but now they are all grouped into a single "RacingCars" Swift Package and each kata is a single module/target of the package. The result is that the dev now has to open only one project to be able to see all katas instead of having to move into each katas to open their own project. Here is a screenshot of what it looks like on Xcode: Capture d’écran 2024-05-30 aΜ€ 11 27 39

Please tell me if you this proposal suits you, or if you would prefer to see one project per kata

Thanks, Anthony

codecop commented 5 months ago

Thank you I like this. @emilybache what do you think?

emilybache commented 5 months ago

Looks great, thanks!

gsl-anthonymerle commented 5 months ago

Thank you @emilybache and @codecop πŸ™ :)