Sunday, April 8, 2012

SOLID (object-oriented design)

I was discussing the "Double Dispatch" stuff with my brother, and I decided to dig into the OO Principles. So, while browsing the wiki I reached to SOLID. I am not an Academic Computer person, but it is pretty interesting; also a little lengthier for a non comp-sci person. I though I can put it down in some Simple words (may not be technically VERY correct; but these are my understandings)

Single Responsibility :=> Introduced by Robert C Martin and based on Principle of Cohesion. In simple words Martin defined 'Responsibility' as "Reason to Change"; any Class can only have ONE reason to change after designing. [wiki has a good example].

Open/Closed Principle (Polymorphic) :=> Originally stated as "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification". Now this is popularly known/referred as "Abstract Interfaces". We create an Abstract Interface and 'Close' it for modification (sort of standardizing the project; and standards don't change). Using this Interface, multiple implementations can be created and 'Polymorphically' substituted for each other.

Liskov Substitution :=> Originally stated as "if S is a subtype of T, then objects of type T may be replaced with objects of type S", which today we know as "Polymorphic Behavior". But the principle does not supports strongly typed systems. The Liskov Substitution Principle defines Strong Behavioral Sub-typing which leads to a notion of substitutability for mutable objects.

Interface Segregation :=> This is very similar to Single Responsibility principle, which helps for Clean Development and easy to Modify Software and also known as Loose Coupling.

Dependancy Inversion :=> The principle states: [A] High-level modules should not depend on low-level modules. Both should depend on abstractions. [B] Abstractions should not depend upon details. Details should depend upon abstractions.

Finally, here is one of the Best Resources Available.

 

 

 

 

 

Tuesday, January 3, 2012

I am on Information Diet this month

I came across CLAY JOHNSON's Information Diet book's site from Hacker News. I totally agree to him, I was consuming too much info.

I have decided to add it to my New Year's resolution list ;-) So, to start with Jan is my Info-Diet month!

Friday, December 30, 2011

Thanks @manuelkiessling

I am really thankful to @manuelkiessling for such a nice tutorial on Node.js. I was always a 'client' guy and afraid of 'server' bullies, but this tutorial made me confident. In one day I can understand few basic stuff and as manuel points out; 'I could build an IPO candidate of .com boom' in a day.

 

Thursday, December 29, 2011

the fuss about node.js

Recently, on Hacker News lot of people were coming up with bunch of good things 'in a day' with node.js and other IO sites. It really astonished me everyday; so as a part of new year resolution I have JS on my list.

Last night, I installed node.js, and just got my 'hello world!' from http://www.nodebeginner.org/.

Monday, December 12, 2011

Invest in yourself

I came across this video today from Mark Cuban; I was just surprised how true it was.
It's a reality we should Invest in Ourselves to get BETTER returns. Both money and skill wise; that is some time a chicken and egg problem. To acquire some skills/specialities you need money; but to get better money you need THOSE special skills.

Monday, December 5, 2011

UIAutomation for iPhone

There are lot of tools available for automating iPhone UI testing; but it's always better to explore something provided by Apple.
Here is how you should explore:
1. Watch "Automating User interface Testing with Instruments" from Apple Developer Videos
2. Make sure you have XCode4.2 (After a little struggling I came to know 4.2 has a very good support for UIAT, thanks Cocoa Manifesto).
3. Record ur own test cases and good to go.
4. Alex Vollmer has a nice article which will help to do some REAL code.
5. Refer UIAutomation Reference Collection for more details.

[self didStartPostingNewStuff]

I just realized, I m too lazy to post my thoughts over internet.
let's get started!

I'll be mostly writing about iOS (iPhone, iPad), Cocoa and some other interesting stuff (for me).