The Knights Templater part II: Priory of Haml
Of course it’s no problem to upgrade from Ruby on Rails 1.2.6 to 2.0.2. Just make sure you don’t fuck up your subversion when unfreezing the old and freezing the new version. I just wanted to have that out of the way, before starting this new adventure.
My current project (not being the same as the one from my previous post about the knights templater) in which I totally wrote 123 views, of which 48 partials. Since this project was so Agile, it would have made fucking of the ugly fat girl from some party look like it had been planned and completely documented months in advance, it has become a jungle of views rendering partials rendering partials rendering partials. The HTML had come from the templaters, the functionality is all finished. All we (Arie and me) need to do now is completely reimplement all the views. Yuck! Read the rest of this entry »
Hardware upgrade MythFrontend HTPC
I’ve bought some new hardware for my MythFrontend HTPC. I wanted some more juice for playing high definition movies and using the gigabit LAN. Due to some problems with a webshop I ended up with an extra Core 2 Duo E6600 processor, so all I had to do was buy a motherboard and some memory. I bought a Asus P5E-VM HDMI with 2GB Corsair RAM.
After doing the usual cable origami, trying to fit everything in the Antec Fusion case, without totally disrupting the airflow, it all booted fine. I just love how Linux (Mythbuntu 7.10 in my case) doesn’t really seem to care what kind of hardware I have, it’ll adapt. I just needed to adjust xorg.conf a bit though to use the new chipset. It took my some time to install all the new packages needed, but it worked as a charm eventually. Read the rest of this entry »
Pluralize for GetText released
I did some research into i18n plugins for Ruby on Rails. I found Globalize not manageable enough, especially looking at substitution of values and pluralization. Click to globalize didn’t support substitution or pluralization. Many others used symbols as translation key, but that provided the same problem as Globalize.
So I turned to Gettext. Gettext uses .po- and .mo files, like a proper GNU application, which attracted me. But when it came to substitution, small parts, like link texts, were scattered through the language file. I had to come up with a little scheme.
So I wrote a simple plugin for Ruby on Rails. This plugin inspects a single string to get pluralization with substitution. The single string keeps the translation in one place.
Although I created this plugin for gettext, it can be used whenever you like. If you’re not using gettext, _("string").pluralize_for becomes "string".pluralize_for… Simple enough…
I’ve opened a google-code spot, so you can have a peak there, although I haven’t gotten round to filling out every page there.
Learn how to install gettext in this excellent guide. Use this tip to get it working with Rails 2.0. Read the rest of this entry »
Cover art
I haven’t forgotten you all, it just has been a very busy few weeks, and it will stay that way for the moment. Next month and a half I’ll be spending finishing up a nice big Ruby on Rails application, currently having over 2500 lines of code (LOC of course) and 2000 lines of test code, doing a thousand assertions. I’ll keep you posted on that one.
I am finally done re-ordering my music. Having 10,000 songs is a lot, and having to add cover art, proper release years and genres is a pain in the ass. It took me a bunch of weekends but the result is nice… (thank you MediaMonkey)
Now getting it on my iPod was an interesting challenge. My iPod should be big enough to contain it all, but WinAmp fucked it all up. Using the sync button it put more than one copy of a song on my iPod and when it had only 16KB free space, it couldn’t story the database, so all my songs were orphaned. Then it couldn’t find my iPod anymore, so I had to use up to 4 different applications. But luckily I didn’t have to install iTunes to get it fixed. Read the rest of this entry »
Plain Text Stories and Vim
Update: Updated the syntax file, redownload it if you got it before December 19th 2007.
More news about my adventures with Selenium. It’s hot and juicy, so lot’s of exciting new things to do. I made a syntax highlighter for plain text stories in vim. Here’s how it looks:

To make it look like this, I adjusted the slate colorscheme and added my own story syntax file. Click Continue Reading to download the files and read how to install it.
Read the rest of this entry »