Identity Theft

Today we hear the BBC has discovered that Facebook apps allow your “personal details” to be “stolen”!!!!11 In reality, it’s always been obvious that Facebook apps can see your whole profile, and anyone can write a Facebook app. Yes, two plus two really does make four.

The real problem is not identity theft, but corporate laziness. I am not my birthday. I am not my address. I am not even my name, or bank account number. I am me.

Read the rest of this entry »

Comments

Mapnik on Debian Etch.

Late last year I went to the Ordnance Survey to see a demonstration of their new OpenSpace mapping service. It was there that I met Artem Pavlenko, who wrote Mapnik. We talked briefly about a few things, one of which was the Boost C++ libraries. I suggested that using such libraries makes software harder to build and install… “Oh no,” he said, “Boost’s all in the header files, so there are no library dependency problems.”

Well that turned out to be a big fat lie.

Read the rest of this entry »

Comments

Person Under a Train

I went into Town today to register as an election observer for the Open Rights Group. On the way home, my tube train shuddered to an early halt in Oxford Circus station. Some poor person had fallen (or jumped?) under the train.

Read the rest of this entry »

Comments

libhex v0.2.0

I’ve just uploaded a new version of libhex, my library for manipulating and drawing hexagonal grids. It’s available in C++, Python and JavaScript.

[docs, source, examples: C++, Python, SVG]

I’ve redesigned the SVG output interface. The crazy templates are gone. It’s now just a set of simple functions. SVG output is no longer flipped either, so it’s easier to add text.

I’ve also added routing algorithms: find best path, find movement horizon given a movement budget. Using the library for a game, you need to know where a piece can move. The hex::move namespace defines a “Topography” class which enables you to model movement costs within the grid. Then it will calculate the best path from one hex to another, or tell you how far a piece can get with a given movement budget.

As always, please, please try out libhex. Let me know how you get on.

Comments

A hex map of England!

I’ve been using (and testing) my new hex-map library. Here’s a map of England.

Hex Map

It was generated by a little program that uses NASA’s SRTM data as input. The light brown hills are just high ground, but the dark brown hexes are both high and hilly - my program samples the elevation, and calls a hex hilly when the elevation’s standard deviation rises above a set limit. The rivers are drawn by selecting sample locations and then finding an optimal route to the sea. The routing is done with something like Dijkstra’s algorithm - it mostly wants to go downhill, but will jump over small rises if necessary to get to the sea.

The rivers look plausible, but there are quite a few problems, if you look closely. For example the Welsh headwaters of the Severn flow North into the Mersey on this map, but in real life they turn South.

Anyway, the map looks pretty good. It’s certainly good enough to form the playing surface for my online game (don’t ask). Writing the program was way more interesting than generating maps by hand. I only found a single bug in libhex, which is heartening.

Comments

libhex v0.1.0

I’ve just uploaded the first draft version of libhex, my library for manipulating and drawing hexagonal grids. It’s available in C++, Python and JavaScript.

[docs, source, examples: C++, Python, SVG]

Read the rest of this entry »

Comments

Bonnersfield Lane

Bonnersfield Lane is a quiet, unmetalled, ancient country lane - right in the centre of suburban Harrow. What a delightful surprise! Read the rest of this entry »

Comments

Open Street Maps

For the past few days I’ve been playing with the Open Street Maps application. It’s a Wiki-like mapping system, that allows you to edit the map. I’m very pleased with the work I’ve done on the area near my house.

Why bother? Well, I wanted to give someone directions from the station. Google maps’ version has the station in the wrong place, and adds confusing little roads that aren’t actually there. Google’s map would just send my friend off in the wrong direction, so I started looking for something better. I tried the Open Street Map, but sadly all of the street names in my area were missing.

Well, with Open Street Maps I can just fix that myself. I did. And I added a bunch of nearby footpaths. And I corrected some mistakes that I found in the nearby town-centre. It was easy and fun. And now I have a good map that I can use to show my friends where my house is.

Comments

Text Editors

I’ve just been trying out TextMate on my Mac. Verdict: It’s too clever by half. Read the rest of this entry »

Comments

Petrol costs me US$ 8.00 per US gallon

I can’t remember why, now, but I just worked out what the price of petrol is in the US… 40p per litre. That made me lol - I honestly can’t remember paying so little. When I first started driving and paying for my own fuel, I paid about 42p - that was about 1992. Read the rest of this entry »

Comments

Sponsors