Going Ruby


[Update: I'm using Python now, so ignore everything I said below... it was me trying to convince myself that I needed to move to Ruby. And I didn't.]

I've finally decided to embrace Ruby as my general scripting language. As I don't learn programming languages easily, this is a big decision for me that I've been mulling for months and months. Let me explain - I use PHP on the server, and I like it, but more and more I've been doing scripts for daemons or things on the command line or desktop and been wishing for a language that was more general and consistent than PHP, and more easily made into reusable modules. The choices in my mind were Python and Ruby, and I finally got enough reasons that leaned towards Ruby to commit to it.

MattC is not going to be happy with me, as he's a Pythonista and a pal and has been encouraging me to give Python a go. But I've been looking at Python for years, but I've never been able to really get into it. There's just so much about it that I just generally don't either grok, or get annoyed with. What makes me consider it even still is the fact that Python has been around for years and so there's lots of interesting code out there, and it comes pre-installed on Ubuntu (my OS) and my N800 already, so there's a base of users and interest That's well established. Also there's a ton of momentum towards using it on the server with Django and web.py, and mod_wsgi is turning out to be a great solution as well.

But I just don't like it, it's as simple as that. Python just doesn't work like my brain does, I guess... What's the use of being *able* to write a plugin for some Gnome app in Python, for example, but never *actually* doing it because I never get far enough in Python to make anything work? Not much. But you know what the nail in the coffin is for me? Because it relies on white space, there's no way to embed Python into HTML reasonably, without having to resort to template code or pseudo-Python hacks. Most of what I do is mess with HTML in one form or another, so this to me is a real limitation.

Ruby on the other hand, is new and clean and shiny and for a while I resisted it angrily for exactly those reasons, thinking it was a fad. But it seems the momentum in the dev community isn't dissipating anytime soon and in fact, more and more of the programmers I know, or who's blogs I read, are continuing to rave about Ruby and using it to do cool and interesting things. The documentation online has finally gone beyond just links to books Amazon.com, and the web stuff has finally expanded beyond Rails (which I'm still not a fan of). The new VM seems to be solving the speed issues, and JRuby is getting more attention than ever by the Java heads as well. There's even a decent Ruby version for my N800 now! And hey, even though having a million "end" statements all over the place annoying, at least you can embed the code in HTML, and that's great.

In general, everything I've read by programmers who *can* switch between languages easily is that Ruby and Python are both equally as capable, productive and fun, so it's not that big of a deal, really. I'm just glad to have finally pulled the trigger on this one, so you can look for more code snippets in Ruby from me in the future.



Update: Ignore everything I said here... I moved to Python instead.]

< Previous         Next >