Breyten Ernsting

How to get more free space on your HTC Desire phone

The HTC Desire is a great phone, but it has one glaring shortcoming: the internal phone storage is only 150MB. This means that your phone will start complaining about insufficient space very quickly. It was bugging me for a really long time, but only actually worked on it now. Basically there are two things you need to do.

The easiest way to get more free space is to uninstall the Flash updates. Let’s face it: you don’t need Flash on your mobile anyway and at 12MB it’s ridiculously large. If you’re like me, do the same with the Facebook app. This saves you another 6MB.

This gets you actually pretty far, but I wanted more. After some searching I found that there is a way to make your apps install on the SD card by default. The nice thing is that it’ll even install apps on the SD card which you can’t move otherwise.

When life imitates your Twitter Bio

About 1.5 years ago it was time to renew my mobile plan, and as a result I got a shiny new HTC Desire, instead of the iPhone 3g I was using in the two years before that. The result was that my iPhone was basically doing nothing. I jokingly said that it was now my alarm clock, which led to the line on my Twitter bio: “I’m so hip, I use my iPhone only as an alarm clock”.

Of course I sometimes used it for other things as well. However, a couple of months ago the home button broke down, which is quite a pain in the ass as the iPhone pretty much has only one button with which you can do anything useful (read: go to the home screen). As I can no longer go to the home screen and switch apps easily (Doing so would require a restart of the iPhone)), I must admit that my Twitter bio is now finally correct.

My Year in Cities, 2011

Like I did in 2008 and 2009:

  • Amsterdam* (I live here)
  • Eindhoven
  • Riga, Latvia*
  • Trakai, Lithuania
  • Manchester, England
  • Warsaw, Poland

Using separate tables in Rails with model inheritance

Suppose there is a situation where you have two separate tables with the exact same structure, and you want to use separate models in Rails. Obviously, you want shared functionality from the models (order, scopes etc.), so the most logical way to go about it seems to be:

class Vehicle < ActiveRecord::Base
end

class Car < Vehicle
end
The problem however, is that is triggers Single Table Inheritance, even when you don’t have a type column in your table. So, in the example above Rails will always use the vehicles table. Luckily, there is a way to override Rails’s method of inferring the table name from the class name. It works like this:
class Vehicle < ActiveRecord::Base
end

class Car < Vehicle
  set_table_name 'cars'
end
Now your models will behave as expected.

I salute the women who said, “Hey, wait a minute. Maybe having a vagina doesn’t determine what I have to want from life! Just because a lot of women want something, doesn’t mean that I have to want the exact same thing!

The idea is to write simple, yet machine parseable documentation such that you can automatically create a living styleguide

De shell toren: 

Taken with picplz.
De shell toren:

Taken with picplz.