tommorris.org

Discussing software, the web, politics, sexuality and the unending supply of human stupidity.


Hackdiary: IndieWebCamp

Yesterday, I was at IndieWebCamp. Tired after a long train journey home. It’s always fun to hang out with Tantek and Jeremy. Feeling inspired to build things.

Since IndieWebCamp, I’ve been working on two things: firstly, my own blogging and microblogging system. Started building it in Rails last night on the train (having difficulty convincing myself that the Jekyll/Octopress world actually fits what I need), building a possible place to put my stuff post-Tumblr. Have a few really big ideas but am planning to start small, get things looking good, and exactly how I want them. Hopefully while avoiding the second-system effect. It won’t be as bad as my PHP and XSLT monstrosity of yesteryear. It’s in version control for a start. There’s lots that’s broken about it at the moment: as fun as web programming is, doing it without web access is a pain.

I find when I’m programming in Java or Scala, the more explicit awareness of types does actually help me in one important way: less Googling. I was on the train on the way home and didn’t have Internet access (my phone had under 10% battery life left, and I had no charging cable, so no wifi tethering for me). When doing things like Rails or even HTML/CSS, I find myself wanting to look things up on Google. Perhaps I’m a bit rusty. When I have the equivalent of JavaDocs or man pages on my machine, that need goes away.

This is one of the things I can’t quite fully endorse about dynamic land: methods that don’t actually tell you what they expect as arguments without their documentation, and their documentation is often online and often awful. Last night, I was playing around with Ruby, specifically with Geokit (I’ll explain why in a second). The lack of type annotations is weird. Here’s some code:

This Geokit function takes a latlong and turns it into a bounding box based on radius. The radius? What exactly is that? Well, it’s a number. Duh. A number of whats? Humans don’t tend to think in WGS84 map distance, we tend to think in things like metres, yards, miles, kilometres and so on. I don’t actually care how many public toilets there are within 0.2 whatevers, I care about what’s within walking distance, so, like 500 metres, say. From the word radius, I have no clue what on earth this is supposed to take. (Perhaps we need some of F#’s units of measure to solve all our problems.)

So, why was I pissing around with geo?

Well, the other indieish thing I’m thinking about trying to is build atop of OpenStreetMap. The interesting thing about OSM is only partly the maps. The other part is that it’s basically a massive slightly-confusing-to-edit wiki of points of interest. The metadata model lets you express everything from pubs to restaurants to loansharks. You can represent all sorts of useful data about venues in OSM including opening hours, whether venues have free or paid wifi, whether they have lavatories, whether they are wheelchair accessible (see wheelmap).

Well, if we want an “indie web” alternative to services like Foursquare and Facebook Places… OpenStreetMap may provide the basis for that database. That’s what I might be noodling on for a while.