first.rb

The first Ruby I ever wrote was in December 2005. It was akismet.rb, a small class for interacting with the Akismet service. My post to the spam-stopper mailing list can be found here. I personally never did anything with the class and I didn’t touch Ruby again for another 3 years until I started working at Agora Games. However, if you google for akismet.rb, you’ll see it took on a life of its own by providing a seed for other Ruby libraries and Rails plugins.

One of those libraries is rakismet, written by Josh French, which provides Akismet integration for Rails. By whatever happenstance, I started following Josh on Twitter at some point. We also met up at RailsConf 2011. However, it wasn’t until today that I found rakismet and caught up with the first Ruby I had ever written, in a much different form then when it was originally written nearly 6 years ago. I can’t take any credit for its current form and function.

Open source is interesting. You write a bit of code, release it and it takes on a life of its own. “Life moves pretty fast. If you don’t stop and look around once in a while, you could miss it.”

UPDATE: 2011-09-02

I found what I believe to be the original Akismet.rb. Here’s the gist.

Let us count the ways of the n00b:

  • Using require statements INSIDE the class
  • Naming the file capital A kismet.rb
  • Declaring instance variables
  • Using the return keyword
  • () for methods without parameters
  • hasVerifiedKey for a boolean return
  • protected :callAkismet

:)

Tags: ruby akismet