Video description
The Gilded Rose Kata and other code katas are popular because they offer developers the opportunity to learn code skills in a practical way. They are also often used to test developers as part of the take-home challenge in the interview process. Often you’re working with code you didn’t write yourself, yet you need to make sense of it quickly so you can add a new feature or fix a bug. This course will show you how to use the tools you have available in your IDE to rapidly read and understand various varieties of awkward code, at the same time as safely improving the design. We’ll also go through some common Object Oriented designs to use when your code is missing important abstractions.
By making small safe design improvements as you read code, you gain better understanding and control of unfamiliar code and also leave it in a better state for the next reader. The important thing to remember is to do it in safe small steps and make good use of automated tools. This course will help you to improve your code, your use of your IDE, and your design skills.
What you’ll learn and how to apply it
By the end of the course, learners should be able to
- Use code-reading techniques like scanning, code folding and highlight usages.
- Identify when to use common refactorings like extract method, introduce parameter and introduce variable.
- Recognize safe refactoring techniques and explain when and why they would use them.
- List suitable OO designs to move towards when refactoring.
This course is for you because
- You are a programmer interested in learning to design better code.
- You are looking to move into a new role from junior developer to more senior developer.
- You want to become more proficient at using your IDE tools including refactoring.
- You want to get better at OO design.
Prerequisites
- Basic Java
- Basic OO design
- Basic usage of an IDE like IntelliJ or Eclipse
Course Materials
Table of contents
- Course Introduction
-
Module 1: Gilded Rose: Making Sense of Conditional Logic
- Lesson 1.1: Introduction to Code Reading
- Lesson 1.2: Initial "scan" of Gilded Rose Code
- Lesson 1.3: Practicalities - Getting the Code
- Lesson 1.4: Jetbrains Free License Offer
- Lesson 1.5: Code Reading - Folding
- Lesson 1.6: Ensuring Adequate Test Coverage
- Lesson 1.7: Initial Simplifications of the Gilded Rose Code
- Lesson 1.8: Manipulating Conditionals Safely
- Lesson 1.9: Lift Up Conditional Refactoring
- Lesson 1.10: Lift Up Conditional on Gilded Rose
- Lesson 1.11: Strategy So Far and Next Steps Outline
- Lesson 1.12: Alternative Option - Incremental Rewrite
- Lesson 1.13: Gilded Rose Solution Summary
-
Module 2: Tennis: Separate Intention from Implementation
- Lesson 2.1: Code Smells
- Lesson 2.2: Code Reading - Scanning - in Tennis
- Lesson 2.3: Code Reading with IDE Tools
- Lesson 2.4: Demo - Using Extract Method to Refactor TennisGame6
- Lesson 2.5: Improving Code with Extract Method - When and Why
- Lesson 2.6: Demo - Using Extract Method to Refactor TennisGame1
- Lesson 2.7: Strategy Overview - Reading then Improving Unfamiliar Code
- Lesson 2.8: Analysis of How to Handle TennisGame2
- Lesson 2.9: Demo - Refactoring TennisGame3
- Lesson 2.10: Analysis of How to Handle TennisGame4
- Lesson 2.11: Demo - Refactoring TennisGame5
- Lesson 2.12: Module Summary
-
Module 3: Parrot: Replace Conditional with Object-Oriented Design
- Lesson 3.1: Module Introduction
- Lesson 3.2: Reading the Code and Initial Ideas
- Lesson 3.3: Repeated Switches Code Smell
- Lesson 3.4: The Target Design with Polymorphism
- Lesson 3.5: Demo - Replace Constructor with Factory Method
- Lesson 3.6: Demo - Same Refactoring Only Without Tools
- Lesson 3.7: Create Subclasses
- Lesson 3.8: Push Down Method "getSpeed"
- Lesson 3.9: Reconsidering the "type" Variable
- Lesson 3.10: Handling "Refused Bequest" Code Smells
- Lesson 3.11: Fixing the "lazy element" with an Interface
- Lesson 3.12: Module Summary
-
Module 4: Theatrical Players: Separating Concerns
- Lesson 4.1: Module introduction
- Lesson 4.2: Reading the Code and Identifying Smells
- Lesson 4.3: Discovering the Divergent Change Problem
- Lesson 4.4: Creating Structural Separation with Extract Method
- Lesson 4.5: Split Loop then Extract Method
- Lesson 4.6: Split Phase Part 1 - Introduce StatementData
- Lesson 4.7: Split Phase Part 2 - Move Remaining Calculation Logic
- Lesson 4.8: Replace Loop with Pipeline
- Lesson 4.9: Discovering Repeated Switches
- Lesson 4.10: Module Summary
Product information
- Title: Coding Interview Challenge Practice: Learn How to Approach The Gilded Rose and Other Katas to Read and Improve Code
- Author(s):
- Release date: September 2024
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 0790145800190
You might also like
article
Reinventing the Organization for GenAI and LLMs
Previous technology breakthroughs did not upend organizational structure, but generative AI and LLMs will. We now …
article
Communicate with Teams More Effectively
This selection of shortcuts will enable you to improve your communication, critical thinking, documentation, and networking …
audiobook
The Year in Tech, 2025
<B>A year of HBR's essential thinking on tech—all in one place.</B><br/><br/><br/><br/>Generative AI, biometrics, spatial computing, electric …
video
Refactoring the Gilded Rose Kata in Java
Join Christian Clausen in his live coding challenge of refactoring the famous Gilded Rose Kata.