0:00 / 0:00
#gildedrosekata#refactoring#testdrivendevelopment
Java to Kotlin Gilded Rose - Part 1 Refactoring to Objects
Pairing with Duncan
4.5K subscribers • 15 videos on Hallway
- Recommended by 2 people: 2 in engineering communities.
- Presented by Duncan
- Linked in the descriptionemilybache/GildedRose-Refactoring-Katadmcg/gilded-rose-kata
Intermediate. Assumes working knowledge.
5.3K views5 years ago2 recommendations
Programming languagesSoftware designKotlinJava and the JVMRefactoring and legacy code
Duncan migrates the classic Gilded Rose refactoring kata from Java to Kotlin, refactoring procedural code into an object-oriented design.
The Gilded Rose (github.com/emilybache/GildedRose-Refactoring-Kata) is a classic refactoring kata, available in many languages. In this video series (youtube.com/playlist?list=PL1ssMPpyqocjo6kkNCg-ncTyAW0nECPmq) we start with the Java version (github.com/emilybache/GildedRose-Refactoring-Kata/tree/main/…) and show how to migrate it to Kotlin as well as refactoring the procedural code into both object-oriented and functional styles. Here we take the procedural Java code, convert it to Kotlin, then refactor into an object-oriented solution using inheritance to represent the different types of item. Importing the Project Approval Tests Introduce Kotlin Refactor to Understand Introduce BaseItem Subclass BaseItem More Method Extraction Operation Ordering Checking the Spec Expressing the Spec Simplify Review Part 2 (youtu.be/ajl3dpNTdM0) takes the inheritance solution arrived at here and refactors it to use composition. The code is available at github.com/dmcg/gilded-rose-kata This video content supplements the O'Reilly book Java to Kotlin, A Refactoring Guidebook (java-to-kotlin.dev).Why it's here
2 people recommend thisWhat people say. Recommended as an excellent walkthrough of refactoring and migrating code from Java to Kotlin.
u/TheShrikeTreeOfPainin r/Kotlin • Recommends
On “Best Kotlin courses in 2022?”
link to this video
Java to Kotlin as a walkthrough of a refactoring lesson is well worth a watch (Gilded Rose)