Given that Dan once ran RubySource and I’d already put a face to the name at one RORO meeting a couple of weeks earlier, it was stellar to actually get to know him better over the weekend. Additionally, I felt the title of Unplugged was justified, as he was playing acoustic guitar through the weekend. He’s as friendly as he is tall, which is taller than average, so he was happy to answer some questions for us!
Tell us a some things about yourself, Dan.
I started programming using BASIC when I was six, I sort of progressed from there through basic C, Pascal, Visual Basic, until I discovered the web in about ’95 and thought “right, this is for me”. Started building static websites, learned about PHP in 1999 and then discovered Ruby about five years ago. I’ve been writing code most of my life and it appears to be something I’m good at, so I decided to make a career out of it.
More specifically, how long have you been working on Ruby/Ruby on Rails projects for?
About four to five years, I remember checking out one of the first beta releases of Rails—0.8 or something like that—thinking that it was pretty cool, then proceeding to go off and try and implement the cool parts of it in PHP. I then realized that I would probably be better off just using Rails directly. So I sat down, learned Rails, and haven’t looked back since.
You gave some insight before, but what other languages have you been deeply involved with?
PHP, I spent five years as a PHP developer, it was probably the best stuff that I had access to at the time, I got a lot done with it. Before that, HTML and CSS, I’ve been using CSS since it was first made available in IE3. I remember when Netscape 1.2 came out with background images and I was shocked at how cool it was. Around that time, I was also doing some Visual Basic when I was at school. And before that I taught myself C and BASIC, a bit of Pascal for school, so a bit of everything.
What’s your favorite thing about anything Ruby/Ruby on Rails? Something that compels you to want to develop in it.
I really just like Ruby syntax. Ruby syntax and the Duck Typing aspect of it. It’s a very descriptive language. It’s a really strange thing to be excited about, and it’s something I say a lot, but Ruby lets me express myself the way my brain thinks, I don’t have to rethink things to code Ruby. Ideas tend to go directly from my brain through the keyboard and it works. The way I think, the way I attack problems, Ruby lets me do it naturally without having to go back and having to think about syntax or artificial constructs. It really seems to get me. Considering I spent over nine hours a day working in it, I need to enjoy it. It makes it pleasurable and lot easier to write code, as opposed to a lot of other languages I’ve had to use over the years. Ruby is a wonderful thing.
One of the things I want to document for aspiring Ruby developers, are there any big realizations you came across when you were learning Ruby, that would help others learning too?
There’s a couple of things. The first one was understanding Blocks and Lambdas, and the concept of anonymous functions and the meta programming that goes into that, and the fact that with Ruby, you can call code in places that you can’t in other languages… getting exactly how that worked in Ruby was an eye opener. The concrete example of that is understanding how the `has_many` and `belongs_to` calls actually work behind the scenes. Realizing that they weren’t just magic, it was actually calling methods within the class, on the class itself, rather than the instance. Understanding that was a huge leap forward, conceptually.
As well as the Duck Typing aspect, the fact that I can send a message to anything and I don’t need to worry about what it is, I just need to worry about whether or not it will respond to that message or not. And the flexibility that that actually provides. It allows me to write some smarter code, which I like to take great advantage of in what I do.