tommorris.org

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


ferocity


Some minor site changes

A couple of nice little changes on my site.

Imprima has been replaced with a Helvetica-based font stack including Helvetica Neue, Helvetica and (as a very poor compromise) Arial. I’m still using Google Web Fonts for Montserrat, but may switch that out at some point.

The reasoning behind the switch away from using Imprima? Some people really don’t like Imprima. It’s a bit “fiddly”. Also, I want to cut out external dependencies that slow page loading. Google Web Fonts do that. There’s some JavaScript that will be going on a serious diet soon. I’m also looking into hosting the very small number of graphics on something like CloudFront for speed.

Pages on my site take less than two seconds to load in Chrome. I want to reduce that as much as possible. My vision of the web is defined by what I want to avoid: fussy, irritating and over-engineered. To that end, slicing down external assets as much as possible is something I’d like to do.

(I’ll be looking into a Google Analytics replacement soon. Possibly self-hosted.)

Somewhat in contradiction to the above: I’ve temporarily replaced the search box with a redirect to DuckDuckGo site search. My site search hasn’t been working and I’ve been too lazy/busy to fix it. So, it’s pointing to DuckDuckGo until I get the time to fix it.


Why SMS as a posting interface for the indieweb?

  1. Network reliability: SMS works when GPRS/3G isn’t available. The 3G network goes down surprisingly often.
  2. Ubiquity.
  3. Simplest handset possible. Today, I bought a Nokia 100 for all of £10 after my Samsung Galaxy S2’s battery died while I was trying to make calls. Nokia claim that it gets 609 hours of standby… which is quite a lot more than my smartphone does. The Nokia 100 only does voice and SMS. I keep it as an emergency phone for when my Samsung phone isn’t available.
  4. Roaming. SMS is supported pretty much everywhere. And usually isn’t ludicrously expensive like data roaming often is.
  5. Because Twitter used to support SMS but then decided to remove it. Some of us miss the flexibility of being able to post to Twitter via SMS.

Using SMS as a method to post to indieweb sites means we can use this kind of publishing for all sorts of things: live reporting in areas where 3G doesn’t work or is impractical.


Just test posting to my site using SMS.


I’ve been working on my OpenStreetMap open checkin project. Finally, I now have bits in a browser! I’ve been using Scalatra. The Scalatra website has been dramatically improved since I last checked. It’s exceptionally easy to get going.


Hack notes: OpenCheckin from OSM

Today, I’ve been working hard on building a checkin service, an open alternative to services like Foursquare and Facebook.

I’ve been building it as a separate application in Scala. I’ll probably use Scalatra (although the choice of web microframework is kind of irrelevant). The reasons I chose Scala are simple:

  • it’s faster than Ruby
  • the language level XML support is quite nifty
  • Java web deployment is pretty straightforward: should now be possible to use on Heroku, AppEngine, Elastic Beanstalk or anywhere that takes a WAR file
  • the collections framework is mostly quite nice
  • Java but better

Today, I’ve built the basic API calling code (which calls out to the Overpass API, specifically the XAPI endpoint): it will end up just taking a latitude and longitude and returning a list of venues ordered by closeness. What’s a “venue”? Well, a venue is whatever you might want to check in to. I’m taking hotels, bars, pubs, cafes and restaurants as pretty much prototypical venues. You share these because you are enjoying yourself (or not) or want others to come join you or whatever.

There’s plenty of other things that count as venues. Community centres, churches/places of worship, museums, galleries, beaches, shops, railway stations, airports, sports stadiums, offices, parks and so on.

For inspiration, here is a list of all the venue types on Foursquare, and here is the defaultpresets.xml file from JOSM, the Java OpenStreetMap editor.

In terms of libraries, currently I’m using Databinder Dispatch, which is great… but the documentation is still utterly cryptic. I’m also using Java Geocalc, which is a very simple library. Sadly, despite the claims on the website, it isn’t in a Maven repository, so I had to download it from Git and compile it myself.1

In the process of hacking, I compiled a list of the most used tags in London. This takes a 3km bounding box around a point I chose fairly randomly in Soho, and filters on tags found only on objects with names. It’s still quite interesting how there’s such a power law distribution to the tags.

The next job is to take the data that the API is returning for the area I’m sampling, write some rules to filter the uninteresting objects that (I think) people won’t check into (roads and bus stops, for instance) and then keep on building the formatter, which spits out both JSON and HTML. The HTML is a little div for each entry with a microformat (hCard, geo etc.). It just maps the data from OpenStreetMap as naturally as possible to the various HTML constructs. For instance, the phone tag can become a tel: link (which tapping on most smartphones will result in calling that number).

All an indie web site needs to do is call the OpenCheckin API and it’ll give back a list of the 30 closest venues.

Formatting is still something I’m thinking about.

British Library

Library

96 Euston Road, NW1 2DB

Wikipedia website

Wheelchair access available.

That’ll be something to improve over time. Eventually, I’d like to include some kind of icon: that may start as a simple, generic icon (hopefully all public domain and stored over on Commons) and might then evolve into favicon-style logos.

Anyway, I need to go to bed. More soon.

  1. And fix a Maven issue. And some SBT issues. Programming sure is fun when you actually get around to doing it.


I’m speaking at UXCampBrighton on December 8 about building posting UIs for the indieweb.

As someone who has criticised the term user experience in the past, I feel a little bit like I may be Daniel entering a lion’s den, but it should be fun, and I’m hoping to learn from the attendees.


Ferocity: a public to-do list

There’s plenty of things i need to add to Ferocity, the home-written blogging engine I use. Here are some.

  • Image upload. I’ve started building this on my laptop. The idea is to be able to upload to Amazon S3 from here. Or possibly Flickr. Or possibly Wikimedia Commons. Or possibly all three. Ideally, I’d be able to do this from my Android phone. This may require a native app. Because fuck Instagram and all their fucking hipster bullshit.
  • Ability to add trackback-esque links from the site rather than from the command line.
  • Open checkin and media checkin.
  • A “last spotted” thing in the footer which would show the last place I checked in or posted from.
  • Microformats2. I’ve been working on drafting a Microformats2-to-RDF process, and the two mesh together very nicely.
  • Comments. Maybe. Terence has been bugging me about it. I’m not sure I want my site to turn into a troll-infested shithole, and not having comments may be the answer to that. If you disagree with something I say, make yourself a website and I’ll link to it.

The Sellotape Problem, design and the indie web

For those who haven’t been aware, my site tommorris.org, where you are hopefully reading this, is part of a plucky little group of Internet folk who raise the banner of the “indie web”. Sadly, I haven’t been working on the code behind my site as much as I’d like recently. Last week, I was racing away on a work project. And there’s always the time I spend working on a little encyclopedia you may have heard of.

One of the more complex issues the indie web faces is a non-technical problem. The technical problems are easy enough to work out. Good people can differ on preferred approaches there. Some will like Activity Streams, some will like microformats, some will like PubSubHubbub, some will like schema.org, some weirdos like me will even like the Semantic Web stack with technologies like RDFa. This reflects technical differences and underlying philosophical differences (I see the web as containing graph-like data, and thus needing a graph-like data model, others do not find value in such an approach).

But, for users—both in this case readers and writers—the particular brands of techno-duct tape that holds the whole contraption together shouldn’t matter too much. There are some big problems beside the technical ones. In fact, much bigger problems we’re going to have to solve in order to build our own homebrewed alternative to centralised social networks like Twitter and Facebook.

That problem is that the centralised social networks don’t just rule the web because they are big evil silos who horde all your content and so on. This is true. No, the far bigger problem is that they own the genre. Before Flickr, everyone knew what a photograph was. Before YouTube, everyone knew what a video was. Before Wikipedia, everyone knew what an encyclopedia entry was. Before blogging… not really. I mean, we are familiar with what writing is, but not necessarily in the form they take online. People still don’t get that it is sort of a mixture of citizen journalism and diary writing, but different because it is on the web. Photography and video have settled on the web in a modified form: naff hipster camera filters weren’t necessarily widely popular before Instagram, three minute video diaries weren’t necessarily popular pre-YouTube. But writing on the web has been a maze of exploration. From fairly masturbatory hypertext fiction that has been subject to lots of excessive academic theorising to things like the humble FAQ to wikis (of which Wikipedia is actually a very unrepresentative example) to blogs and microblogs, how we write online has changed pretty dramatically.

It’s perfectly easy to start a microblog. Hey, so long as your blogging system doesn’t require anything weird like obligatory titles for posts, there’s no particular reason why you can’t just start microblogging on your own site. And per the POSSE principle, syndicate it out on to Twitter and so on. The problem is the interpretation given to a microblog post. If I write a short snappy silly post on my personal site, people give it a seriousness that it doesn’t seek or deserve. If it were on Twitter in an admittedly compressed form, it would never have got linked on Hacker News because it is… just a tweet. But it is just a microblog post. The long post I made about Neo4J a day or so later didn’t get any such consideration.

We have a Sellotape problem here. Or a Google-as-a-verb problem. Twitter has defined microblogging just like Sellotape defined sticky tape, Xerox defined photocopying, Hoover (and now Dyson) defined vacuum cleaners, and “to Google” has become the verb you use to talk about doing a web search. We struggle to find the terminology to talk about it outside of Twitter: identi.ca—now status.net—used to call it a “dent”, and Facebook call it a “note”. We’ve used “posts”, “notes”, “statuses”, “updates”, “microblog post” and so on. The name isn’t the issue, or isn’t the complete issue. The issue is we don’t have a way yet of describing, displaying and understanding what one of these little posts is.

Finding a language to talk about these independent tweets is hard but not that important. I don’t particularly care about whether we call them updates or notes or statuses or even “tweet-like posts”. What is far more important is that we have ways of signifying to people that a short status or tweet-like post is in fact that. It is more important that the reader understands that they are looking at something that should be mentally pigeonholed into the same category as tweets or Facebook status updates rather than as great philosophical monologues on the state of the human condition.

My usual source for design inspiration, namely books, fails me here. Books—or at least, the sort of books that people who go mushy about typography (I’m guilty of that) tend to like—aren’t usually in the business of pointing out their own frivolity and lack of seriousness. I mean, there’s always Comic Sans and Chalkboard, but I don’t see anyone suddenly writing their site all in Comic Sans. And that doesn’t send the correct message either: it’d be like a stand up comic wearing a clown outfit on the basis that the clown outfit represents humour. It’s more complicated than that.

The answer may lie in kitsch and camp. Quite what that even means in web design, I’m struggling to work out. Bette Midler songs? What exactly is there to ludicrously send-up? Well, there’s 8-bit gaming, perhaps? The Super Mario theme tune as web site. We live in an ultra-modernist Helvetica world, and finding a playful but subtle way of expressing the frivolity and fun of something like Twitter in the context of everyone having their own little self-published independent microblogs is hard.

The challenge isn’t just building the technical infrastructure for the independent and decentralised web. The bigger challenge is building a shared design language for that new frontier. It will be fun though.


Ferocity: on finding yourself

Yesterday and today, I’ve been working on improving the reverse geocoding functionality in Ferocity. And by improving, I mean fixing. Because it currently doesn’t work in a lot of places.

I’ve put the code I’ve been working on up on Gist for those who are interested.

There are a few issues with reverse geocoding.

  1. GPS isn’t that accurate in cities.
  2. The W3C geolocation API doesn’t always accurately reflect a recent GPS reading. Imagine, you get your phone out, take a photo with geotagging turned on. The phone locks the location and adds that to the photo metadata. You then go into a shop nearby for half an hour, go out a different exit than you went in, then use the W3C geolocation API on a web app. There’s no guarantee that the phone will have updated the GPS fix and may return the old one from half an hour ago.
  3. Producing a decent reverse geocoding is hard. If I told you I was standing at The Arcade, Somers Town, London, that’s not a very useful description. If I told you that I was standing outside St Pancras railway station, that’s far more useful. Our psychogeography differs from what a computer can infer from OpenStreetMap. Especially in London.

Solving the third problem may require a bit more work. Eventually, I’m planning to build an OSM-based check-in application which would use the points of interest in OSM to allow you to check-in. (I’m someway to building it already.) That’d solve the problem quite neatly.


Going live

Following prodding in IRC, I’ve now flipped the switch and pointed tommorris.org over to Ferocity, my new blogging system. Don’t worry: for the moment, blog.tommorris.org is pointing to my old blog. Eventually those posts will be moved over to this site and the old URLs redirected. The old comments, well, I may pull them in too. They aren’t going anywhere for the meanwhile.

So, here we are. My domain now points to my new site. We’re no longer pootling around on the side roads, we’ve hit the motorway now. The fact that my primary URL is now running on this tinpot site I started just under a month ago at IndieWebCampUK is kind of scary, but kind of exciting too. Building your own stuff always is.


Ferocity: Pingback design

This evening, I’ve been working a little bit on implementing Pingback. I haven’t actually gotten around to implementing it fully, but I’ve done some design work.

One of the things I hate about trackbacks and pingbacks is they often look ugly and dull. On Wordpress, they tend to be the bit one skips over: too many “[…]” for any sane person to read. If I’m going to implement it, I don’t want it to be like that.

So this is what I came up with instead.

“This post is further discussed at:” actually tells people what is at those links rather than cryptic terms like “Trackback” and “Pingback” which are only really understandable to dorks.

Secondly, the use of favicons. I thought about using profile images (by, oh, some process like searching a web page for a representative hCard, then searching for rel-me links to well-known social networks, and then maybe throwing in some FOAF and other stuff) but then realised: I don’t want a photo, I just want a nice standard sized image that represents the website rather than the person. Much as we conflate the person and the website for the purposes of social networking, for the purposes of content sharing, making that distinction is quite useful. If, oh, the New York Times starts sending out trackbacks, then I should be there to handle them.

I’m hotlinking the favicons. I should probably cache them. There are services like this that use Google’s cache for favicons.


Retina

I had to pop down to the Apple Store today. Somehow, a weird crack has appeared in my laptop’s LED screen (I didn’t drop it, ‘onest!). I got there half an hour or so before meeting my appointed Genius (I was his last appointment before ending his shift and going off on a ten day holiday, neatly missing the iPhone 5 launch, a move that certainly puts him at least in the smarty-pants league) and had a little chance to play with the shiny new Retina display MacBook Pros. I had a go with them last time.

And I had a look at this little beta site. Blimey. The text looks pretty darn gorgeous. The only thing that looks a bit crap is the logo image. As I’m going to be visiting the Apple Store a few times in the next week, I’ve decided I may as well get the graphics looking nice on the Retinabooks. I’ve just created a 2x-sized logo graphic and checked it into Git. Tomorrow, I’ll spend a few minutes implementing it in the markup: either using superacidjax’s clear_eyes, a Rails gem that gives you a nice easy way of doing Retina graphics. Alternatively, I may just use Retina.js.

Either way, I’m actually pretty impressed and excited by retina displays. I’d rather like it if Apple could spend more time doing things like Retina displays and less time on silly gimmicks, patent lawsuits and the like. The whole 72dpi thing has always been a bit shit. Perhaps it is my eyesight, which has always been pretty fucking good, or perhaps it is the formal training in photography, but I actually notice how shit things look. I’ll look at images in a book and see the dots on the page and say “no, look, that reproduction looks like shit”, and other people will think I’m crazy and I’ll get a fucking loupe out and show them that, no, really, it really does look like shit.

And as per this XKCD, I’ve always been rather surprised that people seem to think big monitors are impressive.

Apple have done a stunningly good job educating people on this. Yeah, you think your 60” 1080p TV is impressive? Whack an 1080p video up on a Retinabook and you’ve got more than enough space on the side for Twitter. I’ve known I want much better displays, but Apple are now selling this to computer buyers. Give it two or three years and we’ll see it permeate the rest of the industry. And a good thing too. It’ll be nice to forget the bad old days when you could look closely at a screen and see dots.


I’m looking into wrapping Ferocity in a little native app layer on Android (not iOS? No. I have an Android phone. I don’t care about iOS. See indiewebcamp.com principles.)

Useful links:


Geolocation test: I’m currently in Spitalfields Market near Liverpool Street posting on my laptop using wi-fi hotspot tethering on Android. Let’s see where Firefox thinks I am.

Wow, it’s accurate. That’s probably based on the nearby wifi spots though.


Been working on Atom support.

Useful reading:

Why, yes, I am using RELAX NG to test that my Atom feeds are valid Atom. That’s what validation is for, right? That seems to be an integration test in Rails land.


On the train. Working on Ferocity:

  • Now has a nice list style.
  • I can now delete posts.

The other things will have to wait. So long as I do something to improve Ferocity every day, that’s all good.


Coming up very soon on my Ferocity to-do list: a UI for editing locations of old posts, the ability to remove location from posts (Twitter lets you do this for all of your posts but not individual posts), and Atom.

I have also been working on OpenStreetMap checkin and getting closer to what I want. I can now retrieve and filter a list of venues for a given location. I just need to do some ordering and add some UI around that and decide on a good way of storing that information in the database and representing it in HTML with RDFa and microformats.


Time to get ready to go to London. The spare battery for my phone hasn’t turned up yet, sadly. On the train, I can work some more on Ferocity.

The old trains in Britain with slam doors and the like were much cosier for reading books. I remember once reading a philosophy book in one of the slam door compartments and a Jewish man asked me if I could write down the name of the author and the ISBN for him. In the new trains, I cannot focus on reading books, so have to work on something electronic. This, incidentally, may be part if the reason I left philosophy for computing…


Making a ferocious Indie Web

Building my own indie web site is lots of fun, but the first problem is talking about what you are building. I’m building the new site for myself, primarily, but I’d like to spin the code out so other people can lazily reappropriate it. And for that, I need a distinction between the name of my site and the name of the software that runs it.

So now it does: Ferocity. The name is a reference to a line from Bette Midler’s I’m Beautiful (video) which has a line imploring people to:

Unleash your ferocity upon an unsuspecting world.

I know. Very gay. I did start building it on a train from Brighton.

I’ve now implemented geolocation. Tomorrow, I’m going to try a few geolocated posts, as I’m in central London, and can use that as an opportunity to iron out bugs I find using it on my phone. Geolocation uses the geo microformat. I’ll also be adding the relevant WGS84 RDFa as each post that has a geolocation is technically a wgs84:SpatialThing (hey, the spec says abstracta are spatial things if they have size, shapes or positions; blog posts have positions, just some of them aren’t known).

A big thing that is missing is RSS/Atom. Trying to decide which—both kind of suck. I’m looking at acts_as_feed to abstract that.

As for things I’m reasonably happy with? On-page posting is important. Though you can’t see it unless you are me, I’m really happy with the geolocation button. It’s a little grey target symbol that turns into a black target when it finds a location.

Some other thoughts about building this thing we shall now call Ferocity. Once you’ve got used to Rails 3 and overcome the initial pain that is RVM and Bundler, it’s really rather good. will_paginate is amazingly simple.

There’s a few things I disagree with Rails 3 on: much as I dislike JavaScript, I absolutely loathe CoffeeScript. First thing I did was knock all the silly .coffee extensions off the JavaScript files. CoffeeScript seems to be an awful lot of work and seems to have been created just because someone thought that if they had to write semi-colons and curly braces, they would lose the only thing stopping them from becoming an enterprise Java programmer and they’d fall down the long rabbit hole to 20,000 line XML files and the dreaded AbstractFactoryFactoryBridgeConnectionAdapter.

CoffeeScript adds a layer of pointless abstraction that makes debugging harder… in order to make the code very slightly prettier. No thanks.


I can haz post from mobile.