galimatias — The URL Parser For Java

Today, I have released the 0.1.0 version of galimatias — The URL Parser For Java. Now that I left the 0.0.x world behind, it's a good time for a post.

Parsing a URL is supposed to be an easy task. It's supposed to be working out of the box by the standard libraries of most programming languages. But the fact is that it isn't something widely supported.

Swapping languages in a Gettext PO file

TL;DR: Here you have a script for swapping the source and target language of a Gettext PO file. Grab it.

For the first time, I'm working on a project that requires full internationalization (i.e. Chívalo!). So far, I have learned 3 things: 1) Internationalization is much harder than I've ever thought, 2) most tools suck, 3) most Java developers seem to live in a bubble where Gettext never happened. Those will be interesting topics for other posts, but today I'll just explain how to solve a simple problem: swapping source and target languages of a Gettext PO file.

Unlocking data: Power generation statistics in Spain

TL;DR: Spanish Government has a web service to query power generation statistics. But it is locked behind some obscurity and lack of docs. I have put together some scripts to fetch all raw data. Fork it on GitHub or download a CSV with all historic data.

For some time, I have been increasingly interested in electricity demand statistics. Some witty folks are using, a Flash visualizer for power generation and demand in Spain, to measure interesting stuff such as the impact of turn-off-the-lights protests or solidarity acts (1) or the success of a general strike (1, 2, 3). These uses are really exciting and I think we can get much more out of this kind of data. So I decided to provide easy access to it.