Saturday, May 19, 2007

Ruby vs Python

I'm new to web programming.

Sure, I built my first web page more than ten years ago, but I haven't really progressed much from there. I have used many different languages: Python, C, C++, various flavors of Basic, Java, Fortran, whatever, but (almost) always for desktop or multiprocessor work. But this is a new beast for me. I'm essentially a C++ programmer, specializing in numerical processing, graphics, and physics modeling.

It took a while to learn enough to make some kind of decision on which languages and frameworks to use, and I'm quite certain that there were several different viable choices.

The first big choice was Ruby or Python. I didn't really consider Java because speed for the code isn't really much of an issue with this kind of application, but speed of development is. I'd done a little code in Python at various times, and I've liked it, especially as my basis of comparison was more or less C++. I have an interest in using Python or Ruby as a scripting language for C/C++ applications. I think I'm sold on Python for doing most scientific numerics because of SciPy and pyGlobus.

Still, I sat down with the Pickaxe, the canonical beginning Ruby book by Dave Thomas with Chris Fowler and Andy Hunt. You can get the entire first edition online for free. I really liked the design and philosophy of Ruby. One can argue about this kind of thing, but it seemed to me that Ruby was more beautiful, more powerful, and more object-oriented than Python. Of course, Ruby is still kind of a new language, and it doesn't have anywhere near the amount of supporting libraries that Python has.

You know how this story turns out. I started looking into Ruby on Rails. The hype is incredible and not to be believed, I'm sure. I liked a lot of the methodology, especially the emphasis on agile development, which is part of what had drawn me to scripting before. It gave me an excuse to go with my bias toward Ruby, as well as being a potentially marketable skill. Not being a web programmer, I wasn't sure where to start with this, but then Dave Thomas (et al.) appeared with a new book, Agile Development with Rails, that looked like something I might be able to handle.

So here I go. I've built one practice Rails app, but this'll be my first real project in it. I know next to nothing. This will be a good test of how easy (and fun) Ruby on Rails can make web programming. I'll let you know here how it turns out.

No comments: