Notes from NH Ruby/Rails group, 15-Feb-2010, Brian Turnbull and Object Oriented Programming

Despite being President’s Day, February 15th’s meeting of the NH Ruby group got 14 attendees. Held as usual at RMC Research in Portsmouth and hosted by Tim, a good time was had by all.

There was a round of introductions so everyone got to know each other. Announcements including Leslie Poston’s NHTweetup calendar, and the Rails Camp NE. Rails Camp is only a month away and down to a few last seats – don’t miss it!

Brian presented “Object Oriented Programming” — you can find the slides here. The presentation was a good high-level overview of OOP, as seen from the Ruby perspective. Brian noted ways in which Ruby differed from C++ and Java. There was some very good discussion and some teasers of future presentations: Mixins were thought too complex to try to squeeze into this presentation, and Brian is developing another talk, “The Complete Class,” which will include a discussion of all of the methods, properties and attributes a class should have to encapsulate best practices. I’m looking forward to both of those discussions.

Brian finished with two puzzles. Having covered the principles of OOP, Brian handed us an interesting problem to code: a 3×3 sliding tile puzzle. It’s great to see actual code being developed at the meetings, and it was a good challenge in that we all understood the problem domain. We broke into small groups and started modeling the problem. At the end of the evening Brian presented his model and code.

The bonus  challenge involved taking Brian’s model and solving a particular puzzle in the fewest steps possible. I worked with a team that took this one on, repeating the classic steps of invoking recursion, discovering the limits of Ruby on the Mac for stack overflows 😉 and failing to properly store and retrieve states and scopes diving in and out of the recursion. While we didn’t finish the solution, we had some great discussions on the various ways to solve the problem and all learned more about working with Ruby, which after all is the point. Brian also posted his solution to finding the shortest steps to solving this problem.

Thanks to Tim and RMC Research for hosting us in their fine facilities, to Brian for organizing, pizza and the presentation, and to all for attending and participating!

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.