Coding Interview Challenge Practice: Learn How to Approach The Gilded Rose and Other Katas to Read and Improve Code

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

  1. Course Introduction
  2. Module 1: Gilded Rose: Making Sense of Conditional Logic
    1. Lesson 1.1: Introduction to Code Reading
    2. Lesson 1.2: Initial "scan" of Gilded Rose Code
    3. Lesson 1.3: Practicalities - Getting the Code
    4. Lesson 1.4: Jetbrains Free License Offer
    5. Lesson 1.5: Code Reading - Folding
    6. Lesson 1.6: Ensuring Adequate Test Coverage
    7. Lesson 1.7: Initial Simplifications of the Gilded Rose Code
    8. Lesson 1.8: Manipulating Conditionals Safely
    9. Lesson 1.9: Lift Up Conditional Refactoring
    10. Lesson 1.10: Lift Up Conditional on Gilded Rose
    11. Lesson 1.11: Strategy So Far and Next Steps Outline
    12. Lesson 1.12: Alternative Option - Incremental Rewrite
    13. Lesson 1.13: Gilded Rose Solution Summary
  3. Module 2: Tennis: Separate Intention from Implementation
    1. Lesson 2.1: Code Smells
    2. Lesson 2.2: Code Reading - Scanning - in Tennis
    3. Lesson 2.3: Code Reading with IDE Tools
    4. Lesson 2.4: Demo - Using Extract Method to Refactor TennisGame6
    5. Lesson 2.5: Improving Code with Extract Method - When and Why
    6. Lesson 2.6: Demo - Using Extract Method to Refactor TennisGame1
    7. Lesson 2.7: Strategy Overview - Reading then Improving Unfamiliar Code
    8. Lesson 2.8: Analysis of How to Handle TennisGame2
    9. Lesson 2.9: Demo - Refactoring TennisGame3
    10. Lesson 2.10: Analysis of How to Handle TennisGame4
    11. Lesson 2.11: Demo - Refactoring TennisGame5
    12. Lesson 2.12: Module Summary
  4. Module 3: Parrot: Replace Conditional with Object-Oriented Design
    1. Lesson 3.1: Module Introduction
    2. Lesson 3.2: Reading the Code and Initial Ideas
    3. Lesson 3.3: Repeated Switches Code Smell
    4. Lesson 3.4: The Target Design with Polymorphism
    5. Lesson 3.5: Demo - Replace Constructor with Factory Method
    6. Lesson 3.6: Demo - Same Refactoring Only Without Tools
    7. Lesson 3.7: Create Subclasses
    8. Lesson 3.8: Push Down Method "getSpeed"
    9. Lesson 3.9: Reconsidering the "type" Variable
    10. Lesson 3.10: Handling "Refused Bequest" Code Smells
    11. Lesson 3.11: Fixing the "lazy element" with an Interface
    12. Lesson 3.12: Module Summary
  5. Module 4: Theatrical Players: Separating Concerns
    1. Lesson 4.1: Module introduction
    2. Lesson 4.2: Reading the Code and Identifying Smells
    3. Lesson 4.3: Discovering the Divergent Change Problem
    4. Lesson 4.4: Creating Structural Separation with Extract Method
    5. Lesson 4.5: Split Loop then Extract Method
    6. Lesson 4.6: Split Phase Part 1 - Introduce StatementData
    7. Lesson 4.7: Split Phase Part 2 - Move Remaining Calculation Logic
    8. Lesson 4.8: Replace Loop with Pipeline
    9. Lesson 4.9: Discovering Repeated Switches
    10. 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): Emily Bache
  • Release date: September 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 0790145800190