Archive for December, 2005

Book review: “Practical Subversion”

Book CoverPractical Subversion, by Garrett Rooney, Apress

I picked up this book because, after having worked for a long time with CVS as my only source control system, I moved to Subversion and needed to acquire a deeper knowledge of it (Incidentally, you would be crazy to still use CVS now that Subversion is stable and freely available). And deep does this volume go indeed. It’s written largely from the perspective of a repository administrator or a power user wanting to extend the system and develop new applications on top of it, as the long (73 pages) chapter on Subversion APIs demonstrates.

But even if you are a developer wanting to know more about Subversion because your company or favorite Open Source project just standardized on it, you’re bound to find a good deal of useful information in it. Just don’t think to be able to understand everything is you’re totally inexperienced when it comes to source control systems. In this case, I’d suggest “Pragmatic Version Control Using Subversion” as a more accessible alternative.

The introductory chapter (A Crash Course in Subversion) and the Best Practices chapter are very good even for beginners, anyway.

The writing style is clean and linear. Typography is good, apart from the horrible font used for the headings and the table of contents.

In conclusion, I don’t think you can find anything better, either online or in print, if you really want to make the most out of Subversion, so I give it five stars. The fact that it is not an introductory text should not detract from this judgment but, as always, caveat emptor.

Cocoon 3.0

Sylvain Wallez: “Now should we still call it Cocoon? More than 3 years after Cocoon brought continuations-driven web applications to the world, many people still consider it as a ‘rendering engine’. A different name would allow to clearly show once for all that it is much more than that. Any ideas?”

How about Butterfly? ;)

Ruby on Rails: First contact

rails_logo_remix.gifToday I finally decided to dive a little into Ruby on Rails. I have a cool, small and fun application in mind and wanted to see whether it’s true that Rails is so much more productive that I could develop it in my very little free time.

Being on OS X Tiger, first of all I had to fix Ruby following these instructions. Then, to make things easier, I decided to download and install Locomotive. I started Rails, generated a simple controller and wrote my first “Hello world” webapp. So far, so good.

My first attempt to generate a scaffold didn’t go too well. Looks like there’s a bug in Rails 0.14.1, the version included in Locomotive. I applied this patch and everything was fine again.

From here, the plot started to thicken. The table for which I wanted to generate a scaffold had a few fields named xx_count and these columns were not mapped by ActiveRecord. By sheer luck, and after some head scratching, I guessed that it didn’t like the column names. I changed them to xx_cnt and it worked! Go figure.

I am also accustomed to putting an integer field named id in my tables and to use it as a primary key. Fortunately, this is exactly the type of pattern that Rails is most happy with. The only problem is that, being a hater of MySQL, I configured Rails to connnect to my PostgreSQL 8 server from the start (Locomotive supports MySQL, PostgreSQL and SQLite out of the box). Since Rails wants the id field to be auto-incremented by the database and PostgreSQL does not support the serial column type, I got some cryptic errors upon trying to save a new record. The messages could have been much more explicit, but I could have figured it out earlier, had not my clarity of vision been obfuscated by a long work day.

Anyway, Google to the rescue, I worked around this problem following the suggestion outlined here, and I was finally able to get a basic CRUD application working. Next time, I’ll try to start implementing some more realistic use case. To be honest, I haven’t yet figured out the details of how my app is supposed to work and look like. I think I’ll just code away and see what comes out of it, testing various solutions along the way and seeing what sticks. I hope that, with Rails’ purported high productivity, I won’t regret too much ending in a cul-de-sac and having to start over again. I’m mostly doing this for fun and for learning, so errors are a good, actually.

Project Pterosaur

fathersonpterosaur.pngForget about the Georgia Aquarium. Soon it will be all but dwarfed by the Pterosaur Rookery:

The goal of Project Pterosaur is to mount an expedition to locate and bring back to the United States living specimens of pterosaurs or their fertile eggs, which will be displayed in a Pterosaur Rookery that will be the center piece of the planned Fellowship Creation Science Museum and Research Institute (FCSMRI). Furthermore, the rookery facility will establish a breeding colony of pterosaurs in order to produce specimens that could then be put on display by other regional institutions or church groups.

The amount of stupidity those fundies are able to master is mindboggling. Sometimes I wonder whether they really believe it or it’s just tongue-in-cheek. As long as there are people capable of expressing thoughts like the following quotation, I lean towards the former hypothesis:

One of the most basic laws in the universe is the Second Law of Thermodynamics. This states that as time goes by, entropy in an environment will increase. Evolution argues differently against a law that is accepted EVERYWHERE BY EVERYONE. Evolution says that we started out simple, and over time became more complex. That just isn’t possible: UNLESS there is a giant outside source of energy supplying the Earth with huge amounts of energy. If there were such a source, scientists would certainly know about it.

(Via Mr. Danieru.)