January 2009
Seen on Twitter today:

This is one of those things that always seems un-intuitive to developers who aren't familiar with SQL. I've heard a lot of explanations for it over the years, but this is probably the most succinct I've come across, thanks to Matt Ryall on the Atlassian intranet.
…there's actually a reason for this distinction. They're not equivalent at all, because NULL isn't a value that you can be equal to. It represents a value that is undefined.
For example, if my date-of-birth in a database is NULL (because it's unknown) and so it yours, they shouldn't be considered the same. They're two different, undefined values. A query where this might happen is:
select s1.name, s2.name from staff s1, staff s2 where s1.id != s2.id and s1.dob = s2.dob
Or, in the previous example, there's a difference between records where the thru_date is definitely not equal to the from_date, and ones where you just don't know.
Like a lot of other Apple nerds, I suspect, I spent quite a while last night playing with the new iPhoto face recognition function, teaching it to recognise all the people in my photo album (or at least all the ones I recognise myself). Apple has done a great job of taking something tedious—adding metadata to photos—and making it almost addictive.
It's the sort of feature that in a few years time we won't be able to imagine photo management software without. I suspect Facebook are looking around for face-recognition software to license as we speak.
Still, a few gripes:
- The feature is a bit ambiguous. If I use it to say "Bob is in this photo" even when his face isn't particularly clear, am I hurting the classifier? Does removing a suggested face mean “this is nobody I care about” or does it mean “this is not a face”?
- When showing me all the possible matches for one person's face, the only options are "accept" and "reject". If there's a the "This is really <person>" option, I can't find it.
- I would love to have a mode that showed close-ups of all the already-detected faces in my library and allowed me to classify them in bulk.
- Years of using OS X has trained to position windows by placing the top-left corner, then resizing from the bottom right. The selection-box for manually highlighting faces works by centring the box, then resizing it around the centre from any corner. This just feels wrong.
Enough of that. One of the most fun things about the iPhoto faces feature is that like any Artificial Intelligence, when it's still learning it's really funny.
(For the uninitiated, most of these screenshots come from the mode where iPhoto shows you all the photos it thinks are a certain person, and asks you to accept or reject them.)
Exhibit A: I guess I should be flattered?

Via Bill de hÓra on Twitter, a great article from ex-Gmail/now-Friendfeed hacker Paul Buchheit:
The point of this story, I think, is that you should consider spending less time talking, and more time prototyping, especially if you're not very good at talking or powerpoint. Your code can be a very persuasive argument.
The other point is that it's important to make prototyping new ideas, especially bad ideas, as fast and easy as possible.
The Data Detectors feature in Apple Mail always surprises me. It's one of those features that works far better than I ever expect it to. For example, given this email…
![Please reserve Sunday 15th March on your calendar from 15:00 for a chess game or two, a couple of drinks & tucker. The address is 2[Censored] Beverly Hills, which is 5 minutes walk from Beverly Hills railway station & King Georges Road.](http://fishbowl.pastiche.org/archives/pictures/data-detector-email.png)
…the data detector successfully pulls out the date, time and location without any further input from me. (The event title is the email subject, which is usually close enough).

Well done, nameless hacker in the depths of the Apple campus.
Because caffeine is primarily an antagonist of the central nervous system's receptors for the neurotransmitter adenosine, the bodies of individuals who regularly consume caffeine adapt to the continual presence of the drug by substantially increasing the number of adenosine receptors in the central nervous system. This increase in the number of the adenosine receptors makes the body much more sensitive to adenosine…
Because adenosine, in part, serves to regulate blood pressure by causing vasodilation, the increased effects of adenosine due to caffeine withdrawal cause the blood vessels of the head to dilate, leading to an excess of blood in the head and causing a headache and nausea. Reduced catecholamine activity may cause feelings of fatigue and drowsiness. A reduction in serotonin levels when caffeine use is stopped can cause anxiety, irritability, inability to concentrate and diminished motivation to initiate or to complete daily tasks; in extreme cases it may cause mild depression. Together, these effects have come to be known as a "crash".
Withdrawal symptoms—possibly including headache, irritability, an inability to concentrate, drowsiness, insomnia and pain in the stomach, upper body, and joints—may appear within 12 to 24 hours after discontinuation of caffeine intake, peak at roughly 48 hours, and usually last from one to five days, representing the time required for the number of adenosine receptors in the brain to revert to "normal" levels, uninfluenced by caffeine consumption. Analgesics, such as aspirin, can relieve the pain symptoms, as can a small dose of caffeine. Most effective is a combination of both an analgesic and a small amount of caffeine.
The stupid thing is that I'm only doing this because a little voice in my head says I should be. It's not like my over-consumption of Diet Coke has been having any kind of negative effect on my day to day existence, I just don't like the idea of being addicted to something.
In other news: Boing Boing: how to make smokable freebase caffeine from ground coffee and ammonia.
At work, it seems we run our public forums with the default "bad words" filter enabled. Where the list of bad words is stored or where it comes from I don't know, but some of the things it chooses to censor can be a little surprising.
What I wrote:
Seraph is pretty customiseable though: it's possible to replace this default authentication method with hooks to various shared authn providers, SSO systems, or with sufficient coding have it phone up your mother and ask her if you're allowed to log in.
What was published:
Seraph is pretty customiseable though: it's possible to replace this default authentication method with hooks to various shared authn providers, SSO systems, or with sufficient coding have it ***** up your mother and ask her if you're allowed to log in.
There's probably some bad karma coming my way for kicking someone when they're so very down, but some situations just seem to embody the aphorism: “It could be that the purpose of your life is only to serve as a warning to others.” Such is the fate of blogging provider Journalspace. (mirror)
Journalspace is no more.
DriveSavers called today to inform me that the data was unrecoverable.
Here is what happened: the server which held the journalspace data had two large drives in a RAID configuration. As data is written (such as saving an item to the database), it's automatically copied to both drives, as a backup mechanism.
The value of such a setup is that if one drive fails, the server keeps running, using the remaining drive. Since the remaining drive has a copy of the data on the other drive, the data is intact. The administrator simply replaces the drive that's gone bad, and the server is back to operating with two redundant drives.
But that's not what happened here. There was no hardware failure. Both drives are operating fine; DriveSavers had no problem in making images of the drives. The data was simply gone. Overwritten.
The first lesson here is that if you rely on any service ‘in the cloud,’ you should be very, very interested in how they are keeping your data safe. In my not so humble opinion, SaaS providers should be required, if not by law then by industry standard practice, to provide a detailed statement of their disaster recovery provisions. The provider should then be legally liable if they don't follow their stated procedures.
Or in other words, SaaS providers should be allowed to provide whatever shoddy service they want to, so long as they let you know about it clearly in advance.
The second lesson here? RAID is not a backup mechanism. It's really that simple. RAID mirroring protects you from one failure state—a single drive crash—and because that happens to be the most common cause of data loss people seem to think that's enough. Unfortunately, the number of situations in which data loss can wipe data all at once off your entire RAID array is legion. Not only are the drives generally in the same enclosure and on the same power supply, any problem that occurs outside the hardware itself will be faithfully mirrored to both drives by the RAID controller before you even know it's happening.
As jwz pointed out in his classic post about backups, “The universe tends towards maximum irony. Don't push it.”
Donna and I are enjoying Fringe, a neat new J. J. Abrams science fiction drama that owes more than a little to the X-Files. It's not blowing me away, but it's a nice bit of escapism, the characters work well, and it's nice to see Joshua “Pacey from Dawson's Creek” Jackson avoiding being typecast… oh who am I kidding? Pacey plays the snarky side-kick.
A couple of years ago I went to see a play at the Sydney Theatre Company, the name of which now escapes me. It had something to do with hats and rebellion against an oppressive state, and spent most of its running length deeply lodged in the confines of its own arse. About two thirds of the way into the play, a disgusted ticket-holder stood up, shouted “Sack the director and shoot the playwright!” and walked out.
After seeing Episode 10 of Fringe, I came rather close to jumping out of my couch and shouting “sack the script editor!”
I know this kind of show requires a strong dose of suspension of disbelief. Ultimately you know it can't make sense because, y’know, at some level you have to believe that with all these incredible scientific breakthroughs, any one alone capable of changing the world as we know it, the best thing anyone could think of doing with them was a reasonably incompetent conspiracy.
All this makes it even more important to have the show at least be internally consistent, otherwise the whole house of cards comes falling down.
Many spoilers follow.
