Skip to content

Ruby KDevelop RAD demo in Tenerife

Monday, 27 March 2006  |  richard dale

I've recently been working on 'Meduxa', a Kubuntu based version of KDE for the Canary Islands schools. Last week I went to the Medusa HQ, just north of Santa Cruz in Tenerife to meet Agustin Benito the project director to work with him trying to decipher the XDG menu spec in order to customize the KDE menus. While I was there Agustin arranged for me to give a talk at Universidad de La Laguna about Ruby RAD with KDevelop/QtRuby and Rails at short notice. I thought there would be about 10 people there, but much to my surprise a whole roomful of 50 or 60 people turned up.

It isn't far from Gran Canaria to Tenerife, I just needed to take a couple of buses or 'guaguas' (pronounced as in Wah Wah pedal), and catch the ferry at Aguete in the North West of the island. I got up in the dark at 5:00 in the morning which isn't my idea of fun, and caught the first guagua down the mountain to Las Palmas. But the second bus trip was a pleasant journey along the coast - rugged and volcanic with cactuses and other weird vegetation. The ferry took about an hour, and I made a start doing some sort of presentation by hacking the ruby script I use to generate an s5 css presentations. I was going extract some text from a KPresenter presentation as I just can't get on with it. I don't think it's necessarily a problem with KPresenter, and it's probably very similar to PowerPoint, but it seems unsuitable for hackers. I just want to whack in the text as fast as possible, along with a few code samples, and I not the slightest bit interested in producing a multi-coloured graphic masterpiece like Aaron thinks we should. I found Kubuntu doesn't install KPresenter by default and so I didn't have it anyway, and had to start again.

I spent the rest of the day looking at the freedesktop org menu spec. Wow - is it complicated. But after a lot of experimenting, fishing around in directories and discussions we finally felt we had a good idea of how it hung together. All we wanted to do was to separate out educational apps for primary and secondary pupils into sub-menus. Unfortunately there aren't any existing .desktop categories to do that, which seems a shame. All kids games or whatever tend to come with a 'suitable to 5-8 year olds' or whatever on the box, and I really think it would be a good idea to include some indication of age range in a .desktop category. Gcompris or Tuxpaint are educational apps, as is a 8085 microprocessor simulator, but they don't remotely belong under the same menu.

I spent a couple of hours on the Ruby RAD demo presentation text, and then we went off to La Luguna for the talk. I've never managed to get my iBook to work with a projector before, but amazingly it actually worked with a couple of minor changes to the xorg.conf file. That was the good news - the bad news was that all the fonts in the system were being rendered at about a quarter of their normal size. I managed to work round that by setting them all to 32 or 48 point - phew! But that was the first of what I would call 'demo effect' weirdness. In the talk I would set a breakpoint in the Ruby debugger, which is normally perfectly well behaved and find KDevelop wouldn't bother to stop. Or I'd be demonstrating how a Ruby Korundum app was indisguishable from an ordinary KDE app by selecting random things from the menus, and 'Boom!' I got an unexpected visit from Dr Konqi. Oh well..

I spite of all that, I think I did get across some idea of what Ruby was about. I demoed Rails support by creating a Rails project and starting WEBrick from KDevelop, showing how you could change the code and the next time you refreshed the browser the new app logic was working straight away. A guy asked whether you would need to deploy Apache to test, and he was impressed when I said that just the script to start WEBrick was all you needed even from the command line.

At the end people asking some interesting questions like how does Ruby compare with Python, and I said they were more similar than they were different and to pick the one you liked best. Maybe you don't have to pass 'self' to methods and Ruby is a bit more dynamic. If I give a similar talk again I think it might be worth having a section on how they compare. I was asked: what did I expect to be in KDE 4? I said I thought that changing from DCOP to DBUS might be a big differenc, also Plasma would allow some interesting scripting with javascript and possibly ruby too. Then other things in Qt 4 like the improved painting api with alpha channel, floating point coords and double buffered widgets would make a big difference to KDE's look. I hadn't thought about that one in advance at all, but it does show they know about KDE and are interested in what's coming.

Back in Gran Canaria, Esteban, another guy from Foton gave a workshop about Rails and found that was it fully booked almost straight away, and he had to put a second one on for another 25 people. It went down really well, so it would be great if he could go to La Luguna too, and give it there. We might start a Ruby craze in the Islands, 'el feRoRcarril' is really rolling!

On Saturday, Agustin took me to a few places in the the North of Tenerife. I saw the spectacular Teide mountain, 3 kilometers high and covered in snow, sticking up in the middle of tropical vegetation and blue sea. We ended up in the Tacoa microbrewery/cerveceria in El Sauzal, (the only one in the Island) for a few beers, and the 'Trigo' wheat beer in particular gets five star recommendation from Senor Cerveza.

'ta luego -- Senor Dale Cerveza