Saturday, June 09, 2007

Ruby...where have you been all my life?

Ruby is beauty,
Without Ruby what to do,
Programming is dead.
-ab
OK, so that may be a Haiku if I counted correctly?

Anyway... About a year ago I was in a Barnes and Noble and saw an issue of Linux Journal which had a cover story about Ruby. I hadn't read Linux Journal for quite a while and thought that this looked like a good issue to pickup. And that was my initial exposure to the what Ruby was doing, including Ruby on Rails. I then started to read through Why's (Poignant) Guide to Ruby, a really cool mixture of programming and comic art. Next came the purchase of the Pragmatic Programmers: Agile Web Development with Rails. The problem for me was that I didn't know Ruby well enough so some of the examples were not sinking in. So the next logical step was to get the much acclaimed Pick Axe book (Pragmatic Programmers: Programming Ruby). What a great book; every time I have a question about something in Ruby I am pleasantly surprised to see that it is well covered in the Pick Axe.

I have been struggling to find a place at work that I could use Ruby. Since I am not an applications development person I have been reserved to thinking about Ruby as the general purpose toolbox to assist with simple systems and network administration tasks. Tasks that I would typically use a shell scripting language for (i.e. Bash or the Korn Shell - We use HPUX so ksh is very popular) or even to replace Perl. First off, my programming background is mostly in the non-object oriented areas using languages such as C and early PHP. So if I am responsible for developing an application at my work it will typically be written in C (we have nobody else who can program in C that I know of, or they won't admit it). Often these projects are geared toward enhancements of existing 3rd party applications or to provide legacy system integration to more modern systems (I'll post more general info on these projects later...). Therefore nothing satisfying has ever come about so the idea of using Ruby was shelved...

And then it happened... As a retail merchant we have a custom application that is used by our POS systems to authorize customer credit cards using the ISO8583 protocol with various processors, including American Express. The time had come to make some significant changes to the AMEX authorization backend process that all of our business systems utilized and my initial thought was to cvs checkout the C code and start hacking away. But then it hit me, could I use Ruby to do this? I had never considered Ruby for this kind of heavily used extremely critical application, could it scale, could it do the bit pushing that I needed (I'm sure that it can but could I mold it the right way)? So I have decided to give it a shot. Another benefit to trying Ruby is that our .Net development team could probably pickup the code and understand it a lot better than the old C code, so maintainability should be improved through the use of a modern OO language (especially with the future of IronRuby and Ruby.Net).

I plan to post on my experiences with developing a Ruby ISO8583 processing application over the next couple of weeks, so check back in often...

-ab

No comments: