Barbara Liskov Wins Turing Award
jonniee writes "MIT Professor Barbara Liskov has been granted the ACM's Turing Award. Liskov, the first US woman to earn a PhD in computer science, was recognized for helping make software more reliable, consistent and resistant to errors and hacking. She is only the second woman to receive the honor, which carries a $250,000 purse and is often described as the 'Nobel Prize in computing.'"
If only it were true.
I recall, in fact, the point in time when I first ran across Liskov's CLU in the context of working one of the first commercial distributed computing environments for the mass market, VIEWTRON, and determining the real problem with distributed programming was finding an appropriate relational formalism.
We're still struggling with the object-relational impedance mismatch today. The closest we are to finding a "solid basis" for computer science is a general field of philosophy called "structural realism" which attempts to find the proper roles of relations vs relata in creating our models of the world.
If anything, our descriptions should be "relations all the way down" unless we can find a good way, as some are attempting, to finally unify the two concepts as conjugates of one another.
Seastead this.
For those who might not have her original text handy, the Liskov Substitution Principle states (rather obviously):
which, when stated in the words of Robert "Uncle Bob" Martin as something we probably all intuitively understand from our daily work, is:
$x = ($x * 10) % 10 >= 5 ? 1 + int $x : int $x
Since it's not in the article, I looked it up. She got her PhD in 1968.
I initially thought that kind of sucked (Cambridge's 'Diploma in Computer Science' has been awarded since 1954), but apparently the first US PhD in CS named as such was in 1965 (University of Pennsylvania).
The field could still use more women though.
Aside from academic pissing contests you have a much more immediate worry: The lack of bankruptcy protection afforded student loans coupled with the trend in life-time income prospects for CS graduates.
Seastead this.
Frances E. Allen got the turing award in 2006 http://en.wikipedia.org/wiki/Frances_E._Allen http://en.wikipedia.org/wiki/Turing_Award
We don't call it that. We call it toilet paper like normal people. Makers of toilet paper call it bathroom tissue, I guess because they want a name that's a little more distant from "ass wipe" or less evocative of a porcelain bowl filled with crap or something, though they'll talk about their "bathroom tissue" in advertisements while showing cartoon bears (chosen because as everyone knows, bears shit in the woods) with little scraps of toilet paper all over their fat bear asses, which I can't help but wonder who the fuck has this problem and why, but I'm afraid of the answer, and apparently the right brand of ass wipe will solve it so lets just try to forget about that okay?
What were we talking about? Oh right. It's called "pop". "Soda" is okay too I guess.
The enemies of Democracy are
My understanding is that OP's formulation of the LSP just won't work, because the term "behavior" is too broad. (For reference, here's the formulation I'm referring to: "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.")
The Wikipedia article has a better formulation, in terms of properties proveable of objects of the types in question (which I suspect is still not quite right, but that's another topic). Basically, for your supertype Publisher, there is some set of properties that should be proveable of every object of that type; for example, the type signature of the methods in question, and invariants that the operations on the type respect. Those properties should be respected by the subtypes for them to be correctly called subtypes at all.
In your example, given the premise that an object is of type Publisher, then it can be proven that the object has the operation publish(). Given that premise, however, it cannot be proven that the publish() operation sends either email or SMS.
A violation of the principle would be to implement SMSPublisher as a subclass of EmailPublisher. In that case, given the premise that an object is of type EmailPublisher, then it can be proven that its publish() method sends email. However, given the premise that an object is of type SMSPublisher, it cannot be proven that its publish() method sends email; therefore, SMSPublisher is not semantically a subtype of EmailPublisher.*
* I don't think this argument is quite right, actually, because we haven't defined very clearly what we mean by "object" and "type" very well. A better, but less precise formulation is that if your code relies on the invariant (i.e., proveable property) that objects of type EmailPublisher send email, then making SMSPublisher a subclass of EmailPublisher will break your code.
Are you adequate?