Category Ruby

An Introduction to Procs, by Peter Cooper

I have just watched the 27-min introduction on Procs by Peter Cooper, which is really a short section of his RubyReloaded course.   Here are my notes: blocs are essentially nameless functions the block_given? method can be used to find out if a block was passed to the current scope blocks are anonymous functions which […]

Ruby Object Model and Metaprogramming Screencasts by Dave Thomas

I bought 6 screencast episodes of Ruby metaprogramming about 3 years ago and only recently have I watched them all. And I must say: it was quite worth it! Just a reminder that it’s never too late 🙂 See below for my notes (which have been approved by Dave Thomas himself). Episode 1 – Objects […]

Ruby 1.9 Walkthrough by Peter Cooper

I have been away from hacking some Ruby for about a year by now, and I wanted to get up to speed with Ruby 1.9.3, so I bought Peter Cooper’s Ruby 1.9 Walkthrough. No doubt: my $24 was excellent value for my money. That’s a 3-hour session where he talks about what’s new in Ruby 1.9.2 […]

Unobstrusive metaprogramming, by Sean O’Halpin

I watched Sean O’Halpin 30-minute Ruby Manor presentation (Nov 2008) called “Unobstrusive metaprogramming”. He gave a few tricks about monkeypatching. Here are my highlights. Problems with monkey patching “the Rails way” namespace pollution documentation pollution cognitive pollution Case in point: >> [Kernel, Object, Class, Module].inject({}){|hash, klass| hash[klass] = klass.methods.size; hash} => {Object=>98, Kernel=>159, Module=>99, Class=>99} >> […]

Hashtweeps Scraper: Mixed Feelings About Scrubyt

Motivation Hashtweeps is a simple site where you can search all tweets with a specific hash term. I have decided to give Scrubyt a go and write a little Hashtweeps scraper to get a feel of it. The CEO of the company where I am at was at the leadscon conference, so I was challenged […]

Ruby VM’s, by Jason Seifer

I watched Jason Seifer’s QCon 30-min presentation on Ruby VM’s. He describes the main characteristics of most Ruby VM’s out there. A little note: his criterium to decide whether a VM is production-ready or not is based on its support (or lack of support) for Rails, since that’s a Ruby framework which touches on a […]

What Makes Code Beautiful?, by Marcel Molina, Jr.

I watched What Makes Code Beautiful?, a presentation Marcel Molina Jr. gave at RubyConf ’07. Here are my highlights. A definition of beauty From all the definitions of beauty he explored, he chose the one from Thomas Aquinas, where beauty is defined with 3 criteria: proportion (economy of size: smallest size needed to do the […]