Something's rotten in the state of [web] Devmark...

I've got a Django review in the pipe, and it's generally positive. It's still cooking both so I can gather more experience, and while some fact-checking occurs.

But there's something still missing that I can't put my finger on. I think cutting away even more of the general cruft of making web apps is bringing it out. I've been programming on the web for nearly ten years now, and something's not right. Despite the fact that I have gotten generally good at programming, and I keep refactoring and refactoring, I keep writing the same web page over and over again: I've got a tree of heterogeneous objects that I need to render, which itself a view of a graph-like structure, I allow the user to manipulate it somehow, and I have to propagate those changes back to the database. And for some damn reason, no matter what I do, there's always something super-special about this form that requires special treatment and requires further extension of the frameworks or libraries I'm using.

(Note this programming post meanders a lot; part of the point is that I don't entirely know where I'm going with this.)

Practical Closures

The problem I see with most introduction to closures is they choose examples that can be done easily with a standard for loop, or some other standard construct, leading a student to ask (with great justification!) what the point is and why (s)he should bother. In my opinion, the best place to start understanding them practically is to look at their ability to decouple logic, because there they have benefits that are difficult or even impossible to replicate without them.

So despite the huge amount of verbiage on the net about closures, I thought I'd take another crack at explaining it with examples that actually do something that is much harder to do without closures.

After a bit more thought about my previous post, I'm pretty sure this is going to be a disaster for Microsoft.

Microsoft has two goals here:

  1. Become the dominant distributor of video content, and probably eventually leverage that into dethroning iTunes and becoming the dominant distributor of content, period. By that I mean they will own the platform, not necessarily the stores themselves.
  2. Destroy open source by making it borderline illegal, if not actually illegal, to have drivers that open source software can use.

I wouldn't even care to guess which is more important to them. I'm sure they really, really want #1, but if they had to choose only one I wouldn't be surprised they'd rather have #2.

But this entire plan is predicated on two very strong assumptions:

  • People are so desperate to experience high-quality video on their computers that they are willing to put up with all the other continuous degradation of their computer's performance to do it.
  • The Windows monopoly is so entrenched that no matter how they screw with your computer, you have no choice but to buy Windows, and hardware vendors have no choice but to sell hardware for Windows only, completely snubbing Linux and quite possible Macs as well

If either of these fail, Microsoft loses, and both are highly questionable.

In August 2002, I said that then-recent changes to the Windows XP EULA were a declaration that your computer belonged to Microsoft.

It always takes more time to implement these things than initially thought, but the dream of having corporations own your computer lives on now in Vista. This paper documents some of the work that has gone into making Vista "safe" for "protected" content, and made it clear how whenever there was a conflict between the interests of the media companies and your interests, you lost.

Power-user Configuration Files Should Be Programs

Every program of any complexity needs to be configured. The traditional answer is to put this in some sort of text file, or something else that is fundamentally static data that must be read in and parsed. (That is, for the purposes of this discussion the Windows Registry is a static text file.)

If you are programming in a language that can take a program in at run-time, like Python, Ruby, or Perl, and you are targeting an advanced audience, the configuration file should actually be a program. In the degenerate case, the programming language can easily look like a configuration file, but then, if you need the full power of programming, it's sitting right there.

Update Dec. 24th: Similar thoughts w.r.t. build tools. I think declaration-based systems tend towards "demoware"; any arbitrary task can be made to look good in the demo of a declarative system, but it seems inevitable that before you can even blink, you need a scripting language. And ultimately, as with ant vs. rake, it's simpler just to pull in the full scripting language that to fall prey to Greenspun's Tenth Rule in your "simpler" declarative language.

My laptop hard drive is dying.

This may be a world first: My laptop hard drive is dying almost immediately after a full backup.

Most hard drives die immediately before their first full backup.

I've noticed that the quality of hard drives as measured by how long they last has been steadily going down. Having a hard drive last two years is almost a notable event now. But I think they've been getting better about somewhat gracefully failing; while I almost never see a drive last more than a year and a half, it's also been a long time since I heard anybody say their hard drive just died with no warning at all. (I'm sure it happens but it seems to happen less often.)

No Thin Clients Anytime Soon

Google is quickly coming to realize that they're not in the services business at all. All of their various services -- news, maps, mail etc -- are just thinly veiled attempts to collect, store and control data. Of course, even search itself falls under this paradigm. Search is, after all, the final form of managing data. And now, with Google Base, Google has has made it very clear that they don't intend to be the world's search engine, they intend to be world's database. In this endeavor Google is unique only in their ambition. Every other "web 2.0" company operates on this same innate desire to control user's data. This is my primary concern about the entire Web 2.0 phenomenom: all of these companies intend to build walled gardens around various important sets of data and then expose tiny bits of the data through strictly controlled, proprietary APIs. - Google and the Tyranny of Data

The talk has been in the air about a return to the Thin Client model, although with changing technology the "thin" has changed. A "Thin Client" used to be merely a graphical terminal that ran everything on remote server; a high-class 486, decent graphics card, and a bit of custom hardware could have managed this. A more modern conception of a thin client is something running a web browser; call it a 1GHz machine with at least 512MB of RAM, probably backing to a flash storage device with no hard drive.

Why Digital TV Won't Kill Discs Soon

It has been theorized that digital TV and downloadable video will rapidly destroy the DVD market, to the extent everyone has broadband. I don't think this is going to happen as rapidly as people thing, because even ignoring some of the other economic advantages of physical media (like the sense of ownership), the economics of the bits that make up the video are different for discs and broadcasting/downloading in some important ways, resulting in a quality advantage for the discs.

Wired reviews MP3 tag editors for Windows, Linux, and the Mac.

The best MP3 tag editor I've found is amarok, which is in most ways the best MP3 player I've found. It's the only editor I've used on Linux where you can do something like take an entire album by "-gershwin-" and change it to "Gershwin", so it fits in with your other Gershwin album correctly.

The only use case not covered is to take a bunch of MP3s and guess the tag attributes from the filenames. You can do it one at a time, but there's no "perform on all selected MP3" option for that functionality.

There's a story, almost certainly apocryphal, of some famous writer having a dream where he wrote a poem, and everyone lauded it for its subtle insight and wisdom. He woke from the dream, and quickly, before the dream faded, grabbed pencil and paper and wrote it down. Then, satisfied that he'd preserved that gem, he went back to sleep.

Next morning he looked at it, and found this:

Hogamus, Higamus,
Men are polygamous.
Higamus, Hogamus,
Women monogamous.