The Ruby programming language is popping up everywhere this week. This is yet another in a series of indicators that something’s brewing in the programming language space.
First, on Monday, Mike Loukides blogged about almost trying to learn Ruby. It’s fun to see that he’s at least planning to learn Ruby. At JavaOne a couple of years ago, Mike told me that O’Reilly really wasn’t seeing much interest in Ruby. I replied that Ruby was still at the stage where the “thought leaders” were discovering it. By Tim O’Reilly’s own heuristic, where the alpha geeks are going, others soon follow, and I predicted that Ruby would soon become more popular. I know that O’Reilly’s seeing at least one indicator of increased Ruby interest, and maybe that’s one reason Mike’s planning to learn Ruby. This time, though, he decided he could get things done much faster using the tried-and-true Java way, and left his copy of PickAxe on the shelf.
Even though he decided not to actually try Ruby, he’s questioning whether it’s really useful. That’s not an auspicious start for Ruby this week, I guess. But back to Mike later.
Today, there are a couple of other things. (And if you average Monday and Wednesday, you get Tuesday, see?) First, Howard Lewis Ship (author of the best Java web framework) showed up on ruby-talk and also posted a very favorable blog about his first Ruby program. I was elated to see this. Howard’s expressed skepticism about dynamic languages to me at an NFJS conference, and was obliquely dismissive of Ruby in an earlier blog. But he’s tried it, and was really impressed. I like the way he describes his first Ruby program: “My trembling first journey into Ruby is […] sloppy, doesn’t report errors well, and took me too long to write (almost as long as it would have in Java!)” His first program in a new language, and his criterion for “took too long to write” is that it took nearly as long as it would’ve taken in Java. Sounds like Howard caught a glimpse of how productive Ruby can be once you know it well.
And I have to say that Howard’s first program is very nice! There are some things in it that an experienced Ruby developer would do differently, but it’s definitely not “a Java program written in Ruby.” Clearly Howard tried to learn not just the syntactic details of Ruby, but “the Ruby way.” That’s how we should all approach learning a new language.
So back to Mike Loukides. Maybe Ruby just isn’t right for Mike. I’m on record saying that, in the debate between static and dynamic typing, perhaps there’s not “one true way.” But I’m convinced that for most tasks, dynamic languages are the way to go. (And I was a Java bigot for quite a while!) It’s instructive to draw some lessons from the contrast between Mike’s and Howard’s experiences (and I’ll throw in a few general thoughts, too):
- Anytime you have learned one programming language really well, you’ve reached a kind of “local maximum.” To learn something different, even if it’s ultimately more powerful, means stepping down from your current peak of familiarity and expertise and flailing around like a newbie on ice skates for a while. You won’t see the benefits instantly. Howard describes his “trembling first journey,” and that’s how we can expect to feel the first time we try to write in a new programming language.
- Until your project is big enough that the gains start to outweigh the cost of the learning curve, the new language is bound to seem like a net loss. Howard’s 292-line Ruby program is about the smallest project where you could expect the effort to pay off. (After all, it took almost as long as writing it in Java! :-) Mike’s 25-line Java program is definitely too small.
- There are tradeoffs in languages, and Mike’s right: not declaring your variables means that you don’t have quite as much help debugging misspelled variable names. But the payoff comes in other ways, and not all of them have to do with writing the production code. Ruby_does_ make writing the code easier, I think – but it also makes it easier to write tests, and the code is easier to change.
- Not all “scripting languages” are alike. Mike implicitly criticizes the terseness of Perl (and also the “cryptic esthetic” of Perl culture, I suspect) when he lauds Java’s readability. But Perl is different from Java in many ways, and Ruby only shares some of those characteristics with Perl. The Ruby language and the Ruby community place a big emphasis on readable code.
My intent isn’t to bash Mike Loukides; he’s a great guy, and he definitely has a point: the overriding criterion is getting the job done, and for his recent purposes learning a whole new language was probably overkill. (And besides, it would be the height of foolishness to bite one of the hands that invited me to Foo Camp.) But I do hope he’ll make time to give Ruby a try, and give it a chance to prove itself on something reasonably sizable.
(Oh, and the other thing about Ruby that happened today? I noticed that, on the very cool website 43 Things, “Learn Ruby” is number four on the list of most popular things people would like to do. I wouldn’t read too much into that; I learned about 43 Things through the Ruby community, and I suspect that high placement is an artifact of the way word of the site has spread. But it was still a pleasure to see.)
Yesterday, reports surfaced that Internet Explorer had suffered a dramatic drop in “market” share against Firefox, Safari, and Opera. Reports of IE’s demise, however, were quickly shown to be exaggerated. True, certain sites reported double-digit drops in the percent of their visitors using IE—but they were sites with highly technical audiences, the kind you would expect to be atypical early adopters. According to this article, IE’s drop among more mainstream users is much more modest: down from 95.5% to 93.7% (not quite three percentage points) since June.
But wait: there’s more to it than that. Sure, Firefox isn’t dominant, and has a long way to go before it is. It’s quite likely that it will never completely overtake IE. But that’s not really the point. The point is that, all of a sudden, modern browsers (especially Firefox, but also Safari and Opera) can no longer be ignored by organizations developing web apps.
Let’s look at the events that have brought us this far.
Firefox overtook IE in the feature department a number of months ago, but it was still a little rough around the edges, and the version numbers (below 0.8) reflected that. But then, just under three months ago (following a rash of new security bugs in IE and some worms that took advantage of those bugs) the U.S. Department of Homeland Security issued a recommendation that Windows users consider switching. It was a gentle recommendation that lacked teeth or urgency, but Firefox downloads went up immediately, and have continued at a higher rate than before.
93.7% still seems like a really daunting market share for IE. But turn it around: that’s more than one out of every 20 web users (also known as “potential customers” to commercial websites). Just three months ago it was slightly less than one in 20; today it’s trending toward 1 in 10. That’s significant.
Many companies write web applications that support only IE. Although I’ve never agreed with that strategy, I can see how some are convinced that it’s a reasonable one. But I suspect the problems with an IE-only approach will quickly become clearer.
The extent of IE’s dominance today is not the point. The point is how quickly other browsers can become too significant to ignore. It’s fairly easy for some to justify ignoring 5% of users. But can you afford to ignore 10%? If current trends continue, modern, non-IE browsers will have a 10% share by the end of the year. Their share will have doubled in six months.
And there are good reasons to think the trends will continue. Firefox’ lead in features continues to grow, and it’s becoming quite polished. The 1.0 release will appear soon, and that’s bound to bring increased publicity, interest, and acceptance. IE’s security woes have calmed a bit, but I don’t know anyone who believes they’re over for good. Meanwhile, Firefox has very few security flaws, and they tend to be fixed very quickly.
These thoughts began swirling in my head this morning, but that’s not the end of it. A little while ago I decided to download the Firefox 1.0PR release for my wife (she’s been using Firefox, and before that Mozilla, for a long time—and no, not because I told her to). When I saw the front page of mozilla.org it felt like the first rumbling of an avalanche. Today, in his column in the Wall Street Journal, Walt Mossberg wrote this:
I suggest dumping Microsoft’s Internet Explorer Web browser, which has a history of security breaches. I recommend instead Mozilla Firefox, which is free at www.mozilla.org. It’s not only more secure but also more modern and advanced, with tabbed browsing, which allows multiple pages to be open on one screen, and a better pop-up ad blocker than the belated one Microsoft recently added to IE.
That’s big. I repeat: what matters isn’t IE’s share today; it’s how quickly things can change. When Walt Mossberg, Homeland Security,Fortune magazine, and the German government (among many others) are all saying “dump IE”—and the signs are that many people are switching to Firefox even prior to the 1.0 release—do you really doubt that IE could suffer major losses over the next year or so? Yes, they might be able to hold off this threat, but if you’re writing web apps today, do you want to bet on that? Do you want to risk having to explain why you’re turning away 15% of your potential user base?
(Oh, and one more thing. “Dump IE” is actually the sixth recommendation in Mossberg’s column, one of several things he suggests doing if for some reason you can’t follow his first recommendation. That first recommendation, which makes all the others unnecessary, is “chuck Windows altogether and buy an Apple Macintosh.” But that’s another blog.)
Not that anyone will really be surprised by this … but it’s nice to have ironclad proof. At Foo Camp, I finally learned for certain that James Duncan Davidson sleeps with his PowerBook under his pillow.
I had the incredible privilege of spending the past weekend at the second Foo Camp, O’Reilly and Associates’ brilliant, informal weekend gathering of assorted smart and interesting people (plus me, I guess :-). We all met, talked, brainstormed, thought big thoughts, played pingpong and poker, and … well, anything else that geeks think of to do when put together for a weekend. We geeks spend our lives interacting mostly with people who don’t think quite the same way we do, so during a geekfest like Foo Camp there’s an explosion of communication, a real joy in having so many people to talk to who all seem to be speaking the same language for a change.
Last year I had several friends who went to Foo Camp, and I kept hearing the same thing from them: “I’ve never felt like the stupidest person in a group of people before, but that’s what I felt this weekend—and it was great!” That really is what it felt like. I spent the weekend soaking in what I was hearing from the very smart people who were there, and scrambling to keep up. But it was fun and exhilarating.
Here’s a quick blizzard of impressions:
There were sessions about 3D printing, hardware hacking, biology, novel approaches to science education, web design patterns, the technical book industry, VMs for dynamic languages, applying information design principles to API design, realtime 3D sound processing, and more. Trevor Blackwell brought his homemade Segway-equivalent (and the unicycle version). JDD and Mike Clark brought temporary Foo Camp tattoos that seemed to appear on everyone there. Andy Hunt and Tom Anderson had a lengthy jam session Saturday, all piped through Patrick Leahy’s killer spatial sound system. Jeff Bezos, Steward Brand, Kevin Kelley, and Ray Ozzie were there. (Danny Hillis, John Seely Brown, Larry Page, Esther Dyson, and Mitch Kapor were supposed to be there too, but if they were I missed them). Peter Drayton brought an Ambient Orb and a hardware development kit for it, so he could get together with Mike Clark and start hacking on the next generation extreme feedback device. Ten (that’s right, 10!) of the No Fluff, Just Stuff symposium speakers were there. And it was fun to catch up with old friends—Andy Hunt, Daniel Steinberg, Dave Thomas, Erik Hatcher, James Duncan Davidson, Jason Hunter, Mike Clark, Mike Loukides, Rich Kilmer, Scott Davis, and Ted Neward—showing off the project I’m working on, looking at their latest work, etc.
I’ll try to find time over the next couple of days to blog about some of the things I learned, and post some photos.
Thanks to Tim O’Reilly for having us all there, Sara Winge for expertly organizing the weekend, and the folks at O’Reilly who put my name in the hat.