Archive for category SOLID Principles

Tech Interview – Refactoring V – Convention Based Factory

In the previous part we fixed the code which reads the Person instances from the datafiles. A part of this code was a Factory class based on a switch statement. This solution is ok, but when we add a new parser, we need to remember to add a new case block to the switch statement. […]

Leave a comment

Tech Interview – Refactoring IV – SOLID Refactor

In this part we are going to refactor the parsers and the factory method more, utilizing design patterns and the SOLID principles.

Leave a comment