Blog

Converting a Rails Database From MySQL to PostgreSQL (2010-02-04)

For a number of reasons, we want to convert one of ours Rails applications so that it is backed by PostgreSQL rather than MySQL. Although Rails and ActiveRecord abstract many of the differences between the two database engines, there are still some issues to be aware of and no one-size-fits-all solution to the problem. Here are some of the challenges we encountered in making the switch.

Read more… View Comments

timemachine-fu, a Timemachine plugin for Rails (2009-11-12)

Tobis Timemachine is a very useful tool for bringing websites back to “the amateur web of 1996.”

However, there is is some overhead with the Timemachine: it requires your users to have already installed it in order to be useful, and those visitors need to be using a compatible version of Firefox. What if you want to make a 1996-era website for all your site’s visitors?

Thus, timemachine-fu, the Timemachine plugin for Rails.

Read more… View Comments

A Lightweight “Migrations” System for CouchDB (2009-11-10)

As I’ve mentioned before, I’m working on a Rails project where we’ve dropped ActiveRecord in favor of a CouchDB database.

One thing I miss from ActiveRecord, though, is the ability to do migrations. While SQL migrations in their most conventional use—to modify the schema of our database—are of course not needed in schemaless CouchDB databases, there is still sometimes a need to have a block of code which runs exactly once on every installation of our codebase. For example, we might have a key in our documents which becomes so important that we want to break its values off into new documents, or vice versa, we might have a bunch of documents which should all get combined into attributes of one master document.

Read more… View Comments

Dipping a Toe Into the Cloud, and Other Mixed Metaphors (2009-10-30)

Cloud computing is supposedly all the rage these days: the idea is that instead of running your own infrastructure, you just outsource everything.

There are some cases where this is almost self-evidently a good idea: renting a VPS is much cheaper and more reliable than sticking a server in your home and then dealing with the noise, electricity, and bandwidth that such a thing would consume. This blog, for instance, is hosted on a VPS at Panix. On the other hand, an Amazon EC2 instance at the seemingly low price of $0.10 per hour will cost $72 if you leave it on for a whole month—more expensive than many low-end dedicated physical machines.

But the cloud, we are promised, can do more for us than just save us money: it can run our services for us. Programmers no longer need know how to do anything but program the things specific to their application: everything else will be taken care of by “the cloud.”

I’ve traditionally run all my services on machines (usually VPSes) that I administer. But it would be nice to get out of the system administration business.

Read more… View Comments

An Adventure in Old Internet Memes (2009-10-27)

Presented without (much) comment.

Read more… View Comments

A Letter to the NYC Department of Transportation (2009-10-23)

I wrote a letter to the Commissioner of the NYC Department of Transportation, urging the marking of a safe route between the new bike lanes on Allen and Pike Streets and the East River Greenway. Here’s a copy.

Read more… View Comments

Turn Your Twitter Avatar Red and Black (2009-10-06)

I’ve created a new website, Twitter Revolution, which lets you shade your Twitter avatar red and black.

Why would you want to do that?

When Twitter was used as a tool to fight the Iranian regime, Twitter users around the world turned their avatars green in a show of solidarity. Now, Twitter is being used as a tool to fight repressive police practices in Pittsburgh, USA, and apparently the FBI considers this a problem.

The software is written in Ruby using the Sinatra “micro-framework”; you can browse or download the software, which is being made available under the AGPL, if you like. You could presumably use the code as a base for other small Twitter projects. Ideas (with or without patches) for improvement in the code, content, or design would be much appreciated.

So, color your avatar and enjoy!

Read more… View Comments

09-09-09 (2009-09-09)

Apologies for not noting this earlier, but if you are interested (as we seem to be) in “clock-numerological events,” then you missed one: today is 09-09-09, and some hours ago the time was 09:09:09. That’s six nines! According to the BBC, lots of people are getting married today, especially in China. Unlike the most recent clock-numerological event, today’s is entirely independent of the order in which you write the year, month, and day.

As for the lack of prior notice, all that can be said is that the editor of Roasting Vermicelli regrets the omission.

Read more… View Comments

Refunds for Late Trains (2009-08-29)

So apparently this blog is going to feature two consecutive posts about trains. I took Amtrak twice this week. In one direction, the train was delayed an hour; in the other, it was delayed forty minutes. This would not be considered remarkable in most of Amtrak’s territory, but usually things are better than this along the “Northeast Corridor” between Boston, New York, and Washington DC. Of course, when this happens on Amtrak, you get a half-hearted apology from the train crew but nothing more.

But I became curious: in countries with first-rate train systems, how are you compensated when the train operator makes you late?

Read more… View Comments

Trains to Nador, Beni Ensar, and Melilla (2009-08-09)

Okay, probably not too many people are interested, but information on this topic seems to be extremely hard to come by — I did web searches in English, Spanish, and French, all to no avail.

The Moroccan railway operator ONCF has, apparently for about a month, been operating a new rail line north from Taourirt to Nador and Beni Ensar (which is also spelled Beni Nsar, Beni-Enzar, Beni Ansar, بني نصار, and probably a dozen other ways). There are also some intermediate stops, but these are probably unlikely to be of interest to tourists.

Read more… View Comments

Showing entries 1–10 of 23.
Next page »