Tuesday, August 15, 2006

I just attended a Rails Studio!

Pragmatic Studio Alumni Stamp

I plopped down my own cash to attend a Pragmatic Programmers Pragmatic Studio, and I think it was money well spent. I attended the Columbus session of Rails Studio, and it was a solid three days of Ruby and Rails goodness.

Mike Clark and Dave Thomas are good instructors. I had seen Dave talk previously at a No Fluff, Just Stuff, so I knew I'd like him. Mike was really good, too -- they make a great team, actually. Of course, Mike's wife, Nicole Clark, seemed to be the real organizing force for the studio series.

Even before the course began, I could tell this would be a different experience than I had previously encountered in a training session. When I went to sign up online, I discovered there was no place to enter my credit card information. Instead, Nicole called me to ask a few questions --like if I had enough object-oriented programming experience-- to make sure I was ready for the course. I've never encountered a company that might turn away a student -- and their money. (In fact, their Advanced Rails Studio page says, "...you'll need to convince us that you're ready to attend.")

Sure enough, the class sold out. 35 spots. I think I got in one or maybe two days before it sold out. I knew that Columbus had quite a few Rails aficionados, that several Clevelanders had attended CRB meetings, and that Cincinnati had a healthy group, too (including a Rails committer - Jim Weirich [CORRECTION: Scott Baron is a committer from Cinci; Jim Weirich is the creator of Rake]), so selling out wasn't a surprise. At one point, Mike said something to the effect of, "I would say this is the hottest ruby community in the country... the most vibrant," in regard to Columbus specifically and Ohio in general. What did surprise me was that at least 15 of the 35 seats were people from elsewhere in the country, including Hawaii, and even one from England! I'm lucky I got in!

But the pre-class surprises didn't end there! They invited us to join a pre-class Yahoo! Group so attendees could share info and help each other with the pre-class homework. Yep: we had an assignment! It was to download and run a simple Rails app to let them know we had a working Rails environment installed. It also let us submit what size T-shirt we wanted (other goodies: we also received workshop source code, a binder with all of the slides, an alumni discount on Pragmatic books and events, a class completion certificate, and a "I'd rather be on Rails" bumper sticker; also, this week we should get invited to join a mailing list exclusively for Studio alumni, as well as a mailing list for Rails jobs).

I had recently had Windows XP reloaded on my laptop, and rather than re-install Ruby and MySQL again, I decided to go with the option recommended for the class: InstantRails. Like Uniform Server or EasyPHP, it is a self-contained, extract-it-don't-install-it package, containing Ruby, Rails, Apache, MySQL, and PhpMyAdmin. That's pretty sweet. It works really well (though I did add Ruby to my regular PATH so I could use it outside of InstantRails consoles).

In preparation for the class, I also had to decide what editor I wanted to use. I could go with a non-IDE editor (with syntax highlighting), but I wanted to go for something more substantial. I had already used RadRails before, and liked it. I am very familiar with the Eclipse environment, which RadRails is built on, so I like that. Besides, it is getting better and better. Despite that, I decided to go with jEdit with the Ruby Editor plugin, probably because I'm evaluating editors (for personal use as well as a future blog post). I have to say, jEdit has lots of great plugins, and the Ruby Editor plugin is really nice, but I'll have to work with it more before I feel comfortable enough with all of its features to recommend it above RadRails.

Of course, the instructors were using TextMate, but at the moment I'm stuck on Windows (saving for a MacBook), so I wasn't so lucky. Still, I jotted down notes when they gave quick sidebar tips for TextMate.

What about the actual class?!?

Class started with coverage of Ruby. The basics were quickly covered, and common idioms and conventions were pointed out as we went, which I appreciated. Control structures, object-orientation, blocks, symbols, data structures, modules, etc. Just going over this stuff in class made me feel like I grokked it better than I had after my previous readings and irb sessions.

At one point during all of this, Dave commented that, "Java is the blunt, rounded scissors of programming languages," to everyone's amusement. Now, I love Java, but I'm starting to grasp the beauty of Ruby, too. Learning something different from Java is my main motivation for taking this class. I have limited experience with several non-Java languages, but aside from JavaScript, most of my 8 year IT career has been spent working in Java.

This whirlwind tour of Ruby went fast, but was backed up by demos, exercises, and no less than 91 slides (nicely categorized types of slides, I might add).

Next, of course, came Rails. History, definition and philosophy were addressed, though most attendees were surely familiar with this already. The MVC (Model View Controller) pattern was covered and mapped to Rails. From there, Dispatch, Controllers, Views (rhtml) and Models (ActiveRecord) were elaborated upon.

The class was peppered with up-to-date information about Ruby and Rails. Of course, this was all the more emphasized since the class coincided with the security issue that precipitated Rails 1.1.5 and 1.1.6.

Coding exercises really picked up at this point. This was helped, in gradations, by sample code/apps that were provided. I must say that I really came to appreciate ActiveRecord Migrations during these exercises. First, I had never messed with Migrations before. Second, I've always felt that the schemas where I work were way too informally managed. Third, such an approach really lends itself to local databases for testing and development, which is another pain point where I work. Fourth, it gives a degree of RDBMS-agnosticism to DDL (and coming from the Java world, I appreciate anything that keeps me from being tied to a vendor).

Scaffolding was discussed and used, then the exercises moved beyond it. This was appropriate since Scaffolding, although nice and helpful --especially for prototyping--, is not a full lifecycle tool.

Another bit that I had never used before was the gem_server. I like gems! And this let's me view the RDoc for my locally installed gems. Speaking of which, RDoc is pretty nice - I especially like the inline source feature that Javadoc doesn't have (by default).

I also hadn't used Rake very much prior to the class. I have a lot of Ant experience, and a little bit of Maven experience, and I have to say that the Rake/Gems combination seems nicer to me.

ActiveRecord validation and finders, script/generate, sessions, web forms, partials, RJS, Ajax and troubleshooting were up next. After that, testing was the topic. It didn't get as much attention as I expected (given that Ruby and Rails both are so TDD-friendly. Still, the topic was at least touched on each day. Fixtures, Rake commands, Unit, Functional, and Integration tests were all covered.

The second night, many of the attendees went out to meet, eat and imbibe. I was unable to go out because my daughter had contracted pink eye really bad in one eye (coincidentally, before I knew this, I brought her home a pink, one-eyed foam ball - what are the chances?)

The third day, we started 30 minutes early so we could finish and allow more time for everyone with flights to catch to absorb the extended airport delays that the recent terror attempts were causing.

Model associations, as I expected, were a large topic. Transactions, more testing and mock objects, ActiveRecord life cycle hooks, routes, RESTful web services, UI helpers, and security were next in line.

After that, deployment was the topic. Session options (file, database, memcached), server options (WEBrick, FastCGI, Apache, lighttpd, and Mongrel), caching (page, action, fragment), freezing Rails, and Capistrano were also covered. I have to say that Capistrano is very impressive, as well. I wish I could use that at work! And it makes me think that a Virtual Private Server is the way to go for whenever I start needing hosting for my inevitably killer Rails apps.

A few items were put in the "parking lot", but we didn't have time for them. Speaking of which, that just reminded me - I don't think there was any mention of DamageControl (but it appears that it is no longer an active project). Watir is another Ruby tool that I would have liked to have seen covered (though Selenium is a similar tool that I will look more into first).

All in all, it was a fun and informative three solid days of RoR goodness. I was worried that I would be too tired for an all-day class, having been ill right before the studio and only getting between 2 and 5 hours sleep each night of the studio, but I never had to fight my eyelids once! I highly recommend attending a studio if you can!!


At 16:17, Anonymous Anonymous said...

Cincinnati had a healthy group, too (including a Rails committer - Jim Weirich)

Heh ... Looks like I got a promotion!

Although some of my libraries have appeared in Rails, I'm not an actual committer. Cincinnati does in fact lay claim to a Rails committer, but that would be Scott Barron.

At 16:04, Blogger muncman said...

Ew! My bad - sorry!

Being wrong on a blog feels even more embarrassing than I would have guessed!

Thanks for the correction!


Post a Comment

<< Home