Skip to content

IvoNet/GildedRose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The GildedRose kata

see also here: Developers anonymous

YouTube Demo

In this version I will try to show the changes step by step.

Step 0:

git checkout master

This step is the origional code. This code is the code to be refactored.

Step 1:

git checkout step_1

This step handles moving of a major part of the responsibility of the processing to the correct place.

Ask yourself the question. Who is responsible for the updateQuality method actions?

Step 2:

git checkout step_2

Polymorphism baby! "One name to rule them all..."

Step 3:

git checkout step_3

Wrap primitives... "Tell don't ask!"

Step 4:

git checkout step_4

Look at me being beautiful code :-)

Step 5:

git checkout step_5

Went a bit overboard and eliminated the name property also.

Step 6:

git checkout step_6

We still had some "Feature Envy" by exposing the SellIn and Quality class by getter methods.

About

The GildedRose kata

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages