it may not be the fight of the century but one of the things Friz’ post reminded me of was Katz blog post last year
Ruby is NOT a Callable Oriented Language (It’s Object Oriented)
Hopefully Fritz will not take this as an indictment or assertion that he is unaware of proc & block behavior under the hood. Still I know I have reached for messaging composed structures as a default with Ruby and been burnt
Those who know me from the NYC Ruby meetup, my consulting, or open source efforts know that I hold a candle for the Haskell Programming language. I learned the basics of Haskell around the time I was trying to make sense of some really bizarre javascript. Haskell gave me an epiphany experience in understanding Functional composition. It also came at exactly the right moment, at the beginnings of jquery and javascripts acceptance in software engineering as a grown up language.
Thanks Douglas Crockford.
This is why I’m going to start my blogcasting year off by taking about Object Oriented Ruby and Composition.
Nick Fitzgerald, posted a nice piece on object oriented code on new years eve 2010. Yes he was blogging about programming on NYE. Whats perhaps more telling is I tweeted and read it as it came out.
One of the reasons I was happy to see a OO post on Ruby is the rarity. In our weekly meetup we don’t cover it enough. I think this is because seasoned Rubyists assume to have a working knowledge of the Ruby’s Object structure and new Rubyists tend to be facilitated by Ruby’s meta-programming side. Ignoring OO discussion can be a huge problem. As Yahuda Katz ( the man who saved Rails ) pointed out in a few rants as he walked through the shadow of active record that Ruby’s strength is in the Object.
Ruby is a wonderfully accommodating language to code in. This helps coders get things done. It also allows the Active Record version 2.3.x codebase to exist. To the credit of AR it was and still is a nearly painless data persistance experience for both newbie and old web beard. The initial key to being approachable and friendly to the libraries consumers was a fairly heavy handed use of meta-programming. I wont go to far into it here but essentially AR attempted to work around a variety of potential issues with a fairly elegant leveraging of method_missing and a labyrinth of mix-ins.
AR gave us callbacks and gave developers power over the transaction to the chagrin of DBA’s system wide. All this seems great until it needs maintenance, refactoring or an extension via plugin/gem. It is at this point that the Ruby daredevils were separated from the faint of heart. Meta programming on this scale forces a developer to be brilliant to a level superseding function of a ORM or in many cases forces one to create create maps. We should not have to make maps of code.
I was fortunate to have done nearly all my Ruby work outside of Rails until the past couple of years, thanks to successful consulting practice, a fat Java resume and Merb I escaped what would have driven me to contribute all my family time to making Rails as elegant a codebase as it is for web developers as a web dev Domain Specific Language (DSL). Thank you Yehuda ( @wycats ) , Engine Yard et all for allowing me to take on Rails projects and participate more fully in the Ruby community.
@wycats has also been one of the few ROR devs to both despair when we fool ourselves into thinking we are clever watching him tend the gardens of ruby web frameworks saved me hours and frustration. This is not to mention the tremendous innovative contributions directly gave the community nor the indirect contributions his guidanc, solid public engineering, and passion for the craft that leaves any RoR dev indebted .
Really what I’m saying is I have a man crush on Yehuda Katz. I am going to right now thank him on twitter and follow his example by attempting to in a minor way find best practices and discuss them publicly. Sure it can be a bit intimidating to work publicly, where others are given the opportunity to ridicule. I know that I stand in the shadow of some amazing talent. One of the things that keeps me happy to be among Rubyists and part of the community is that the ridicule if it comes is good spirited and humorous and more often then not everyone is given an opportunity to participate in a discussion and learn from each other.
Shortly after my gushing thanks of @wycats I’ll be posting my screencast on Object Composition in Ruby
In a previous life before I was invested in the Ruby community, and before my life as a Java Enterprise Consultant I was a Linux and Free Software activist moonlighting as a Unix System Administrator. After seeing the same arguments on IRC channels recycled ad infinitum I may have become as jaded as Statler or Waldorf, but I still believe.
Ruby makes me giddy after a stint as the Senior Portal Developer for Conde Nast. Ruby has a culture and community that embrases self sufficiency in a way that cannot fathom a corporate sysadmin unable to install a local internal Tomcat server within a two week framework.
But yes it does have the trappings and handicaps of an isolated subculture. My experience prior to 2007 was outside of the rails word, and I have to admit to my being as disturbed as a pythonist to my rejection of whitespace rules when I first looked at rubys server and system offerrings. Things are way better on that front but we do seem to have a blind spot to the legal side of software.
Generally I do care about licensing. There Linux and GNU tools that were added to the GNU toolset in 1988 and having reliable mature native C or lisp code is a godsend. This is a sharp contrast to the web application market. Even the government and banking applications I have done in Java have around a 5 year lifecycle.
Ruby’s embrace of Rapid application development methodologies, never mind its core tool and framework incredibly short cycles make a decision to completely refactor a Ruby Application
Not to worry I’ll not reject bathing and shaving completely, but I’ll pay my FSF and EFF dues. I’ll make more effort to use the freeist code within a lean pragmatic workcycle.
Unfortunately there are plenty of times that there is more money then time
So I’m annoyed that the community still fails to produce products that are GPLd that have anything but a suggested market value. So because of that one of my new years resolutions is to produce at least one non-gratis free product.

Last weekend I participated in another hackfest this time centered on the venn diagram intersection of Food and Technology. There were some great people there with great ideas that would improve the health and lifestyles of new yorkers. But I just wanted one thing that no food site has been able to deliver to me yet. Decent search results for restaurant food.. not restaurants but the actual menu items. So I sat down with some members of the new york ruby meetup and others interested in just getting this one feature and we cranked out a really simple app that gave the results in a wall of text results.
This week a few of us spent a couple of hours on making it cleaner and its starting to shape up. Perhaps tonight you will be able to use the alpha.