Monday, May 16, 2011

HidoiBot is an IRC bot created through the fusion of Ruby, fatigue and frustrations over the course of a week or two. As the name implies, the code is truly awful. After coding the first version and then coming to the abrupt realisation that it is a putrid mess, I then did a complete rewrite of it. HidoiBot is meant mainly for personal use, but the code is available to anyone with an Internet connection.

If I were to say I had learnt nothing coding HidoiBot, she would have me strangulated, with all the bad code fashioned into an ethereal noose, by the crack of dawn. I'll record a few thoughts on the creation process, just so that it can quickly be ignored by the masses on the Internet.

1. Ruby
Ruby actually made programming fun -- the only real programming language I had any experience with prior to this was C. A very adequate standard library, the ease at which that was extended with rubygems, along with flowing syntax made it an absolute joy to code with.

2. SSL and IRC
Both IRC and basic SSL support were surprisingly easy to implement using the included libraries, and they required only a few lines of code to do so. In my mind IRC was a mythical beast with a large tentacle count and SSL the dark, ominous matter seen rising from IRC's core.

3. Nokogiri, JSON, Git, XML and XPath
These are all wonderful things. Their creators will surely be made electronic saints in the afterlife of computing.

4. Linux/GNU
Coming in as a predominantly Windows user, Linux is both an annoyance and a convenience. Samba sharing and permissions were painful to set up, but managing packages is nigh-effortless with apt-get. Now I always type 'ls' in Windows, and return extremely confused at the resulting error message I receive.

There are more topics in my mind, but I do not feel that they are of any importance. Who would want to even hear my thoughts on Python 3.0 versus Ruby?

Of course, there are better IRC bots out there (here's looking at you, rbot), but I am somewhat proud of this turd I've managed to code. You can check out the horror I've created on GitHub.

Labels: , ,