Refactoring: a real case of a nested if structure transformed into a chain of responsibility
It seemed a normal day of work when one of our managers called a meeting to inform us of a very urgent feature that should be put in production within 2 days. So, between the deriving chaos and the tons of alignment meetings, we produced a code that basically "worked", but we weren't happy about it. Luckily we were able at least to write the tests. So, once we put in production the feature, we decided to immediately refactor the piece of code.
January 10, 2019 - 45 min read ⏱️⏱️⏱️⏱️⏱️