Archive for October, 2005

Ruby on Rails

I was ill earlier this week, so out of boredom I thought I’d have a look at Ruby on Rails. Very impressed…

I guess I hadn’t realised, but Ruby is the language, and Rails is the web development framework for it. And boy does it work well. More on that later.

Installation was a bit of a bugger, and I couldn’t get the default installation (which I got here to talk to mySQL at first. The tutorial I was following was Rolling with Ruby on Rails, but I found I had to install the Ruby/MySQL API instead of whatever was installed by default. After that, the tutorial all worked fine.

It’s a good tutorial, so I won’t go through all that - instead I’ll write my impressions.

Okay, so Rails makes you use MVC (Model View Controller) as a design paradigm, but that’s no bad thing - I am a BIG fan of MVC. The Model part is really neat - Rails uses reflectance to define itself; that is, it looks at the database and defines the model based on the definitions it finds within. Clever, and simple.

The view - well, it does what it says. It’s quite nice - you can have templates, the views can have loops or call ‘helpers’. Works well. Plenty of functions for generation of links - and I love the automatic pagination. One line to do pagination - fantastic.

What impressed me the most was the main point of Rails, I guess - you have to do very little to get something that works up and running (which you can then develop upon), and it takes very little code. I mean, during that demo, you get a website that lists recipies, with all the create/delete/update/select actions in a total of 11 line of code, in which you wrote 1.

That’s a lot of bang per buck. I could be tempted off PHP by that.

So, the short of it - not played with Ruby itself so much, but it seems a fairly nice language. Typical one, you know. But Rails - very impressed, I can think of projects that would benefit from this. I expect it will become more popular (much more) though perhaps not amongst some of the PHP crowd, as MVC requires a certain degree of abstract though. If you’re a web developer, you probably want to take a look…

VMWare Player

VMWare is one of my favourite development tools - being able to build (and trash during development, only to restore to a stable state) virtual machines is great. Anyway, they now have VMWare Player. This will be superb for us to do demos on! And I’ll be able to install it at home, and use it for development there (I think) (or maybe, I hope).

Security Expert can’t have ever coded

So, according to ZDNet, Security expert Howard Schmidt wants coders to be held responsible for vulnerabilities in their code. This is REALLY dumb.

He gets one thing right - I’ll give him that. Most developers don’t have an adequate idea of what security entails, and training in this is, at best, extremely rare. There should be more of that, both at university and in the job - attacks evolve, after all.

But making developers responsible? When they don’t have the authority to control the product? Management choose what features are ‘in’ or ‘out’, project times scales, budget, etc.. I’d love to produce better code, but my boss will reject my ‘It’ll take twice as long and be 3 times as expensive’ - and rightly so. Read more »