I Like Rails 2

Tonight I gave a presentation on Rails 2 at Dallas.rb. Within, I note some of my favorite new things in Rails 2. Some things small, some things large.

If you weren’t there, I should probably explain a couple of the slides. I think Rails 2 is, despite its whole-numberness, an evolutionary release. It makes the Rails “language” smoother around the edges. Granted, its still somewhat blob-esque, but its getter rounder. I dig it.

Besides that, I think Active Resource, or ARes as they call it in the biz, is going to prove useful mostly behind the firewall in your datacenter. As you build more and more applications, you’ll find you need to use resources across multiple apps. This is exactly where ARes shines – providing a common user service, for example.

You can download I Like Rails 2 it if you missed it or, for some reason I can’t even fathom, aren’t even in Dallas.


Getting ahead on Git

Git. Soon, you’ll be using it, too. The definition of “soon” probably varies widely depending on what kind of person you are. But, no better time than now to start getting acquainted with the idea.

Finally, what I really wanted to do here was publicly commend Dr. Nic Williams for his adept use at Star Wars metaphor and humanization of Grand Moff Tarkin in his post on using Git to manage the new Rails TextMate bundle (Ed. now 404). Well done, sir. I owe you a frosty one.

Ed. revised Feb 15, 2025. URLs updated or noted as 404, copy left intact. What a time-capsule!


The Mint logo, geometric beauty

Geometry of the Mint logo:

The Mint Logo with interesting annotation

Frickin' genius.

Ed. revised Feb 15, 2025. No notes.


What good could come from MicroYahoo?

Microsoft Proposes Acquisition of Yahoo! for $31 per Share:

REDMOND, Wash., Feb. 1 -- Microsoft Corp. today announced that it has made a proposal to the Yahoo! Inc. Board of Directors to acquire all the outstanding shares of Yahoo! common stock for per share consideration of $31 representing a total equity value of approximately $44.6 billion.

So everyone’s probably gonna spill ink on this one. Understandably – in Flickr, Upcoming and del.icio.us you’ve got three of the most trusted and loved sites out in their respective communities. In addition, there’s a lot of respected people, both in web development and open source, at Yahoo. Joining Microsoft, an organization with minimal respect in the web development and open source communities, would reduce those people’s cred right out of the gate.

Were this bid successful, here’s what I hope would happen. Microsoft uses it as an opportunity to rebuild organizationally. Bury the hatchet with open source and open up the development of Internet Explorer. Yahoo continues building apps like Flickr and del.icio.us like they always have. A rewrite on .NET technologies isn’t imposed like it was on Hotmail. In the end, Microsoft becomes an organization where closed source, proprietary development can flourish with open source, standards-based processes.

This is wild guessing on my part. That said, if you look at Microsoft, its clear they are having major execution problems. Xbox is the only group that is widely successful and even they have hardware problems. All the other groups are missing timelines and customer/developer expectations. Just like Yahoo was before they picked up Flickr, del.icio.us, Upcoming, etc.

If Yahoo can make acquisitions to rebuild their culture, perhaps Microsoft can too.

Ed. revised Feb 15, 2025. Turns out this didn’t happen, but my predictions did reify with the Microsoft acquisition of GitHub. Also, it’s hard to remember the moment when Yahoo was ascendant! Take care what you wish for?


Whither Prototype or jQuery

The fact and fiction of why I choose Prototype over jQuery

FACT: I like Prototype better. It fits the way I program perfectly. I like prototypes, I like programming in a somewhat functional style. I don’t think of things in a DOM-centric way. I’m OK with having client-side state.

FICTION: jQuery is the “emo” framework. Apparently it (was) the “new wave” framework. Either way, I will always hold it against John Resig that he chose Devo hats as the logo.

FACT: jQuery is a fine framework if you think in terms of the DOM or don’t do much back-end programming.

FICTION: To become proficient at Prototype, you have to punch the first jQuery user you see every day. I have never punched a jQuery user. Attempts to verbally duck punch them have met with minimal success.

FACT: Dollar functions are sexy. Clearly one of the best abuses of a programming language grammar, ever.

FICTION: You can’t write unobtrusive JS with Prototype. I wrote a tutorial for Advanced Rails Recipes on how to do that with Dan Webb’s lovely LowPro library.

FACT: We can all agree, YUI is really unpleasant to look at. ENOUGH.with.the.fourteen.dots.before.I.can.do.something.useful!

FICTION: Sam Stephenson is an artificial intelligence akin to GLaDOS. I’ve met Sam twice. He did not attempt to coerce me into an incinerator.

Now that we’ve got the record straight, I’ll leave you with a comparison. To my jaded, biased and stubborn eyes, trying to use jQuery feels limiting. But I think that’s particular to my experience and preference. No doubt, if jQuery were a musical instrument, it’d be akin to Stevie Ray Vaughn’s guitar “First Wife”: suited to its user, iconic and specifically built to its purpose. If you were to try and play a Beethoven piano sonata on First Wife, it just wouldn’t come out right. However, your basic baby grand piano is equally suited to Beethoven or B. B. King. So in my tortured metaphor, Prototype is a piano – harder to play well, but more rewarding once you do.

Ed. revised Feb 15, 2025. I left everything intact, to remind myself where my writing/thinking was when I was 29. 🫠


Magnetic Ink

Processing might force one to use for loops, but this bit of generative art is beautiful. The music ain’t too shabby either.


The good news about a long writers strike

Apparently, some think that the WGA strike could continue well into 2009, affecting movies as well as TV. No Writers, No Movies? Strike May Hit '09 Films:

Also moved to the back burner are "Nine," the musical based on the Fellini film "8 1/2 "; "Angels & Demons," the second installment in the "Da Vinci Code" franchise; Michael Bay's "Transformers 2"; and 20th Century Fox's remake of the 1966 film "Fantastic Voyage."

So, really, only half of the possible outcomes are bad. ZING! Take that, Michael Bay and Dan Brown!


Overcoming "browser tab seventy-three"

So now that NetNewsWire (NNW) is free, everyone should go download it and enjoy the love. It was the first app I ever bought for Mac, and it would seem I will only have to pay for it once. Hearty shout-outs to Brent!

That said, any experienced NNW user knows that information overload is easy to get yourself into and hard to elude once you’re wrapped in its grasp. The very manly Merlin Mann brought us Inbox Zero and I knew I needed to strive for Feeds Zero, in addition to browser-tab zero, Twitter-zero, etc. Unfortunately, Feeds Zero can lead to dozens of open browser tabs in NNW. Fortunately, NNW is better than any other WebKit app I’ve seen at dealing with this.

But now I’ve got a ton of browser tabs in NNW holding down my soul. A contemporary, first-world problem. In trying to keep up with feeds, one spawns many dozens of browser windows. Lots of stuff to read. But, the sheer mass of 100+ tabs is considerable friction holding you back from, you know, acquiring all that information.

Here’s my current situation:

NetNewsWire tab overload

I get myself into it pretty frequently. I bet you do too. Here’s how I get through it.

Work from both ends

In NNW, Cmd-Shift-Left and Cmd-Shift-Right move you up and down the vertical tab bar. Sometimes what I see in the first several tabs just isn’t appealing at the moment, though I can easily convince myself that my future self will find it intriguing. So I just turn around and head the other way. I might find something I like in that direction.

In fact, if you just finished some un-bolding, the newest, freshest links will end up closer to the Cmd-Shift-Right side of the list. In theory, your current self found that intriguing enough that you could actually start reading it now. ;)

Just close the tab

As I’ve alluded, sometimes your past self just has poor taste. Your former self pulled up some article that you know, really, you’re only barely interested in reading. Or maybe you just felt guilty not reading it, but you still wanted to unbold it.

Look, sometimes your Attention Bush needs trimming. Cmd-W is your friend, people. It makes the pain go away, no matter what app you’re in.

Export to HTML, process outside of NNW

Recently, I’ve found the first two tricks weren’t helping me. My tab list just grew and grew. The guilt became intolerable. So I rebooted. Kinda.

Tab->Export Tabs in NNW is my new best friend. I used it to export all my tabs to an HTML file. Then I sorted the list in TextMate, so as to collect everything by author, rather than over time. I’ve been pulling a few links off this list every now and then. Once they’re in my real web browser, I remove them from the list.

A couple days in, I’m already a fourth of the way through the list. And I’ve been able to guiltlessly tackle my feeds. Happy.

Know what you're up against

I have an AppleScript that tells me how many tabs I have open in NNW. It’s vital for telling me whether I should focus on “feed zero” or “tab zero”. You can see the window it displays the count in the screenshot above. Here’s the code of the script:


tell application "NetNewsWire"
	set theCount to ((number of tabs) - 1) as string
	display dialog theCount & " open tabs" buttons {"OK"} default button 1
end tell

Stick it in ~/Library/Application Support/NetNewsWire/Scripts and it will appear in the Script Menu for NNW. I like to use the Keyboard Preferences pane to bind the script to Control-Cmd-C for quick use.


So. I’ve given you some chisels that you can use to work down that attention boulder you’ve made for yourself. Just remember that the goal is to acquire new and fascinating information and still get stuff done. Keeping those attention sails well trimmed is the best way to avoid hundreds of NNW browser tabs.


Wheaties for programmers

Reflections of an Interface Designer:

If you want remarkable results, feed a good programmer a diet of good design.

Kevin’s right on here. I’ve been eating up design lately. But even before that, seeing some really great design, even if its not code, inspires me to get off my butt and write more, better software.


Something lovely from David Lanham

I love this coat-of-arms-esque ditty by David Lanham:

David Lanham : Grenadeer

Found it by the good word of Bill Burcham.


The barbarism of the for loop

I’ve been reading Programming Erlang and also casually looking into Haskell. So yesterday when I tinkered with Processing just a little bit, code like this just looks barbaric:


  for(int i=0; i<width; i++) {
   doSomething(i);
  }

Compare to Erlang:


  % Closer to Java and PHP. Nearly, but not quite, tolerable
  lists:foreach(DoSomething, lists:seq(1, 50)).

  % More Ruby/Lisp like. I can dig it.
  lists:map(DoSomething, lists:seq(1, 50)).

  % List Comprehensions FTW
  [doSomething(I) || I <- lists:seq(1, 50)].

I mean, really. If you’re writing for loops in 2008, don’t pass go, don’t collect $200. Or even 200 Euro.

The caveat is if you’re implementing a language or compiler. Then I’ll forgive you. But if you could work that out by 2009 or so, we’d all thank you.