Monthly Archive for September, 2007

Bush thinks Mandela is dead. Oh, and that Hussein killed him.

Do yourself a favor. Go watch this video. Don’t drink pop while you do so; the results could be painful.

There would be no wars in the first place…

So there’s been a great deal of debate over Sally Field’s rant at the Emmys and the bit of censorship that happened when she veered into anti-war territory, and tried to say that “if mothers ruled the world, there would be no goddamned wars in the first place.” The quote actually more resembled “there would be no g–*camera angle of some random darkened corner*,” as Fox cut away and didn’t return until she was walking off the stage.

Though the FCC ruled specifically in 2004 that the phrase “goddamn” is permissible on air, it’s understandable that they would, out of their own moral beliefs, refuse to air the segment. However, it’s just as believable, given that it’s Fox, that they took the excuse to cut out the anti-war rantings of a woman who’s clearly not helping anyway (for the uninitiated, Jon Stewart now runs a segment of a similar name on the subject).

Well, today we find out that Fox is indeed no better than anyone thought of them. While claiming the moral high ground publicly, their hipocritical ways got the best of them, and they allow their own pundits sock puppets to repeatedly use the very same “offensive” speech. See for yourself. Feh. We all harbored doubts as to their motives simply to give them the benefit of the doubt, but really, did anyone really think they were innocent on this one?

Lesson of the day: Fox deserves no benefit of the doubt.

Google Reader moves out of beta

So now there’s an eerie white blank where there used to be an erlenmeyer flask of green bubbly on the Google Reader logo, indicating that now that they’ve finally rolled out search and made sure that it’s stable, Google’s ready to move Reader out of beta, and has done so. Truly amazing given that GMail still claims to be in beta… come on, Google, that ship sailed long ago.

Google Reader itself, though, is a great example of how flexible app development in Web 2.0 is. I first tested the Google Reader waters long ago when it was still in its infancy. I didn’t like it one bit, but by the time I came back to it this February or so, it was a completely changed product, which has become indispensible to my daily routine. Welcome to agile development.

Ruby on Rails impressions

The sound of silence echoing off the streets is due to a number of projects in both my work and hobby arenas that have been chewing away at my time, as well as a general lack of discussion topics. Nonetheless, without any further ado, today’s post.

I might be a bit late to this bandwagon, and this might be a blast from the past for some of you, but I thought I’d post my impressions on Ruby on Rails after having used it for a week and a half now. Forthcoming as well are my impressions on working with the Facebook platform.

I’ve mentioned to several people that I’ve started developing with Rails, and the general reaction seems to be uniformly “Oh, Rails? I’ve heard a lot about it, how is it?” Note the complete lack of specificity – no one knows exactly what is great about it, only that it is buzzworthy. Having now used it for a week, and having developed extensively with ASP/ASP.NET and hacked PHP sites for ages now, I think I have a fairly decent impression on its strengths and weaknesses, as well as how it stacks up with the competition.

First, let’s get Rails’ biggest benefits over with. These are two in number as far as I’m concerned, the first of which is that ActiveRecord rocks. ActiveRecord is easy to describe yet hard to quantify; it has an entire subdomain of its own over at the Rails website, and for good reason – the point of ActiveRecord is to embody the DRY (Don’t Repeat Yourself) principle in the data layer of the application. A normal web application will feature several layers of architecture, starting with the DB layer (the actual storage itself), then the Data Access layer (the factory classes that grab data), then the Business Logic layer (the classes that represent the database classes field-for-field, and methods for getting to and from the Data Access layer). This process involves multiple repetitions of the same information, especially that of the fields each object is associated with. ActiveRecord quite simply collapses this entire model into the database – you create a database table, and through their naming guidelines, declare a class that the database backs. That’s it. You can also specify validation, relationships, and other metadata in the class, but there is no need to redeclare the fields, or create any access methods. Since the data classes inherit from ActiveRecord, nearly anything you’d ever want to do is baked in. On a related note, Migrations are a neat idea: they are essentially versioning Ruby scripts that up- or down- grade your database schema as you change it. The benefit is that if data itself needs to be migrated, you’re already in ruby script, and that sort of thing is baked in.

The second huge benefit of Rails is that it follows MVC patterns to the letter. Because of this, the naming of your pages (called actions), backing code, and helper methods all fall right into line without any fuss. It’s a small feature, but it simplifies the process greatly, and there aren’t too many cases where you’ll want to break out of it.

Rails in general tries to be automagical – things are taken care of for you. The best example I can think of is that the addition of an AJAX-ified autocomplete box takes one line of code in the controller backing code, and one line of markup, which simply prints the box. This general air of niftiness pervades through a majority of Rails’ features. However, Rails won’t do anything for you unless you know the magic word to ask for. It’s very particular about exactly how everything should be given to it, and if it doesn’t like what it sees, it balks. This can lead to long, frustrating sessions of debugging, ending in (true story) “can it really be that simple…?” moments of realization.

Thus we get to the final bit of my impressions: how it stacks up with the competition. Rails is more or less on the extreme end of the spectrum from PHP – whereas in PHP, you lovingly craft everything you need from hand (or download someone else’s code), Rails tries to abstract it away for you. ASP.NET lies in the fuzzy middle – it tries to make web development follow a more desktop paradigm, which is both neat and confusing at the same time, and therefore in doing so it also abstracts many things away for you. However, ASP.NET has a very different philosophy as to how it should treat these abstractions – it allows, sometimes even forces the developer to customize every last aspect of it through various means, and therefore it becomes complex, cluttered, and bloated very quickly in many real-life scenarios. Rails, on the other hand, lays down the law of development and how you need to be doing it. Which one is better? That comes down to your own development preferences.

So far, for all the time I’ve wasted trying to figure out Rails’ quirks, I firmly believe that the time I saved from having to write database access code has more than made up for it.

Help find Steve Fossett

Please spend ten minutes out of your day and visit Amazon’s Mechanical Turk project to try and find Steve Fossett. You’ll be given chunks of satellite imagery and asked to point out of there is anything foreign or debris-like that they should take a closer look at.

Serverus Switcherus

If only switching servers was as easy as saying an incantation, a la Harry Potter. However, it was reasonably seamless, even if behind the scenes I dropped about 2.5 hours on transferring everything over and getting it all to work. Either way, I’m on another DreamHost server now, and I should have a little more breathing room to get development done.

Oh, and can anyone say “iPod Touch?” Yum. Tell me when it hits 50GB.

The one where we find out why ASP.NET is so convoluted

ASP.NET is wonderful and awful. Some of the conveniences it affords are great, like the control paradigm. However, it’s just too convoluted to offer a good experience. Everything in ASP.NET is “yes, you can do this, but…” and nested databinding and event handling is a mess. I’ve often wondered why such random WTFs such as using empty iframes to provide menu backgrounds arose, but today we find out why. In an obscure error message hidden in the bowels of the Wizard control:

SideBarList control must contain an IButtonControl with ID SideBarButton in every item template, this maybe include ItemTemplate, EditItemTemplate, SelectedItemTemplate or AlternatingItemTemplate if they exist.

Classic Chinese-American grammatical error. So I guess it turns out that Microsoft outsourced ASP.NET to China…