I'm back from YAPC. Michael (Peters, my colleague at Plus Three) is off at ApacheCon giving his talk there. I think he's actually done by now, since he basically had to go from the plane straight into the conference.
It was a big one this year. There were about 400 people there, and I got see lots of old friends and made a few new ones.
Mark Jason Dominus gave another talk based on his upcoming "red flags" book, about fixing bad style. He dissected a module by Chris Winters, which made for an interesting talk because Chris writes good code to begin with. I definitely want this book when it comes out.
Andy Lester gave an entertaining talk called "Get Out of Technical Debt Now!" The focus was on postponed "# TODO" and other tasks and how to
I went to a talk on Perl::Critic, which I plan to start using (maybe in my "Low Maintenance Perl" talk at OSCON), and another on B::Lint and how to customize it. Lint looks challenging, so I'll try Perl::Critic first.
The Perl 5.10 update included some good news about speeding up regexes and eliminating some conditions where a regex would run forever on a large chunk of text. I'm personally not very excited about additions the defined-or operator ("//"). When I was a kid, we had to check for defined uphill, both ways, in the snow.
There was some buzz about a new OO module called Moose, which is somehow a product of some Perl6 work. I couldn't quite figure out the point of it in the 20 minute presentation, but Randal and Audrey and some other people seemed excited about it.
Tatsuhiko Miyagawa (now of Six Apart) gave a couple of interesting talks. (He gave more, but these are the ones I saw.) One was on Plagger, a tool for doing things with RSS. It had
all kinds of plugins for turning various things into feeds, filtering them, and generating different kinds of output. There's an example at
His other one was a lightning talk on XML::Liberal, which is a module for parsing the broken XML that most RSS feeds have in them. It corrects all the problems before passing it to XML::LibXML and it has no performance penalty on XML that is not broken. This could be very useful.
There was a good Subversion talk by one of the book's authors, but not too much to take away from it that I didn't know. One thing I learned
is that work is being done on merges that track what you've already merged. I make use of branches and merging quite a bit, so this could be helpful. Also, there is a way to mark individual files as requiring a lock before working on them, which can be handy for large binary files.
On the last day, I went over some new code for Apache::SizeLimit with Dave Rolsky and then caught some of MJD's Higher Order Perl talk.
The lightning talks were the usual mixed bag. Audrey Tang presented a brilliant one, which I believe was written by someone else at
YAPC::Asia. When video becomes available, watch
usual in-joke movie too, which was particularly good this year.
Slides for most of these talks are here:
And I'm sure you're all wondering how Michael and I did. I got some good laughs with my lightning talk on Web 2.0 and I was pleased with it. Michael had a packed house for his AJAX talk (adding AJAX features to the Krang CMS), and did a great job. Several people told me later that his was a favorite of theirs at the conference.
Thanks to the hard-working organizers who pulled off a great event.
I've been following Tim O'Reilly's series on how large sites scale their databases. Also, this article about topix.net. They seem to fall into two camps:
Amazingly, Craig's List uses MyISAM tables. I guess it's nearly all reads, but I just didn't think the locking approach used for MyISAM tables would hold up to traffic like that. A primary reason why I use InnoDB is the row-level locking and the multi-version concurrency system, which means that readers don't block writers.
Two interesting things here are that none of them use PostgreSQL, despite a few of them being fairly new, and that none of them have tried commercial offerings for database clustering, like the stuff IMB and Oracle sell.
In fact, I've never met anyone who had tried the Oracle or DB2 clustering. Even the people who have the money seem to avoid it. Can anyone offer any personal anecdotes about it? Does it work at all?
Sometimes I want to test if my application sent the right redirect, but I don't want to follow it. It might be to a page that isn't accessible from my dev system, or is hosted by someone else and I don't want to hit it every time I run the test suite.
To do this with Test::WWW::Mechanize, I use this code:
my $mech = Test::WWW::Mechanize->new(autocheck => 0);
$mech->requests_redirectable(); # don't follow redirects
$mech->content_contains($url_to_redirect_to, 'sent to correct URL');
Another thing I want to check is if the request set a cookie. A simple way to do that:
my $resp = $mech->get($uri);
ok($resp->header('Set-Cookie'), 'has cookie header');
'cookie was accepted');
Since the LWP cookie handling does the same checks that browsers do for domain and path, this can help catch problems with your cookie headers.
It's been in beta testing for a while, but now it's live. Now I can type in "DBI" and the DBI module is at the top of the results! I used to have to dig for it. Same for CGI. It's much faster too. Swish-E, the search engine behind it, has been great on the projects we've used it on, and I'm glad to see it powering CPAN now.
Not sure if this was Graham Barr or Ask Bjorn Hansen or someone else, but whoever it was, thank you! This is a great improvement for CPAN search.
This article by Bruce Eckel discusses the book "Beyond Java" by Bruce Tate, in which Tate discusses Ruby on Rails and a few other things. For those who don't know, Eckel is the author of one of the most popular Java books ever, "Thinking in Java."
The article is full of good quotes and has a fun snarky attitude to it. I will warn you now, he doesn't like Perl. However, he does recognize that Perl brought something important to the table, and it's nice to read a piece by someone with a little more cool-headed view of the Java vs. Ruby showdown that is filling oreillynet.com these days.
Here are some choice quotes:
...almost at the end of the book he declares that he doesn't have time to learn these other languages in any depth -- although he has no trouble condemning the same languages in his rush to Ruby.
Ruby is to Perl what C++ was to C.
The backlash from heavyweight web frameworks has been significant. We now know that EJB 1 & 2 were based on an entirely flawed set of use cases.
I think we've mostly been hearing from people who have come from Perl and found Ruby to be a "better Perl, with objects that work," or people who are finally convinced that dynamic languages have merit, and so mix the enthusiasm of the first time dynamic language user (quite a rush, as I remember from my 2-month experience with Perl many years ago) with their experience of Ruby.
From an interview with Bruce Tate, author of some O'Reilly Java books:
Siddalingaiah: Ruby on Rails is known for its rapid Web application development, but there others, such as PHP. The PHP community has developed mountains of opens source Web applications. Do you think PHP developers have something valuable to contribute?
Tate: Not really. PHP, and the ideas behind it, have been around for a while. It's quick and dirty. We know quick and dirty. Visual Basic. PHP. Perl. They don't excite me. Now, quick and clean, that excites me. Ruby on Rails is model-view-controller. It stretches the object-relational-mapping state of the art. It's quick and clean.
Well, I'm glad we cleared that up. You guys writing MVC apps with OO PHP5 and Perl can all go home now. (The idea that ActiveRecord somehow stretches the O/R mapping state of the art is pretty amusing too.)
This is from the first page of the latest Ruby on Rails article on the O'Reilly website:
"In this short time, Rails has progressed from an already impressive version 0.5 to an awe-inspiring, soon-to-be-released version 1.0 that managed to retain its ease of use and high productivity while adding a mind-boggling array of new features."
Come on! I don't know Curt Hibbs, and I have nothing against him, but this intro is positively ludicrous. How is this supposed to be "awe-inspiring?" Does he think that before Rails we had no object/relational mappers, no code generation, no MVC, no test scripts, no dynamic languages? You'd have to ignore an awful lot of web development tools (that pre-date Rails) to think that.
But he does seem to think that. A little further down the page he says this:
"The typical development cycle for testing a change to a web app has steps such as configure, compile, deploy, reset, and test."
In what world is that "typical"? The only web development tool in use these days with a compile step is Java, and if you look at web development as a whole, there are more people NOT using Java than using it.
It's also not a very accurate list. Even Java apps don't require reconfiguration every time you change your code! And Rails doesn't remove the "test" step.
Most of the writing about Rails that I've seen seems to have blinders on when it comes to anything other than Java. It would be nice to see some acknowledgment that other dynamic languages already have this stuff, and a little more touch of reality in general. The current tone smacks of ego and arrogance. I don't see anything wrong with trying to draw in Java converts, but if the plan is to just ignore PHP, Perl, and Python, they're losing out on an awful lot of potential allies.
So, to all those people who did just that at YAPC, thanks, and pleased to meet you.