Ruby glue

I have stepped back into ruby recently with a project to tie our portal to our network provisioning scripts. The portal is WebSphere running on RedHat, and the provisioning scripts are in VBScript, on Windows. It is the perfect opportunity to actually learn how to really program (maybe). I do some SQL magic (ok, not really magic), and send off some system calls in separate threads to check or setup Exchange accounts, web space, or home folders. The goal is to make it modular so that new services can easily be added, and to daemonize a part of it so that it does not need to be run by Windows Task Scheduler.

I have finished most of it, and it seems to do what it should. What is strange is that I am not even sure I programmed well. I do not have the experience to know if there are easier ways of doing things, or if I have written 30 lines of code that could have taken 5. I am sure I _could_ enjoy programming, but right now it takes quite a bit of effort and research to figure out how to do things (kind of like Linux for the first few months) and it is very absorbing. I have trouble leaving work at work when I am programming because all the troubleshooting is abstract and in my head. Since I can’t leave my brain at work, it keeps hammering away at the problems. I also get irritable when I am interrupted, and that is not so good at work, or home. So I am in a hurry to get this little app finished so I can return to normal life.

Over-all I have enjoyed ruby, and it is fun to create. I like the object oriented aspect of the language and find it pretty easy to understand when I read through it. I start to think in ruby sometimes when I think of attributes and methods… I mean adjectives and actions.

daniel =
if daniel.focused
     print 'Do not disturb'
     unless daniel.mood = 'bad'
          print 'Daniel is feeling kindly toward you.'
          print 'Daniel does not exactly want to talk to you.'

Published by


Hey, I run the place.

2 thoughts on “Ruby glue”

  1. return ‘Do not disturb’ if daniel.focused
    return ‘Daniel does not exactly want to talk to you.’ if daniel.mood = ‘bad’
    return ‘Daniel is feeling kindly toward you.’

    Yet another way of writing it.

    Ruby is indeed good.

  2. i like it when you put up mock ruby ‘life’ apps. I should reconsider my school plans for next semester and maybe limit it down to only one or at most two days and then maybe a pet project like “learning ruby” or “learning to do desktop servicing” would be a reality. i’ve a friend who is a major ruby fan and programer (he went to rubycon). He’s a web programer but manages some non-webt stuff. Rails being the web stuff. anyhoo. yeah, nice to read.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.