Suppose A equals B, and also B equals C. Any reasonable person would expect that A equals C, right?
% cat equality.php
$a = 0;
$b = "eggs";
$c = "spam";
print ($a == $b) ? "a == b\n" : "a != b\n";
print ($b == $c) ? "b == c\n" : "b != c\n";
print ($a == $c) ? "a == c\n" : "a != c\n";
print ($a == $d) ? "a == d\n" : "a != d\n";
print ($b == $d) ? "b == d\n" : "b != d\n";
print ($c == $d) ? "c == d\n" : "c != d\n";
% php equality.php
a == b
b != c
a == c
a == d
b != d
c != d
Try explaining that
to a first-time programmer.
Update (2007-12-11): It gets even worse. Check this out.
101 comments | post a comment
Since i got back from England, i've been waking up automatically around 7 am. I like being up early. It feels like getting a bonus on my day.
4 comments | post a comment
As soon as i stepped into the international terminal at SFO i felt the rush of excitement that comes with travelling abroad. Even standing in the check-in line, i could hear other passengers speaking in French, Italian, and German. The flight over was long, but the service and food on British Airways was excellent. It was easy to tell that i was flying on a British airline because each meal or snack came with two sweets (usually some kind of fabulous dessert and a package of candy).
I spent the first couple of days of my trip in Bath, as i mentioned earlier. The first things i noticed when i arrived were that everything is made of yellow stone, the roads are all windy, and tapered serifs are everywhere. I don't have exact numbers, but i definitely got the impression that if you did a survey of the signs in California and in England, you'd find more use of serifs in England. There's a particular style of typeface they seem to use often — thin strokes with subtle tapered serifs.
Anyway, Bath is a very pretty town, centered around an old Roman bath that is now a popular tourist attraction.
Meri and Elly took me on the standard tour of the Roman bath (which they hadn't actually seen themselves before). There were lots of excavated stones with old Latin inscriptions. The sign on the right caught my eye as something that might be nice to put next to our hot tub.
On our stroll through the town I came across a really neat shop full of old maps, some of them a couple hundred years old. (The shop has a website.) There was one in particular that struck me as particularly elegant — a map of the road between two towns in Wiltshire laid out as a long scroll wrapped vertically to fit on the page.
Meri and Elly introduced me to the crazy phenomenon that is Big Brother and i got to see the new Doctor Who for the first time, which i found enjoyable (and impressively produced) though it didn't really feel like Doctor Who. This page of scariness reviews is pretty adorable. My hosts took good care of me and Elly made a syrup sponge for dessert, which was so sweet that i could only manage to eat half, but Simon was happy to finish it for me.
The houses in Bath are all made of the same stone and look pretty much like this.
Everything is so green in England! It's the trade-off you get for it being so rainy, i suppose. Here are Simon and Nat, who took me on a nice walk to a park overlooking the city.
After the visit to Bath, it was off to the train for Cambridge.