Tuesday, July 15, 2008

You want horror? Here's horror!

Jeff Atwood latest article, Maybe Normalizing Isn't Normal is a real beauty. If you like idiots, that is. (Cue Fabian Pascal.)

This is by far the worst Jeff has ever wrote. I cannot believe that someone who claims to offer advice to programmers can say anything but "NEVER denormalize". For fuck's sake, educate yourself before you discuss a subject as anything but "hey, I heard somewhere that shooting yourself in the foot is a good idea, what do you think?". (Maybe I should have realized how smart he is when he associated with Joel "exceptions are evil" Spolsky.)

Let me quote a comment that explains the problem very succinctly:

Speaking from long experience, if you don't normalize, you will have duplicates. If you don't have data constraints, you will have invalid data. If you don't have database relational integrity, you will have orphan "child" records, etc. Everybody says "we rely on the application to maintain that", and it never, never does.

A. Lloyd Flanagan on July 15, 2008 06:34 AM


Jeff, stay away from databases. If your programming skills are similar to your logical skills, stay away from programming too...


Oh... let me start checking the articles he uses to support his idea.

First article

Our feeling is that this is ultimately far more scalable than black-box clustering.

Wow. Imagine that. Their feeling. Definitely a good argument.

The third is already ridiculous: they denormalize the database for "performance" and then discover the reason normalization exists: they lose consistency and they have to write a lot of code (that, one would assume, will take a lot of time) to fix that:

a lot of the flickr code infrastructure deals with ensuring data is consistent and well balanced and finding and repairing it when it's not

Note that: not if, when.

Good job. Yeah, denormalization ftw!

I'll stop here. I believe I made my point.

No comments: