jon black

"I am in a charming state of confusion"

How to distribute GPS points evenly

In How to compare GPS tracks I showed how the Needleman-Wunsch algorithm, originally designed for aligning DNA and protein sequences, can be used to compare GPS tracks.

The method I introduced relies on pre-processing the GPS file so that all points are evenly distributed to reduce noise in the data set, but I didn't cover how that's done.

Trace the path

Starting from the first point, the path is followed and the great-circle distance between each point is accumulated until it exceeds the desired distribution distance.

When the distance has been exceeded, a new point is interpolated between the current point and the previous point.

gpxpy has a function for moving points when given an angle and a distance in meters. The distance is the accumulated distance minus the required distance. gpxpy doesn't have a function for calculating the angle, otherwise known as initial bearing, between two points. Using the


Everyone's a hacker

As an impressionable teenager my image of a hacker was of someone who could use a computer to do whatever they pleased. Not only in the sense that they didn't care for boundaries but also that the boundaries couldn't stop them.

Nothing epitomised this more than the ATM hack by John Conner in the film Terminator 2.

Countless films and TV series have portrayed the hacker in a similar light: Neo in The Matrix, David Lightman in War Games, and Chloe O'Brian in 24, which is why the controvertial statement by Paul Graham disappoints me so much:

No, the problem is these women are not by the time they get to 23... Like
Mark Zuckerberg starts programming, starts messing about with computers when
he's like 10 or whatever. By the time he's starting Facebook he's a hacker,
and so he looks at the world through hacker eyes.

Mark Zuckerberg made


Underpaid and my own fault

Twitter is in song about the #talkpay movement initiated by Lauren Voswinkel where people reveal how much they're being paid; the intention, to expose pay inequalities.

I added my thoughts on the subject:

I've never negotiated a salary because it feels rude to ask for more money. I feel underpaid and undervalued. My own fault?

A couple of replies told me it is, and that made me wonder: why is asking for a raise a requirement to getting one? What happened to just earning it?

Negotiating for a salary makes me feel uncomfortable and tense. Sort of like this:

I was raised with the mentality that you don't ask for money, it's given to you when you earn it. I got pocket money as a child, a non-negotiable amount, and it increased each birthday. What I got when I was ten was exactly what my sisters and brother got when


Shitty first commits

I've been writing this blog for a little over a month. Writing, it turns out, is really hard. Ideas are a dime a dozen, but trying to write something interesting for someone else to read brings about cold sweats, heavy breathing, and suicidal thoughts. Luckily for me the nearest bridge is 15km away and I'm very, very lazy.

Coding shares many parallels with writing. Coming up with an idea for an app, a game, or a website can be easy, but trying to create something that people need saps the enthusiasm out of even the most diligent programmers.

What starts out as the best-idea-yet soon becomes the worst-thing-ever. You begin doubting your ability as a programmer; you wonder if the framework you've chosen is the right one; you fear what real programmers will think when they see your code. Suddenly, you can picture them, pointing and laughing. They tell your


How to compare GPS tracks

Every now and then I get a crazy idea. Most of the time I'm smart enough to ignore it, but sometimes, in a moment of insanity, I convince myself the idea is the best one I've ever had. Two months ago, that idea was to try and run 5km in under 20 minutes.

Unless you're an experienced runner, you don't just put on your running shoes, hop out the door, and run 5km in under 20 minutes. It takes time to train and condition your body to put up with the unfamiliar stress. Since the insanity took over, I've been training three times a week, gradually building up speed and stamina. I'm a very long way off, but my time is already down to 25 minutes.

I've been using my Garmin Forerunner 210 to record my progress. Like many gadgets it has a built in GPS receiver, allowing the watch