Rohit Pant's Blog (28)

Interface Segregation Principle


From the bunch of SOLID , I guess this is a fairly easy principle to understand. One of the basics of OOP is that we must code to interfaces and not to classes. Assuming that you have done that just make sure that your interfaces are not getting FAT. FAT is a common word used to explain this principle. By FAT we mean an interface with loads of methods in it and eventually all of them are not required by the classes that implement these interfaces.One direct issue with FAT…


Added by Rohit Pant on May 31, 2012 at 1:00am — No Comments

Liskov Substitution Principle


            Barbara Jane Liskov was the first women american computer scientst who earned a PHd in computer science. She is the one who also came up with Liskov substituion principle and it is the 'L' in SOLID. She coined this term in 1987. First let's see what it means in her own words. "If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms…


Added by Rohit Pant on February 19, 2012 at 12:00am — No Comments

Open Close Principle

Open Close Principle

'O' in SOLID is Open Close Principle. Termed a long time back and of course is very effective today also. It was coined somewhere 1988 by Bertrand Meyer  in his …


Added by Rohit Pant on February 11, 2012 at 6:30am — No Comments

Single Responsibility Principle

Single Responsibility principle [SRP]
                                                  This means that any software module just should have one reason to change and that is what is called as responsibility. Let's jump to an example quickly to get this started. In an Inventory Management System for a medicine export business, if there is a Product class then it might have some methods like showExpiryDate(),…

Added by Rohit Pant on December 3, 2011 at 2:00am — No Comments

GoF Series - Singleton Pattern


               Time for Singleton.


GoF Intent 

“Ensure a class only has one instance, and provide a global point of access to it”

Why Singleton ?

Well, why not ? This is a very common pattern and as it's intent suggests it is all about making only one instance per class. There might be a strong…


Added by Rohit Pant on September 1, 2011 at 12:30am — No Comments

GoF Series - Abstract Factory

Hello !

                 Time for another pattern. Abstract Factory (AF). Let's start with the GoF intent.


Intent :

"Provide an interface for creating families of related or dependent objects without specifying their concrete classes"


Deep Dive

There are many ways of arriving at this pattern when it…


Added by Rohit Pant on August 14, 2011 at 10:00pm — No Comments

GoF Series - Decorator Pattern



                   it's time for Decorator pattern today. It's an easy pattern and as the name suggests it surely decorates core objects as per the business requirements. Let's start.


GoF Intent

“Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub classing for extending…


Added by Rohit Pant on July 31, 2011 at 1:30pm — No Comments

GoF Pattern Series - Composite


              It's time for Composite pattern.


GoF Intent ­ 

“Compose objects into tree structures to represent part­whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly” .


This is definitely a better definition than Bridge, isn't it ? Gives a clear hint that there might be times when we need a tree structure to come to our rescue…


Added by Rohit Pant on July 9, 2011 at 6:30am — No Comments

GoF Pattern Series - Bridge


             GoF Intent “Decouple an abstraction from its implementation so that the two can vary independently”. This is one definition which is magical. If I see the words used for constructing the definition, I feel that I know these words. Words like Decouple, Abstraction, Implementation we all come along with them all the time. But if I read the sentence I don't understand it. How is that possible, it's pure magic. Let us try to understand this pure…


Added by Rohit Pant on July 2, 2011 at 11:30pm — No Comments

GoF Pattern Series - Facade


     GoF define Façades intent as ­ “Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher­level interface that makes the subsystem easier to use”.

A good way to remember Façade is to imagine a sub system that is badly designed or complex or legacy system. In all the cases there might be a need to reuse the system because of some reason or the other. You know sometimes we do get to work in a project which needs to interact…


Added by Rohit Pant on June 11, 2011 at 10:30pm — No Comments

GoF Pattern Series - Adapter



There is no real reason to pick these three patterns for the first blog on series of pattern related blogs. It's just that we had to make a start, somewhere !  But these three patterns are very interesting and to some extent very similar. Consider a diagram below ­                              

Client → Adapter → Original Class                             

Client → Façade → Original…


Added by Rohit Pant on June 10, 2011 at 3:00am — No Comments

Multi Tenant Systems and Me

Dear Friends,

                     There is a possibility of making one of the systems that we developed for one of the client to be available to more than one of his clients :) The requirement is straight forward - one installation should be accessible to multiple organizations/set of people or whatever. I think it's a common scenario these days but something I had actually not done in past. At i2 (where I used to work earlier) there was no such concept at least in the product lines…


Added by Rohit Pant on May 10, 2011 at 4:00am — No Comments

SAAC - Software As a Commodity


I recently hosted a podcast on AWS on Bangalore Software Radio. You can get it here. But this podcast got me thinking about many other things that I see changing around me and how they clearly depend on each other. For instance – top class hardware is now a commodity. What about software ? Some time back hardware was expensive. So after spending million of dollars on hardware one would not mind spending a…


Added by Rohit Pant on April 11, 2011 at 1:06am — No Comments

Podcast Number # 1

Dear All,

                Very recently I started Bangalore Software Radio and did our first recording. It was a tech news podcast and we could talk a bit about Twitter, HTTPS, Security, Google and Duck Duck Go !

In future we are planning to do more newscasts and more detail technical podcasts so watch this space !




Added by Rohit Pant on March 29, 2011 at 9:00am — No Comments

Stanford Lecture and One of Our Internal Project !

Hi !
This blog is about a Stanford video and project we did. They have no relation whatsoever just that the video contents got me thinking, sorry about that :)

Let's start with an example - of generating…

Added by Rohit Pant on March 7, 2011 at 3:00am — No Comments

Technical Debt - Part 2

Hi All:
Technical Debt is a debt and therefore there needs to be principal and interest and there has to be a formula somewhere. When I started looking more on technical debt I came across some interesting stuff. In my opinion we have two posts - one on SonarJ website and one by…

Added by Rohit Pant on February 14, 2011 at 11:30pm — No Comments

It's All About Passion and Cricket at Stragure !

Dear All:

                  Some of the engineers are just too crazy about cricket. Earlier at Stragure they had made India Vs SA android app over the weekend. Before I knew in last two days, they made one more small app for world cup. Today I saw them recording a video about the same and lo before I could blink they uploaded it on youtube


By the way Ind Vs SA series android app did well in it's…


Added by Rohit Pant on February 14, 2011 at 10:00pm — No Comments

Technical Debt - Part 1

Hi All !
                  Very recently there was an article Gartner published stating that technical debt could grow upto $500 billion towards the end of 2010 and has the potential to grow upto $1 Trillion by 2015.
The question is what is technical debt ? In short it's a term…

Added by Rohit Pant on February 6, 2011 at 7:30am — No Comments

Getting Hit !

Hey !

             Around 2 weeks back when we decided to write some server side code which would finally come down to mobile (android to start with), we did not know what to expect. We forgot to put Google analytics and therefore, could not do deep slice and dice on hits. Finally reading server logs was not too much fun and we decided to put Google analytics in place and got some…


Added by Rohit Pant on January 21, 2011 at 3:53am — No Comments

The Weekend Job - Live Cricket Scores !

Hey - guess what , yesterday Friday afternoon a bunch of us sat together and thought 'let's do something for getting the live cricket scores on mobiles'.


So this is what we did  - 


1) We wrote a small server side Java code which runs inside a servlet container to handle the load, hopefully :)

2) We wrote a small android code which runs on the device

3) We don't want the stuff to go down under load , so we load balanced it and for the time being…


Added by Rohit Pant on January 8, 2011 at 10:01am — No Comments

Blog Topics by Tags

Monthly Archives





© 2015   Created by Rohit Pant.

Badges  |  Report an Issue  |  Terms of Service