Ruby vs Python

A small illustration of differing design philosophies. Python design philosophy % python Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit >>> [Ctrl-D] % Notice how it gives you different errors depending on what you type. In other words, it understands exactly what you meant, because it uses that information to tailor the error message — but it nags you anyway.

Content upkeep

I got tags working via a plugin. Since I was messing with the site anyway, I hacked together some Ruby code to pull all the content out of the database and perform automatic keyword extraction via naïve bayesian analysis. It spat out a file of SQL commands, consisting of the subject of each posting and the first line of text (in comments), followed by the commands to add the tags. I ran through the file in vim deleting here and adding there, then executed the result.

Software and religion

As you have probably noticed, I’ve just gone through a major software migration for my web site. I was using typo. It was OK, but had a few problems. While its web site describes it as “lean”, that isn’t really the reality. It also relied on a combination of Apache, LigHTTPd and FastCGI that tended to break down without explanation. The biggest reason for change, though, was that typo’s authors’ idea of what was important functionality was diverging from mine.

Cranky thought

We don’t need a Google Summer of Code; we need a Google Summer of Documentation.

A bijou language-ette

Last night I wrote my first program in Ruby. So far I like it, a lot. I’d been intending to learn something better than Perl for a long time. Perl is very useful, and with CPAN you can get a great deal done in very little time. (Thanks, Jarkko—how’s it going?) However, it’s a really crufty and syntaxy language, and the way it supports object-oriented programming is so butt-ugly and riddled with pitfalls that I had never bothered to get to grips with it enough to write my own classes.