I wasn't able to go the BYU Ruby User's Group meeting last week, but Lee Jensen went and filed this report:
I went to the BYU RUG Meeting last night in Provo. The guest speaker was Eric Hodel part of the Robot Coop makers of the 43(things,people,places) social sites. He explained some of the interesting projects that he's been working on and has done in Ruby.
He's currently working on a project called Ruby2c or MetaRuby which seeks to make an parser which will implement a subset of Ruby that can be output to the C language and then compiled. What they seek to achieve by doing this is to write the Ruby language in Ruby itself, opening up future development of language internals to anyone that knows their subset of Ruby and not just Japanese C hackers. It was an interesting project but the presentation was over just about everyone's head.
He next went on to talk about Drb which for those that don't know is distributed Ruby. Essentially it's a simple networking library in Ruby that allows a Ruby process to use remote objects as if they were local. In addition to this he gave some examples of his usage of Drb. One example was using Drb with Rinda (a Ruby Linda distributed computing implementation) to monitor live application servers.
He also talked about extreme programming concepts. He emphasized three philosophies.
- Ya ain't gonna need it. This means don't try and plan for everything and implement it all at once. You can work faster if you don't have all that crap in your head.
- DRY: Don't repeat yourself. Refactor early, refactor often. If code starts looking bad fix it. It'll only be harder later
- Test everything. He emphasized test first principles and showed some examples from code he was working on.
One of the sample rails sites he showed us had 816 lines of code and over 2000 lines of test code. It was like a 1:2.6 code to test ratio. Not bad.