Developer EventsWindows Azure Developer Stories
General ResourcesWindows PhoneWindows Azure
D³: LIVE & INTERACTiVE Monthly, 1st Wednesday
These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.
Resident Bloggers
Jonathan Rozenblit
Paul Laberge
Frédéric Harper
Susan Ibach
Marc Gagné
Over at the IT Manager Connection blog, there’s an interview with Barbara Liskov, who is:
In the interview, Barbara talks about winning “the Nobel Prize of computing”, her vision for computing, what got her interested in computers, the challenges that the field still presents to minorities, the work she’s done and her thoughts on up-and-coming tech. If you’d like to listen, here’s the MP3 of Stephen Ibaraki interviewing Barbara Liskov. Stephen also wrote an article containing an abbreviated transcript that appears in IT Manager Connection. Enjoy!
In case you’ve forgotten (or perhaps never learned), the Liskov Substitution Principle is:
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 of T, the behavior of P is unchanged when o1 is substituted for o2 then S is a subtype of T.
Well, duh. Who didn’t know that?
Object guru Robert C. “Uncle Bob” Martin took this bit of math nerd-speak and paraphrased in a way making it somewhat easier to follow:
Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it.
And because I’m nowhere near as smart as Uncle Bob, here’s the way I like to cover it:
If MySubclass is a subclass of MyClass, you should be able to replace instances of MyClass with MySubclass without breaking anything. Sort of like when they changed the actors who played "Darren" in Bewitched or "Becky" in Roseanne.
MySubclass
MyClass
(Unlike Liskov or Martin, I don’t have to write academic papers, so I can get away with making references to old TV shows.)
As I mentioned earlier, I’ll be writing more about the SOLID principles. Watch this space!
Typo:
"with *out* knowing it"
Jim: Fixed it. Thanks for the heads-up!