Kotlin Refactoring Katas
A collection of katas either copied or ported from some amazing folks.
Objectives
- Make it easy to practice your refactoring skills in Kotlin without cloning or searching for individual repos.
What's in here?
The following list contains katas grouped under the names of folks who maintain them along with the number of lines of code sorted by ascending order. While LOC may not say much, you can still use it as a proxy to gauge the complexity of the problem each exercise presents.
- Gilded Rose LOC 97
- Supermarket Receipt LOC 238
- Tennis LOC 326
- Racing Car LOC 394
- Turn ticket dispenser LOC 32
- Tire pressure monitoring system LOC 56
- Telemetry system LOC 104
- Text convertor LOC 110
- Leaderboard LOC 172
- Fighter Dude 2 LOC 64
Tools
Feel free to use any tool or technique you see fit to practice your refactoring skills. All exercies in the repo have JUnit 5 as the default testing framework for you to get started with.
The modules do not have an assertion library or any other tools apart from JUnit 5.
Recommendations
The following are some of my favorites, and I might be biased. So feel free to do your research and pick the ones that suit your use case.
- IntelliJ IDEA - Obvious, for it's Kotlin support and IDE-assisted refactoring capabilities.
- Truth - Assertion library.
- ApprovalTests.Java - For bringing large portions of code under test quickly.
- ApprovalTests IntelliJ Plugin - IDE support for ApprovalTests, only supports Kotlin at the moment.
- TCR Extension - A TCR extension that can accelerate the pace of your refactoring workflow.
License
Various, please check out individual modules for the appropriate licenses.