Sunday, February 15, 2009

Tiny dancer

Cillian started dancing yesterday. The little legs pump up and down and he turns in circles. You just have to ask him to dance and off he goes. We're trying to get him to shake his arms and wiggle his bum, but he likes his own version.

Its easy to remember the major milestones like walking and talking, but its the constant litle things that he learns to do that is really amazing and fun.
Like dancing, like having a go at the hand actions to Itsy Bitsy Spider, blowing kisses ans sticking out his tongue if you ask him where his tongue is. All learned his weekend.

Monday, February 9, 2009

The old shell game

Last week I added a couple of entries to the folder options that you see when you right click on a folder in Windows on both my work and home computers.
One was for printing folder contents, another was for the command prompt.
I did this through the Control Panel->Folder Options->File Types, the selecting File Folder and hitting the Advanced button.
I am running Windows XP Professional v5.1 in both work and home.

Works a treat, except I found that afterwards on my work pc, everytime I double clicked on a folder in the right hand pane of the windows explorer I got a search box, rather than the folder opening. On my home laptop I got a command prompt box opening up.

It seems that adding these entries to the Folder Options somehow screwed up the registry for shell32.dll, which has among other things the task of keeping track how to open folders and files.

The solution was to re-register the dll. From Start->Run:
regsvr32 /i shell32.dll

That's it.

Sunday, February 8, 2009

Oh Ruby

This week I attended an excellent four day training course by SpringSource on Core Spring. I've touched on Spring before, so time time ago I decided it was time to book myself on a course and get into it in a bit more detail. The timing was fortuitous since I have been seconded to another team that makes extensive use of use of this interesting technology.
While in North Sydney I took the opportunity to visit an excellent technical bookshop called Bookware. Its cheaper to buy from them any of the city bookstores, cheaper even than getting the books through Amazon and paying their shipping costs.
Its on Arthur St and camouflaged by building site hordings, but it was worth the effort in finding it. Small and overflowing with Business, Marketing but chiefly computing books.
Anyway, I bought a book on Spring Web Flow, but couldn't resist picking up a Pragmatic Programmers book on Ruby, called Agile Web Development with Rails. Cool, been meaning to look at this for ages (in between work, running, guitar, balloons and a baby).

I get the book home and start reading only to discover that there is a new version of Rails out and the book is the the old one, but the latest edition of the book is not available yet, except in pdf format. I don't want to shell out again, so I'll stick with what I've got.

Ok so the book pretty quickly cuts to the chase and in no time I'm downloading Ruby. The book directs you to some one stop shop installer that doesn't seem to have been updated in about 2 years, so I just download Ruby and run hte install, selecting a gem checkbox along the way. Done.
Next to install rails with gem done.
Then Mysql. Ok, some problem with a port and maybe a firwall, will check it out later.
Onto the coding. A Hello World program in Ruby. Cool.

Except now the problems start.
Instead of getting the 'Template is Missing' error the book says is likely I get a message like this:

> MissingSourceFile in SayController#hello
>
> no such file to load -- sqlite3

It turns out that you need a database to run hello world. No mention of that in the tutorial.
Ok so I down load Sqlite3, both the exe and dll zips and place the location on the path.

I then install sqlite 3 using gem. But it seems that the current version of gem or sqlite3 or both has a bug and you have to install sqlite3 version 1.2.3.

I do that (stopping and starting the WEBrick server every time).

Next a Runtime Error - can't find sqlite3.dll.

Come on. Its there. Its on the path.
Its late, I can't be bothered fighting the machine, so I reboot, restart and get 'Hello from Rails!' in my browser.

That's the longest its ever taken me to get Hello World up and running.
Browsing the various forums indicates that I'm far from being the only one.

The premise of Ruby on Rails is that it is simple to build web sites. The inference is that you don't have to be an uber nerd to learn this language and framework. The Pragmatic Programmer's books are always easy to read and motivational. I know that the book is targeted at an older version of rails, but still, it didn't help. Hopefully the rest will be a bit smoother and of course, solving these problems will enhance my understanding.
Or drive me mad and cause me to abandon this little project.
Pressing on...