Dynamic vs. static

I’m reading Steve Yegge’s presentation Dynamic Languages Strike Back and I’m imagining him as talking with Craig Ferguson’s voice. It makes a funny talk even funnier. Seriously, if some of my professors had at least been funny…

OK: I went to the University of Washington and [then] I got hired by this company called Geoworks, doing assembly-language programming, and I did it for five years. To us, the Geoworkers, we wrote a whole operating system, the libraries, drivers, apps, you know: a desktop operating system in assembly. 8086 assembly! It wasn’t even good assembly! We had four registers! [Plus the] si [register] if you counted, you know, if you counted 386, right? It was horrible.

I mean, actually we kind of liked it. It was Object-Oriented Assembly. It’s amazing what you can talk yourself into liking, which is the real irony of all this. And to us, C++ was the ultimate in Roman decadence. I mean, it was equivalent to going and vomiting so you could eat more. They had IF! We had jump CX zero! Right? They had “Objects”. Well we did too, but I mean they had syntax for it, right? I mean it was all just such weeniness. And we knew that we could outperform any compiler out there because at the time, we could!

I need a better release tracker

I missed both the release of PHP 5.2.8 and Symfony 1.2.1 by a couple of days. Freshmeat sucks because nobody ever remembers to update their software. At least that seems to be the case with stuff I use.

Learning Erlang

I’ve been looking at Erlang for a couple of days now, and although writing code in this language felt truly weird at first, it occured to me early that programming can probably be abstracted like this:

1. Do one thing and do it well
2. Repeat

It’s the Unix philosophy applied to function-level programming.

I haven’t done anything outside examples and tutorials yet, but I can think of at least two projects I’ve worked on, adTracker and adAggregator, that would be terrific to re-implement in Erlang.

Symfony 1.2 released

The new symfony release sort of snuck by under my radar. Thus, it so happened that upgrading my current project to the new version fell on a friday (afternoon). The upgrade guide made everything sound easy enough. Unfortunately, some things related to the Doctrine plugin had been changed without deprecating (as far as I know at least) them first. That, plus a bug, made the upgrade task take a lot longer than I had planned.

So, I can’t really say much yet, but some things have certainly gotten easier and more elegant. As long as the performance stays the same, I probably won’t complain. No, I’ll probably find something regardless.

Well, one size doesn’t fit all

I came across a curious bug today when after deploying a revision of one of web apps I’ve been working on. The automatic test suite had run its course, no errors. However, when I repeated one of the processes covered by a test manually, I ended up with a fatal error.

The reason the test worked fine while the real process didn’t is a not entirely unimportant weakness in the test framework. The individual requests simulated by functional tests are not isolated from one another like regular requests would be. They all happen inside the same request context, so there is no teardown at the end and no cleanup. There are certain things in PHP that you can’t undo unless you finish a request. One of those things is registering functions.

So what happened was that I included a helper (collection of functions) only in the template of the first request in the process. That was no problem in the test run because the functions stayed defined throughout, whereas in the real world, they wouldn’t.

I’m trying to figure out what would be the best way to address this problem. The most thorough way, isolating every request into its own CLI session, would be impractical. Although it would address more than this very specific problem. The less general but easier to implement way would be to write a parser that checks whether every function used in the templates is defined or included in the template it’s used in.

Spam is back

As a rule, good things don’t last.

Cloud distribution network

“Beta everything” prevails and Amazon launches CloudFront (beta), a content delivery network sitting on top of S3. I think this is a great and logical addition to Amazon’s service buffet. For those who used S3 for storage and delivery, there is now less need to worry about burst performance.

Companies like SmugMug or WordPress.com, who have migitated cost, uptime and performance worries with in-house caching and delivery solution will likely be, at the same time, less interested and better positioned to take advantage of this new service. While in-house assets like company images, css and javascript might find their way into the CDN relatively fast, their core business is unlikely to see a benefit from the increased expenditures. They are centered around high-number-low-yield asset collections: Personal photo collections and, on-average, low-traffic blogs.

CloudFront is still a significant shift in the CDN market, precisely because it jumps into an underserved niche. A niche that Amazon helped grow tremendously. That’s why it was only logical take a step in this direction. CloudFront is an incredibly easy solution to start using. Sites that already run off the cloud can now improve browsing performance world-wide in a matter of minutes. Small companies that are dealing with a sudden popularity blitz can get temporary relief for their infrastructure by handing off asset delivery to a pay-as-you-go CDN.

My back-of-the-napkin calculations for the equivalent of renting 40mbit/s bandwidth from Akamai (if that’s even how they operate) would be about $1,300 to $1,500. It’s hard to say how that compares to Akamai’s pricing structure, but I’m quite certain if that’s the amount of money you have to spend, they will laugh in your face. They are just not interested in that market tier.

It’s a brave new world.

Spam shutdown. For great justice!

Apparently, a colo outfit in California, McColo, was responsible for 75% out the world-wide spam output. They have been shut down. I can confirm this through anecdotal evidence. I’ve received 3 spam messages is 6 hours, instead of 30+.

I’m pretty mad. Not because they were shut down. I like an empty spam folder as much as the next guy. But they weren’t closed down by law enforcement, but by their upstream providers. I was under they impressions that professionals were constantly working on fighting spam, and that this fight was going poorly because most spam was originating from Asia or Eastern Europe or botnets. But apparently it was happening right here under our noses where we should be able to do something about it. Like arresting people and bagging there spam-spewing servers.

I’ll have to research this more before I form a proper opinion but for now I’m quite miffed.

Politics and technology

Thisfuckingelection.com is hosting its images on S3.

Marketing Thoughts

There’s a commercial for NetZero that has been running for quite a while now and it annoys me every time I see it. It goes something like this:

If all the ISPs take you to the same internet, why pay more.

They offer internet access for $10 a month in this ad. What they don’t tell you of course is that NetZero is dial-up. It’s kind of like asking “why take the plane from New York to Los Angeles instead of the Grey Hound – it’s still the same city”.

On the other side, there are reports that people are not standing in line to buy T-Mobile’s G1. It seems like some people still think that this phone was supposed to be the iPhone killer. That perception, I think, is based on the urge of some reports to create a narrative around every product launch, whether it’s the David vs. Goliath thing or the clash of the giants or some such.

That’s unfounded in reality though. I think Google and T-Mobile are going for a soft launch here. I didn’t see the link on Google’s homepage until the day of the launch and no TV commercials until the day after (unlike the iPhone commercial barrage). Another reason could be that T-Mobile’s 3G network is far from finished in most major cities. There’s also a major difference between the Iphone’s and the G1′s identity. The iPhone is a monolithic Apple product, limited to one carrier. The G1 is only the first of a potentially unlimited number of phones running on a completely new mobile OS and stack. I’m sure T-Mobile wants the G1 to be a smashing success. But I’m equally sure that Google doesn’t want a potential lackluster performance of the first Android phone to be an anchor around the neck of future phones.