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…Continue
Added by Rohit Pant on May 31, 2012 at 1:00am — No Comments
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…Continue
Added by Rohit Pant on February 19, 2012 at 12:00am — No Comments
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 …Continue
Added by Rohit Pant on February 11, 2012 at 6:30am — No Comments
Added by Rohit Pant on December 3, 2011 at 2:00am — No Comments
Time for Singleton.
“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…Continue
Added by Rohit Pant on September 1, 2011 at 12:30am — No Comments
Time for another pattern. Abstract Factory (AF). Let's start with the GoF intent.
"Provide an interface for creating families of related or dependent objects without specifying their concrete classes"
There are many ways of arriving at this pattern when it…Continue
Added by Rohit Pant on August 14, 2011 at 10:00pm — No Comments
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.
“Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub classing for extending…Continue
Added by Rohit Pant on July 31, 2011 at 1:30pm — No Comments
It's time for Composite pattern.
“Compose objects into tree structures to represent partwhole 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…Continue
Added by Rohit Pant on July 9, 2011 at 6:30am — No Comments
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…Continue
Added by Rohit Pant on July 2, 2011 at 11:30pm — No Comments
GoF define Façades intent as “Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higherlevel 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…Continue
Added by Rohit Pant on June 11, 2011 at 10:30pm — No Comments
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…Continue
Added by Rohit Pant on June 10, 2011 at 3:00am — No Comments
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…Continue
Added by Rohit Pant on May 10, 2011 at 4:00am — No Comments
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…Continue
Added by Rohit Pant on April 11, 2011 at 1:06am — No Comments
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
Added by Rohit Pant on March 7, 2011 at 3:00am — No Comments
Added by Rohit Pant on February 14, 2011 at 11:30pm — No Comments
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…Continue
Added by Rohit Pant on February 14, 2011 at 10:00pm — No Comments
Added by Rohit Pant on February 6, 2011 at 7:30am — No Comments
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…Continue
Added by Rohit Pant on January 21, 2011 at 3:53am — No Comments
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…Continue
Added by Rohit Pant on January 8, 2011 at 10:01am — No Comments