The day started with Matz, creater of the Ruby language, talking about his philosophy behind the language and why certain people pick it over other languages. He started by comparing his experiences of programming with Basic and Lisp. On the one extreme, Basic provided easy syntax that was easy to learn, but it did not enable extending the language when need arised. On the other extreme, Lisp provided lots of power in extending the language with macros, but produced code so obfuscated by parentheses that it caused pain. Ruby was kind of a happy medium. While its syntax reads generally like plain English, it provides incredible power with its dynamicness, allowing developers to extend the language with internal DSLs that facilitate domain-specific work such as web development (Rails) and build configuration (Rake.)
Matz made a mention of Ruby 1.9 and the work being done in it to achieve incredible improvements of performance in Ruby. One of the nice quotes I heard him say was a play on words for one of Dale Carnegie's book titles: "Stop worrying and start loving Ruby."
The first presentation I attended was a talk on a Ruby desktop library called MonkeyBars. It shares some goals with Glimmer by wanting to take advantage of Ruby's syntax to simplify desktop development done with Java's UI libraries. MonkeyBars relies on Swing though.
I presented Glimmer right after that talk, contrasting it with MonkeyBars and other Ruby desktop development frameworks, and showing exactly where Glimmer shines, which is in data-binding support and how it improves code testability and design through the Model-View-Presenter pattern (a variation on MVC.)
Later, I saw Charles Nutter and Thomas Enebo present on the latest enhancements to JRuby, and I attended a few other talks, such as "Unfactoring from Patterns: Job Security through Obscurity", "Recovering from Enterprise: how to embrace Ruby’s idioms and say goodbye to bad habits, and "Testing Heresies."
"Testing Heresies" ended up with the typical debate between TDD classicists and TDD mockists, with David Chemilsky on the one hand pushing for mocking to keep unit tests isolated and rely on acceptance tests (story runner tests in RSpec) to catch integration bugs, and other attendees on the other hand supporting the idea of writing tests against the application layer (no mocking) to facilitate free refactoring of the domain model behind the scenes and avoid tying the code design to the tests. The key thing that the presenter, Francies Hwang, hammered I thought was that regardless of which approach is right, mocking collaborators according to mockists' approach forces you to design the code early in development instead of delaying the design till a post-green-bar refactoring step. This can be considered un-agile as it may promote over-engineering.
The night was concluded with lightning talks, in which I was happy to participate by giving a quick talk on how to leverage Glimmer's DSL engine to build other DSLs such as an XML or HTML dsl in pure Ruby code.
No comments:
Post a Comment