Code Smells : Bloaters (Long Methods, Long Class)

Code Bloats or Code Bloaters are probably the most common signs of code smells you can see in any branch of code. In fact, eradicating bloaters act as the first step towards refactoring your code. Bloaters are nothing but classes or methods that have grown excessively over a long time marking it difficult to work … Continue reading Code Smells : Bloaters (Long Methods, Long Class)

Design Patterns : Strategy Pattern

Strategy Pattern lets you create a family of strategies (algorithm) encapsulated into separate interchangeable classes. In our example, we will consider a Client class which needs to invoke different sorting algorithm.   Let's first create the contract interface for different Sorting algorithm. Now that we have our interface ready, let's go ahead and implement different … Continue reading Design Patterns : Strategy Pattern