Remove switch statements using polymorphism

In this post we will use polymorphism to remove switch statements. Inappropriately using switch statements is a sign of code smell. Robert Martin in his book Clean Code says that he limits himself to one switch statement per object type. We will use example of a Customer class. Initially we will use switch statements to implement the methods of the class. Then we will use polymorphism to refactor it and [Read More]

Android clean architecture

One of the primary goal of building software is to meet the business goal. Weather it be a simple shopping list application or a large banking application, they exist to solve a problem. As the software grows in functionality it need to be able to cope with changing business requirements. Well written software can accommodate changes quickly without affecting other parts of the application. With the growth of software many [Read More]