Sparkbox Code Challenge: Gilded Rose

09-08-21 Jon Oliver Gary Tempus Jordan Leven

In this Sparkbox Code Challenge, you are tasked with refactoring and detangling complex logic in service of adding a new feature in the Gilded Rose kata. Are you up for the challenge?

We have a team that likes to continuously learn. Sparkbox Code Challenges encourage us to stretch ourselves, explore, and learn. We invite you to learn along with us in this code challenge.

The Challenge

This code challenge is based on the Gilded Rose kata. This kata reflects a common problem when working with long-lasting, real-world codebases: adding a new feature to an existing module that already contains complex/messy logic.

In this challenge, you will practice refactoring and detangling complex logic in service of adding a new feature. This will empower you to confidently make design changes in a precise, targeted way through TDD and design patterns.

Watch a full introduction with Sparkboxer Jon Oliver.

Does this challenge sound fun? Share your solution on Twitter. Don’t forget to tag us with @hearsparkbox and use #SparkboxCodeChallenge.

Try the Challenge

Possible Solutions

Here are some solutions Sparkboxers have come up with to build and style a sign-up form.

Sparkboxer Jon explains a solution using the strategy pattern.

Resources:


Sparkboxer Gary explains refactoring and suggests a method for arriving at a solution via established refactoring patterns.

Resources:


Sparkboxer Jordan explains solving this challenge by focusing on small, incremental changes with a short feedback loop.