Happenings in Ruby
Ahhhh, the Dog Days of a Ruby Summer are upon us. This time of year it is so hot that I only venture out to obtain boxes off my porch containing new nerd books, nerd accessories, or delivery nerd food. I don’t know about you, but my fervent desire to cool down is leaking into my code. Here is one example below of a class I recently wrote for my project that was meant to represent a Soccer team:
The tests aren’t running, though, because I perspired all over the keyboard. Maybe I’ve given too much information at this point…
Anyway, you know what else is HOT? The Ruby Community! There’s been all kinds of stuff going down (not the temperature though! LOL) and I’ve picked a few heaters to warm you up below.
(EDITOR’S NOTE: Please work with Glenn on his metaphors. They need to be better chosen and less beaten like a dead horse. Also, his code is !good.)
Noah Gibbs has started a book about building your own Rails from scratch. The aim of this book is to pull back the curtain on Rails as you build it yourself. Noah also has some free posts (like this one) so you can get a taste of his writing style. Rebuilding Rails is now at seven chapters and going strong. It’s not free, but you can get it for $30 for a limited time. At full release, it will be $49.99. Check it.
Richard Schneeman has taught Rails and Ruby courses at the University of Texas, and has compiled some of his talks into a series of videos (all < 10 minutes or so) about ActiveRecord. There are also other videos on the blog, along with follow-up quizzes and solutions to boot. If you need to learn or brush up on Rails, you might find this useful.
David Bryant Copeland has written a great post on Functional Programming with Ruby. Basically, David restricts himself to lambdas and arrays, setting out to create a Person with basic functions (insert, update, destroy). It’s a great read that shines a light on functional programming.
Matt Wynne has a series of posts on Hexagonal Rails, which is another approach to decoupling the various Ms, Vs, and Cs of Rails. Hexagonal Rails uses a “ports and adapters” approach to keep your core domain logic free of all the things that interact with that domain. The series is only two posts old, and pretty theoretical right now, but I have enjoyed it so far.
Rodrigo Flore’s writes a post on the Method with Options pattern for creating methods in Ruby. This approach is used by a bunch of well-known Ruby libraries, and it’s good to know how to harness its power yourself. If you aren’t using this pattern now, I am betting there are cases where you should apply it.
Well, those links probably didn’t do much to cool you down, but you can read them all while sitting in an air-conditioned room. While you are avoiding the heat, let me know if you find any awesome Ruby links that the Rubysource community should see. Until next time….