DEV Community


Discussion on: The noble art of refactoring - Part 0

aleksikauppila profile image
Aleksi Kauppila • Edited

Guilded rose is so much fun to do ❤️

I’ve personally enjoyed two approaches:

  1. Go line by line from the top and extract methods to add meaning. You can get quite far without tests.

  2. Adding all tests and do as dramatic changes as possible while still keeping the feedback loop really short, like couple of minutes at most. Usually it’s extracting item classes one by one.

patferraggi profile image
Patricio Ferraggi Author

I agree, I followed this two approaches in my try, In a few days I will post the result. Although I didn't went full on my object orientation by extracting every item into classes, I did separate every behavior into functions.