Tuesday, September 22, 2009

Scripts to Ruby

I converted the bash scripts to Ruby this morning. They do some simple text processing, converting text into an XML file for OOXML.

The conversion went quite quickly, and the Ruby programs seem more readable than the scripts. Maybe that's a personal bias; I'm more comfortable with Ruby and Algol-syntax languages (C, C++, Java, C#) than I am with bash scripts.

Or maybe its not just a personal bias. I find that Ruby programs are more consistent. Bash scripts are collections of different things. Ruby scripts are collections of things, too, but they are all Ruby things. The things in bash are files and programs, and the programs have some degree of variation.


No comments:

Post a Comment