Class Design Principles - Michael Kennedy @ Code Camp#

Michael Kennedy's session in SoCal codecamp, "Five Fundamental Object Oriented Design Principles for Agile Development" discussed the following postulates of class design mentioned in several Fowler’s Refactoring with examples.

 

  • Single Responsibility Principle (SRP)
    • Classes should not have more than one focus of responsibility.
  • Open/Closed Principle (OCP)
    • Class should be open for extending, but closed for modification.
  • Liskov Substitution Principle (Design by Contract)
    • Subtypes must be substitutable for their base types.
  • Dependency Inversion Principle (DIP)
    • Don't have high-level code directly call/inherit from library but use interfaces.
  • Interface Segregation Principle
    • Clients should not be forced to depend on methods (inherit from or implement) they don't use.

These are just one line summaries. Details can be found on links specified below. I found Barbara Liskov’s “Liskov Substitution Principle” most interesting as it has transitioned from this:

 

Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T.[1]

 

To this

 

Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it [2]

 

To this

 

In class hierarchies, it should be possible to treat a specialized object as if it were a base class object. [3]

 

 

Refactoring: Improving the Design of Existing Code by Martin Fowler, et al

Agile Software Development, Principles, Patterns, and Practices by Robert C. Martin

Principles of Object-Oriented Design

Class Design Principles

Design Patterns

 


1/24/2006 7:37:33 AM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Crisis Management by People and Nations - Dr. Jared Diamond #

[Monday 7:03 AM]

It's all about reappraisal! The Crisis Management Event was interesting; vague but interesting. Pulitzer Prize winner Dr. Jared Diamond discussed details of how general people cope with crisis and why it is so important to reappraise your lifestyle and re-evaluate things which "aren't working". He discussed the American ways of consumption, isolationism and individual rights. It was an informative lecture about change and mostly about why is it so important to change, more like survival of the fittest theory.

Having said that, I'm not a skeptic and even though I'd call myself a man of science, I certainly don't believe that my ancestors lived on trees. What he didn't discuss was the sheer reasoning behind resistance, is survival everything? What if this is a conscious choice to extinct and not to alter? Are some values really worth it and hence species decide collectively that living without those core values is worse than extinction and hence identity vs. survival. This would distinguish human beings from other species and probably would answer the question of intelligence i.e. why don't we see a monkey driving a car, dolphin building a spaceship or a parrot writing a sonnet?

 [Sunday 1:29 PM]  I'm leaving to attend the following session at Caltech. Will blog details soon.

From Skeptic website

Crisis Management by People and Nations
How Individuals and Societies in Crisis
Do (or Don’t) Reappraise Core Values

Dr. Jared Diamond

Sunday, January 22nd, 2006, 2:00pm
Beckman Auditorium

How do we as individuals respond when precipitated into a crisis by the break-up of a relationship, a job loss or setback, or just growing dissatisfaction with ourselves? Experience shows that we can tolerate putting our failed old ways up for grabs for about six weeks, within which time we either work out new coping skills or else revert to our old ways. Similar issues arise on a slower time scale for societies or groups responding to a crisis. Meiji Japan, the modern Navajo, and post-World-War-2 western Europe did set about to recast themselves, while the Greenland Norse didn’t, and it remains to be seen if the U.S. of today will. What can we learn from individuals and societies that did embrace new values?


1/22/2006 1:33:40 PM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

SoCal.NET Code Camp 2006 @ Calstate Fullerton#

[This Blog Entry is a Stub]

SoCalCodeCamp2006-OpeningSession.jpg

SoCalCodeCamp2006-AgileDevelopment.jpgSoCalCodeCamp2006-Davidfoderick.jpgSoCalCodeCamp2006-MarkMiller.jpgSoCalCodeCamp2006-ParkashMalani-spring.jpgSoCalCodeCamp2006-Robert Kozak,.jpg


1/22/2006 11:33:39 AM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Microsoft Research Group Shot#
Via Microsoft Research

Overview
We are happy to introduce Microsoft Research Group Shot.
MSR Group Shot helps you create a perfect group photo out a series of group photos. With Group Shot you can select your favorite parts in each shot of the series and Group Shot will automatically build a composite image. Download Group Shot here.

Spiffy, eh?


1/19/2006 1:04:14 AM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Binary Nerd#

Can't believe I actually end up solving this FoxTrot comic read via Digg and guess what I got

1011001 - 89   1001111  - 79
        1010101-85
1001110 -78    1000101 - 69
1010010 -82    01000100-68

Y O
U
N E
R D


1/11/2006 6:28:47 PM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Eid Mubarak!#

كل عام و انتم بخير

Wish you and your family a happy Eid-ul-Azha!

eidMubarak.JPG


1/10/2006 7:27:41 AM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Joshua A. Norton#
via a friend Imad, doctoral student at Deakin University - Research

Joshua A. Norton - Emperor of these United States and Protector of Mexico

Pretty ironic eh?



1/8/2006 5:23:39 PM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Quotes of the day#

"Don't you know the first law of physics? Anything that's fun costs at least eight dollars."

- Eric Cartman

"Lorry, are you upset at Asians for buying out your $5 matinee theatre because that would be anti-Semitic"

-Adnan Masood

Interestingly enough, thanks to our media, Semitic nowadays is a word made highly specific however in reality Σημ (Sēm) reflects to other Semite races as well. Not that Asians are included in it as thought in the medieval Europe but would a crime committed by a Semite against a Semite be anti-Semitic as always shown? Not too sure about that.


1/7/2006 11:58:45 AM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

A Book A Week Resolution#

One of my new year's resolution is to finish a book a week. This includes fiction, non fiction and audio books. My January 2006 list is as follows.

Beside this set goal, I'm going through David West's Object Thinking and Elizabeth Kostova's The Historian as well but I've noticed that if I won't set a target date, it would drag along as I'd get side tracked easily and therefore a book a week goal.

Thanks to Lorry and her Arcadia Library membership :)

Books - Best-Seller Lists - New York Times
TIME Magazine - ALL-TIME 100 Novels
My Amazon.com wish list


1/5/2006 8:59:12 PM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Rose Bowl 2006 - What a Game!#

Awesome game, nerve wrecking and close; Even though USC lost, Longhorns really deserved to win. Vince was unstoppable; he "passes for 269 yards and runs for 199". Even two Heisman trophy winners couldn't bring trophy home. Didn't get to see the USC performance as it was in Trojans vs. Bruins but then again, this one was with UT.

 


1/4/2006 10:50:40 PM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Gmail @ Blackberry#

Gmail Mobile works really well on BlackBerry. Like Google asserts, it "Automatically optimizes the interface for the phone you're using". This statement is very much true since gmail preserves it's claim-for-fame conversation style on the mobile devices making it very easy to navigate and browse.

Check it out for yourself. Point your phone's web browser to http://m.gmail.com

Nauman further explains how to Search your PC/Mac from any Mobile device.

Gmail-mobile-Blackberry.jpg

 


1/2/2006 6:16:30 PM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Rose Parade 2006 - It's Magical (read freezing)#

The Tournament of Roses Parade is over now. It was 55°F outside, heavy rain and chilling wind SE at 20 mph and I've just come back from the 117th Rose parade "It's Magical". It was awesome! kudos to all the participants and spectators who performed, stood and cheered as the parade continued it's journey. My camera was wrapped in a plastic bag which got foggy and pictures turned out to be pretty blurred but in reality, floats were very well built and rain didn't do much damage if any. However, band were freezing and so the horses. was feeling sorry for the dressed to kill performers who tried to do their best.

I've uploaded my set of blurry rose parade pictures here and I also think I've got hypothermia :)

Rose_Parade_2006_Rain 170.jpgRose_Parade_2006_Rain 053.jpgRose_Parade_2006_Rain 090.jpgRose_Parade_2006_Rain 130.jpgRose_Parade_2006_Rain 033.jpgRose_Parade_2006_Rain 016.jpg

Tournament of Roses


1/2/2006 11:51:00 AM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

Rose Parade 2006 - "It's Magical " - The spirit is there!#

Just drove back from Colorado St; despite of pouring rain and bone chilling cold, spectators are hanging in there. Not even as half as last year but so isn't the weather. For those who don't know "The Tournament of Roses Parade is the 116-year-old traditional parade generally held on New Year's Day in Pasadena, California, eight miles north of downtown Los Angeles." (Src. wikipedia)

And it's amazing how up to date and pertinent wikipedia is about the rose parade date issue.

"This convention allows for religious observance, but was originally instituted because the Parade's many equine participants would not tolerate the pealing of the church bells along the route. The Tournament of Roses Association Web site has an alternate equine explanation. It says the "Never on Sunday" policy was instituted in 1893 "to avoid frightening horses tethered outside local churches and thus interfering with worship services." In 2006, the parade will be held on January 2."

Some pictures from the high spirited. Will be gearing up and walking down there in 4 hours. Gotta go and get some sleep.

Rose_Parade_2006_Rain (1).jpgRose_Parade_2006_Rain (2).jpgRose_Parade_2006_Rain (8).jpgRose_Parade_2006_Rain (6).jpgRose_Parade_2006_Rain (9).jpgRose_Parade_2006_Rain (7).jpgRose_Parade_2006_Rain (3).jpg

Tournament of Roses

Tournament of Roses Parade - Wikipedia, the free encyclopedia


1/2/2006 2:09:54 AM (Pacific Standard Time, UTC-08:00) #    Comments [0]  |  Trackback

 

All content © 2008, Adnan Masood
About the Author
On this page
Calendar
<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456
Archives
Sitemap
Blogroll OPML
microsoft