Articles tagged 'ruby'

Does Ruby Have a Metaobject Protocol?

There’s a semi-famous book, The Art of the Metaobject Protocol by Kiczales, des Rivieres and Bobrow. Alan Kay, the guy who invented SmallTalk and the phrase “Object Oriented”, called it the best book in ten years.

But it’s takes some describing.

What is a Metaobject Protocol?

You know how Ruby has a class called “Class”? And how all classes are instances of it? And how Class is a subclass of Module?

The Metaobject protocol asks, “what if there were more subclasses of Class? And you could make classes from them, instead of plain old Class?”

Also, it includes what we’d now call introspection functions – they didn’t usually call it that twenty years ago when this was published.

But what, specifically, does that mean?

Why Ruby Should Stay a Laughing Stock

Five minutes on the Internet will find you somebody who thinks Ruby shouldn’t exist and is clearly inferior (try it!). Or pick a big tech company, especially an “Enterprise” company. Same thing – you’ll find a Ruby-hater in five minutes if you’re actually trying.

If Rubyists keep doing the right thing, this will be true forever. Let me explain.

What Ruby Rocks At

There’s a set of things Ruby is really good at. I’ll list some of them:

  • Prototyping new ideas
  • Anything web or HTTP
  • Stuff that doesn’t need to be fast
  • Reading other people’s code - Ruby is short and readable.
  • Building tools and libraries, especially DSLs.

There are some other things Ruby is “good” at. Like, it’s good at them but many people think they’re a bad idea. I’ll list some of those, too:

Rejected by GoGaRuCo: Mocking Time.now for Faster Tests!

I proposed a talk for the Golden Gate Ruby Conference, and got turned down. Usually that’s it, but the excellent and classy Josh Susser offered to say why he’d turned people down (woot!). He said:

I think we had a good idea of what your talk would be about. But this year we are a bit tired of testing...

Subscribe to get free ebook chapters and an emailed coding class now, plus videos and articles a few times a month.

Why this specific newsletter? You want to be an expert. Expertise comes from learning the fundamentals, deeply. And that comes from the best kind of practice. I write with that in mind. I won't waste your time.

(Yes, I also sell things. They're good, but I'm fine if you don't buy them.)