Monday, April 23, 2007

2nd Annual Silicon Valley Ruby Conference

After a nearly a year without writing any more posts, I am ready to start again. From now, my blog will more tech-focused because I am currently building a new website and also because I plan to spend a lot more time with Ruby on Rails. There is just so much new stuff going on in the Rails + Ruby community, that it makes web development fun again. Fortunately, I was able to spend the weekend at the Silicon Valley Ruby conference with around 100 other ruby geeks who were discussing the latest ideas in the community. What's even more amazing is that more than 50 of them got up before 8:00a on Sunday morning to attend the conference.

Many of speakers were experienced Rubyists from Pivotal Labs, Twittr, and Sun Microsystems but there were also local Ruby programmers who had contributed their own gems to the community. There was chronic, a library which parses dates entered in english eg. "next monday at 5:00pm" and mofo which makes it easier to output your website data in a microformat.

My 2 favorite talks of the conference were about Selenium and JRuby. Selenium is an open-source framework that 'automates' the testing of webapps. Like a macro language for websites, Selenium can be programmed to click at your site, type on the forms and test the html for the expected result. By combining Selenium with Rails, Pivotal Labs has made it possible to concurrently test your website and check values in the database or in the session. Think of a testcase that creates a new user: your test script you tells Selenium to automatically enter the username and email through your web ui . From the same test script, you then verify that the new user was created in the database. The ability to do everything with a single test script looks very cool but it seemed a bit complicated to setup.

I was also impressed by the talk given by the JRuby team at Sun. JRuby is a Ruby interpreter written in Java instead of C++. So you can use JRuby as a scripting language for Java or call JRuby from Ruby (using distributed Ruby, drb) and even run rails inside an Apache Tomcat container. If you are like me, then you are wondering whether all the extra layers is just waste of memory or CPU cycles. Performance is still a problem when if you are run Rails on JRuby on Tomcat, but it does seem that the overall performance of JRuby is getting better. The Sun team reported that JRuby is running roughly 1.5 slower than CRuby, and that the performance will improve for the 1.0 release which is coming in June. This is pretty exciting news for Ruby programmers who have come over from the Java side.