I have been playing around with MongoDb, thanks to the M101J Course offered by Mongodb University. These NoSQL datastores are gaining popularity due to a number of reasons and one among them […]
Getting rid of Getters and Setters in your POJO
We all have read in Java books about encapsulation of fields in Java class and also when ever you code you are asked to take special care in encapsulating the fields and […]
Strategy Pattern using Lambda Expressions in Java 8
Strategy Pattern is one of the patterns from the Design Patterns : Elements of Reusable Object book. The intent of the strategy pattern as stated in the book is: Define a family […]
Simple example to illustrate Chain Of Responsibility Design Pattern

GoF Design pattern book states the intent of Chain of Responsibility pattern as: Avoid coupling the sender of a request to the receiver by giving more than one object a chance to […]
My First steps in Test Driven Development- A Win-Win strategy
Agile practitioners talk about Test Driven Development(TDD), so do lot of developers who care about their code quality and workability. And I once upon a time, not so long ago managed to […]
Using JDeodorant to refactor java code
I got to know about JDeodorant– a tool for identifying bad smells in code and helping it to refactor. I got curious and downloaded its Eclipse plugin, I then picked the first […]
Why is the legacy code is the way it is?
What is legacy code?
At the start of the post I tried to get some definition for the term: “legacy”. (we wish if the noun was true! but indirectly they are one of the reasons for our pay). The adjective definition is somewhat closer to our “legacy code”.
Legacy code is something:
that has been written previously ( may be years old or even months, may be written by another developer or by the same developer) and continues to work just well to satisfy the customer needs.
that is being written as I am writing this post (and it is something which evolves to a legacy code stature in no time) and just enough to implement the requirements.
Redundancy – An open enemy to writing good code
Those who are working on High Available systems/databases consider Redundancy as one of the possible ways to achieve high availability. Redundancy in this case is helping in positive way. But consider the […]
Another aspect of coupling in Object Oriented paradigm
I had previously written a post related to coupling and cohesion hereĀ and that was more of a basic definition of both the terms. In this post I would like to throw some […]
SOLID- Liskov Substitution Principle
Liskov Substitution principle (LSP) states that, Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it This principle was written […]