Friday, August 14th, 2009

SQLite3 is truly dynamically typed. To a fault:
sqlite> select count(*) from posts where external_id = 199252;
0
sqlite> select count(*) from posts where external_id = ‘199252′;
1
sqlite> select count(*) from posts where external_id = 199793;
1
sqlite> select count(*) from posts where external_id = ‘199793′;
0

One day I suppose I will find it useful to store different data types in [...]

Category: Programming  | Tags:  | Leave a Comment
Wednesday, August 05th, 2009

After last week’s got.rb meeting we went out to grab a beer and continue our geeky discussions.  I just want to make a note to myself that the wonderful beer I had (after CJ refused it) was a Gueuze Fond Tradition from Belgium.  It’s not available at Systembolaget, much like this summer’s first favourite, Gjutarns [...]

Category: Life outside work  | Tags:  | Leave a Comment
Sunday, June 14th, 2009

All hackers want to live on the edge. What we rarely reflect on is the fact that most things have more than one edge. Adaptation curves have two: one where the early adopters build up their reputation for cool and one where I found myself this afternoon.
Apparently I should have let go of [...]

Category: Server Configuration  | Tags: ,  | 3 Comments
Sunday, April 05th, 2009

Git bisect is the hero of the week! It turned out that some time between now and three weeks ago, the login functionality broke in the Rails app we’re developing. It didn’t break completely, of course, just in certain environments. And looking at the logs, I had no idea what the error [...]

Wednesday, April 01st, 2009

PeepCode publishes wonderful screencasts and pdf books on subjects that should be of interest to any Rails developer. The pdfs seem to be adapted for screen reading – they are in landscape mode, not in standard paper sizes (as far as I can tell) and they have big print. So far so good, [...]

Category: The daily grind  | Tags: , ,  | Leave a Comment
Wednesday, April 01st, 2009

FS-data was the first web hotel in Sweden to support Ruby on Rails (in August 2006, I think) and I’m glad they did. Unfortunately they haven’t touched their setup since, so patrons are still limited to (a) apps in subdirectories only and (b) FastCGI (FCGI). I have seen many complaints about FCGI, but [...]

Thursday, November 20th, 2008

I read in New York Magazine this weekend that Malcolm Gladwell (author of The Tipping Point, Blink and Outliers) has a “regular biweekly ‘boys’ night out’” and that made me wonder if he went out with his friends every other Friday or perhaps every Tuesday and Saturday.  ”Biweekly” is a word that makes me uncomfortable [...]

Category: Meta  | Tags:  | 2 Comments
Saturday, October 11th, 2008

Note to self: don’t leave your bike parked downtown (or indeed on public streets) over the night.  Apparently there is a great deal of pleasure to be had by thrashing other people’s bicycles.  And while I take pleasure from seeing my fellow man enjoying himself, I cannot really afford to sponsor it any more.
I parked [...]

Category: Life outside work  | Tags: , ,  | 2 Comments
Thursday, October 09th, 2008

Apparently something called “click-jacking” can be used to hijack the microphone and camera on my laptop and the way to avoid that is to tell Flash that it can never ever have access to mike and cam.  Fine, done.
There is a patch coming out in a few weeks (or it may just be included in [...]

Category: Developer Client  | Tags: , ,  | Leave a Comment
Monday, September 08th, 2008

I need to pick up an XML file from a server every 30 minutes and process it. I’ve done similar things before, and using Hpricot it is a pleasure:
#! /usr/bin/env ruby
require ‘rubygems’
require ‘hpricot’
require ‘open-uri’

doc = Hpricot(open(”http://example.com/the_file.xml”))
(doc / :person).each { |person| … }

Couldn’t be simpler. This time, there is a snag: the file is [...]