You are here

projects

Buying a laptop cover without the laptop present

It's like a wonderful logic puzzle, solved by expanded plastic foam!

I need a laptop cover for my laptop. One of those close-fitting sleeves. The only problem is, my laptop's a weird shape: not only does it have a 16:9 aspect ratio, but it also has an extra-large battery sticking out at the back.

That's not the only problem; the other problem is that when I go shopping for a sleeve this weekend I don't want to have to carry my laptop around with me. So either I guess at the right dimensions, or I make sure I buy big.

... Or... I take the expanded plastic spacer that came with my wife's laptop sleeve, and cut it to size! The bits that I cut off, I can glue on the top to increase the depth (it's a chunky Dell beast, you see.) and if I arrange the bits really carefully, like this:

Magical DIY laptop spacer-cum-laptray

... then the resulting assemblage of plastic foam can be carried with minimum heaving around Oxford city centre looking at laptop bags; but afterwards it can also double as a makeshift laptop tray, for use when sitting on the sofa or in bed! The space underneath means the fans should be kept fairly clear, to do their whooshing thing when they need to.

I've looked at a few laptop trays and none of them seem amazing: I could really do with that clearance underneath. But to do that properly, you have to have a tray that's built especially for the footprint of your laptop. Well, now I have that.

What I need next is a sleeve.

Upgraded to Drupal 7

"Did you notice that?" "Notice what?"

This site was quietly upgraded to Drupal 7, in stages over the course of the past few days. Well, I say quietly: it was pretty noticeable from my perspective. But hopefully nobody else realised that it was happening, or had suddenly switched; that was the point!

Partly in order to work out whether or not it could be done, I very purposefully did an upgrade of the old D6 site, and not a migration of the content into a new D7 site. It turns out that it could indeed be done, although I'm sure the simplicity of my site has a lot to do with that.

I'll do another blogpost in a few days, about how I accomplished it, but I'm waiting for the dust to settle, the bugs to shake out etc. Speaking of which, I'm off to check that this post appears in my RSS reader of choice!

Talk at OxDUG on Love Food Hate Waste

At OxDUG last week, I did a presentation of Torchbox’s rebuild of the Love Food Hate Waste website in Drupal. There’s now more information on the Oxford group on g.d.o, including my slides.

Blog category: 

What happened at the first Refresh Oxford hack day on Saturday

We built stuff that works, is what happened. Apparently, this is rare for a hack day.

Yesterday I went to the inaugural Refresh Oxford hack day in the Incuna offices. It was great.

The local initiative is part of "Refreshing Cities," an attempt to provide vitality to local creative and technical culture, especially in the field of "new media," which one day we'll probably just call "media." As I've spent the last four years organizing the Oxford Geek Nights to do this very thing within the geek-social space, I can only applaud the idea.

The start of the hack day saw dozens of people present: a decent spread of designers, developers, UX/accessibility experts and similar webby folks. It was useful to begin immediately after another first, the inaugural European jQuery conference, also in Oxford; the conference brought a lot of both attention and attendees to the event. Although, the large amount of booze available at the conference means that a lot of people didn't turn up till considerably later; if indeed at all. 

For the first hour or so, we were all free to propose projects to everyone else. The idea was that these should be ideas that could either: be begun and brought to a fun if not necessarily successful conclusion in a day; or that were more long-term, already underway, but needed a day's worth of work from a few people to yield real returns. While we did a bit of horse-trading, we also ate pastries and drank tea and coffee.

Henry, Suzie and I formed a team of frontender, builder and programmer respectively for our own project and came up with a plan for development. Lunch turned up as we started work, and then... well, the next seven hours or so are frankly a bit of a blur. A fun, exciting blur; but a blur nonetheless, as we dipped down below the surface of our project and hammered away at it. By the end of it we had a cute little application with a server and a Chrome browser extension that even I was surprised actually worked (despite Henry's attempts to break it just before we were ready to show it to other people.)

We all finished with pizza, a demo, and then beer. Other demos included:

  • an in-browser horizontal-scrolling game with cats
  • work on making the first volume OED searchable through OCR
  • a prettifying Django views inspector 
  • and an attempt to script kinetic typography

In short, a pretty varied bunch of really neat one-day efforts from everyone. And we also got to meet other like-minded local geeks and find out what other people were up to in the city and its environs. This coincides completely with the whole reason I run the OGNs: geeks are paradoxically both shy and social animals; so encourage them to meet up with each other once in a while, overcome that initial barrier of shyness, and magic happens.

The all-important social aspect aside, it's astonishing what magic people did come up with, given only a day to work on it. Incuna were a really welcoming bunch and made everyone feel at home, and gave us just the right amount of herding: thanks to their foresight, most of the projects we worked on are now available via the Refresh Oxford github account, if you're interested in looking at some of our code. It ain't pretty; but if Rome wasn't built in a day, then these projects were. In your face, Rome.

My OpenTech 2011

Lots of new projects; lots of opportunities; help wanted almost everywhere, but potentially big returns.

On Saturday I went to OpenTech 2011 and had a brilliant time. This year's event was very much moving out of the shadows of the excellent data.gov.uk and legislation.gov.uk projects: last year's (quite rightly) gave these two some time in the limelight; the one before that (which I missed) apparently had a fair amount about how these projects were coming our way. So this year, while the equally impressive alpha.gov.uk was lionized in its own workshop and talked about in every third conference, there was a much more hetergenous feel to the event.

There are clearly a lot of projects out there that are simultaneously proven to work yet also need help to have further successes. Sukey, the demonstrator-safety application - usually referred to as an "anti-kettling" system, hence the name - needed developers for both web and applications; but also more than anything need advice on infrastructure and documentation so that other groups can deploy a Sukey for their own use. Dave Cross needs more people to read and fact-check occasional tabloid news stories: easier than you might think. Tim Ireland suggested that others pick a random bullshitting MP and shine a welcome light on their opaque parliamentary career. And Judgmental, an online repository of case law, wants help working out exactly what to do with their wonderfully detailed corpus of court judgments.

Some aspects of the picture were bleaker than that. While not all of government is the enemy, nonetheless the talks from PoliceStateUK and someone from UK Uncut suggested that a lot of government is, especially the police, and especially the frankly self-embarrassing Metropolitan Police. The rally for "Science is Vital" showed that, although politicians including Vince Cable blow hard about the cuts, a targeted, intelligent and coherently argued protest can quickly make them change their mind (so much that when they delivered a petition they got a congratulatory audience with David Willets); in which case, why are so many people so happily trumpeting the party line about cuts, when they might be so easily swayed?

Surprisingly, there were a few technical problems: the main room was fairly dysfunctional, with ULU's typically overzealous air conditioning complemented by a projector that almost never worked smoothly and some wireless PA that at one point picked up a different presenter in a different room. As organizer of the Oxford Geek Nights I completely sympathise with anyone having these problems at an event. At its best, the tech at conferences is like a grumbling but willing  co-speaker who smells faintly of magic smoke; at its worst, it's an obstructive, stubborn, mean-spirited attendee that, were it human, you'd have called security to kick them out long ago. Still, the main room's aircon is a recurring hazard, and there were very few scheduled gaps between the talks for laptops to be checked on the projector (was there even a KVM?) There must be a less stressful way to do this: that might mean "better" tech; but it probably also means removing complexity and "cleverness."

Still, OpenTech carried on regardless of these problems: the perpetual win of open is more powerful than the occasional fail of tech. Indeed, the first talk, the one most plagued by technical difficulties, was one of the most inspiring. The "Science is Vital" crew ploughed through the lack of slides or, at one point, any vocal amplification, with only one of the three speakers incapable of raising their voice to compensate. And a subsequent talk upstairs was very much demonstrating the win of tech, as Francis Irving breezed through data-acquiring ScraperWiki (an idea that like most great ones is in retrospect obvious) and Paul Makepeace through the data-cleaning features of open-source Google Refine, before Hadley Beeman, Glyn Wintle and Alex Coley pulled it all together for the genius that is LinkedGov: like many other projects before it, both commercial and open, LinkedGov gets individuals (in this case civil servants) to scratch their own itches (of getting answers to their internal queries), so that the world at large benefits. If civil servants tidy up and release their own data, then a tidier, more interconnected corpus can be made available to all, both inside and outside government. (And while getting funding isn't proof of the genius of a concept, it certainly helps with its ultimate success....)

But that's the best aspect of OpenTech, when open meets tech to produce something not just life-changing or clique-changing but society-changing. It's the part that makes you want to give up your day job and help out on every single project you've heard about. I know I won't - and I hope that like a whisky priest I might be less damned by knowing just how much I won't - but I hope everyone I met and talked to realise just how inspiring they are to others; even I want to make my life that little bit more opentechy because of them.

Maybe that sense of a life better lived, that you feel at OpenTech, is what inspired Bill Thompson from the BBC. He gave a talk which bordered on Marxist critique sometimes. He took the recent financial meltdown and situated it in the context of the decades-long development of the internet's open stack. He suggested that the stack would be generally resistant to closed technologies because of transaction costs, and that this made certain types of closed systems less viable than their open counterparts. He accepted that, after the credit crunch, we were now still suffering from concomitant if ultimately unnecessary cuts in public funding; but that in the long run we would look back at what was probably the end of a certain kind of capitalism: even if governments and financial institutions haven't really accepted it yet. "There was indeed a revolution;" he said, "and we won." 

Automated backups to S3

Wrapping python-boto in scriptable magic to back up your websites to S3

Simon Willison put together an excellent short-and-simple backup script over a year ago now, and I've used it intermittently to make backups. It takes files, whole directories, or the output of shell commands, and wraps it all up into a datestamped gzip file, before sending the whole thing up to an Amazon S3 account. It's a nice little piece of kit, in other words.

I found that it worked mostly fine, although it was (a) fiddly to run as a cron and (b) threw occasional errors which I wanted to fix. These two things together meant I wanted to do some proper development on the script and keep track of it.

I wrote a wrapper to help setting up cronjobs, which means it can be scripted using config files in the user's home directory and . I then decided on a whim to commit all of this to github , which is the online home for a community that's been set up around the git versioning tool. As befits a DVCS tool, git has spawned a community which is multithreaded and agile and most of all very friendly, with all free repositories available to the public and everyone able to fork off everyone else.

The repository was still a bit empty, as out of respect for the original coder I didn't commit backup_to_s3.py with everything else. Then, very kindly, Simon agreed to let me bundle his script with everything else, so you can now check out (clone) the "Configured S3 Backups" repository and follow the README to get scripted backups up and running fairly speedily.

I'd love for people to give it a try and offer some feedback. I definitely want to squash bugs and would also welcome new functionality. But the joy of git and github is that if I don't want to implement any extras, then other programmers can go ahead and

In summary? Configured S3 Backups: give the script a try. Git: give DVCS a try. And github: give DVCS-based online community building a try. Message ends.

Blog category: 

Playing with card sorting

If something's worth doing it's worth doing in excessive and somewhat worrying depth.

If you want your website navigation to reflect the way that users might find your content, you obviously want it to serve their use cases and the terminology they're comfortable with. Ideally you'd do this by asking sample users to build your navigation for you, but in the absence of any willing volunteers one of the best things a site owner can do is card sorting.

It sounds pretty simple. Take the resources you want people to navigate around---so generally the furthermost leaves of your navigation tree: rich content pages, applications and the like rather than section indexes, which might contain navigational preconceptions---and try to assemble them into groups. Pretend they're written on cards---or, in a more agile way, actually write them on cards and shuffle them round a table---and try to assemble piles of similar resources. Closed card sorting involves predefining the groups, and is ideal for arranging new elements in an existing navigation and a good compromise for building a new navigation quickly; open card sorting is the same, but with no predefined groups. The results are better but it takes longer.

Card sorting really helps site maintainers escape preconceptions and build a navigational hierarchy that makes sense. So although it seems like overkill, this is actually what I have just done for this website. As with much that I'm currently doing towards the site rebuild, it's intended as a learning experience; a voyage of discovery, albeit taken on a Tonka truck within the safe confines of the wee sandbox that's my personal site.

My first pass yielded around fifteen resources---rather fuzzily defined, but including varied things like "my blog" and "a link to my Twitter feed"---which I wanted people to be able to navigate around. I arranged these in a single-parent hierarchy beneath six main headings: ongoing, literature, coding, academia and portfolio. However, this felt a bit forced (and some sections, especially "academia", are mostly opportunities for old documents to gather dust. I tried to imagine adding a more freeform vocabulary that cut across a lot of this, something like tagging, but there was something wrong.

Unsatisfied, I completely scrapped the single hierarchy and tried again. This time the list of resources had expanded to more like twenty, and I went for a more radical approach to grouping. Instead of trying to group objects as cards in a pile, so each card could only be in one pile, I tried to imagine from the start what groups plural they might fit into. Although I was still thinking in terms of menus, the parent terms were now more like categories from a taxonomy, with any menu item being available from several categories.

This resulted in seven terms:

tech, content, social, lit(erature), work, love and misc

This blog, for example, could fit under "tech", "content" and maybe "work", and would be accessible from all those places. My attempts at creative writing on Quiet little Lies could go under "content", "literature" and possibly "love".

As long as the number of objects didn't get too long (and objects didn't spread under too many terms) then these seven terms could still make sense to the user as a starting point, even if they found different things in multiple places. In fact, in the brave new world of folksonomies and tags, web users might be getting used to less hierarchical ways of navigating, so this might even pay off.

Drupal's menu system supports multiple or mixed hierarchies out of the box, but I preferred instead to actually use categories, and tie these to a menu with the Taxonomy Menu module. I might not follow that route in future, as it essentially only supports linking to Drupal's out-of-the-box category index pages, with content sorted in reverse date order, whereas I'l almost certainly want to do something nicer. But like card sorting itself it was a good springboard to getting things working and feeling happy with progress.

For now the hierarchy is implemented with dummy content, but I hope to fill it out more---and then expose the navigation---in the next few days. Right now it's just nice to see things starting to come together. Also, having seven top-level terms fits in rather neatly with the design decisions I've already made: more on those later.

Drupal module: watermarking your development sites

If you've ever been programming in dev-test-prod environments and thought "now, where am I?" then this might be for you.

Developing Drupal in a development--test--production environment has a lot of advantages. Each developer's work is sandboxed, staging is straightforward, and deployment to live the stuff of Capistrano scripts---especially if you unite the entire ecosystem of separate environments with version control.

However, it can lead to confusion over precisely where your browser's currently pointing at: at best, this can be comical; at worst, it can result in either loss of live content or the logjamming of a staged site with content intended for live. Suddenly a staging environment is out of action until that content can be exported to the live site.

Enter devwatermark β-0.1, a D5 module intended to watermark any non-live sites with a little right-hand banner overlay. When first enabled---you can do this on your live site---it inserts no such banner. However, as you add live domains to its configuration, it begins to work out when it's not on a live site and tags your browser window with the "DEVELOPMENT" banner. Like watermarking your printouts with "DRAFT", or maybe like dogearing a page in a book. If your site has to respond to multiple domains---and if the content is the same then you should really serve up 301s instead---then you can add those extra domains to the configuration as required.

Having devwatermark enabled on live means that when you bring a live database down to a staging site to test the next round of updates, the change in domain will make devwatermark automatically show its banner image. You know instantly when you're in a development---and hence content-volatile---environment. That means that you can also watermark staging sites as non-development too: by adding them to devwatermark's configuration you can confirm to the developers that here's a database environment that they can't wipe and start again.

As I mention above, it's currently only available for Drupal 5, and your theme has to respect hook_footer (most do out of the box.) But please feel free to download it and give it a try.

New alpha version of Drupal EditInline module

EditInline is four, er, alpha subversions old. I bought it a cake.

My Drupal module for editing nodes inline EditInline is at version ɑ-0.4. Just to summarize, the module lets you edit either the current node (or any other node where the title comes from Views or node template rendering) in a lightbox overlay. That means you don't always have to navigate to (or even know how to navigate to) a piece of content in order to edit it, making editing more accessible and intuitive.

Now you can also edit nodes in nodereference fields, while you're on the page to edit the current node! That means you can be on the edit page for e.g. a publication, but edit the author biography node attached to it by a CCK nodereference field. There's little edit buttons to the side of nodereference autocompletes which . Also, once you've edited the node in the lightbox overlay and it's closed, any title edits are also changed in situ to help you envisage how the page will look without having to refresh.

I did some of the work---mostly that leading from ɑ-0.2 to ɑ-0.3---during handy gaps between talks at Drupal Camp UK, held at BBC Manchester a couple of weeks ago. I wish I'd caught the wave of blogging about it at the time, as it was tremendous fun. The talks were all of a very high standard, but what felt more important to me was meeting people in the UK's Drupal community, and realising at first hand that the fun-loving, Drupal-interested, hard-drinking weirdos (that I'd always hoped were hiding here and there on the IRC channels and forums) really do exist.

Creativity isn't all that common

Academia adopts Creative Commons and iterative development; world does not end.

Beth Kanter advocates Creative Commons in the latest post on her blog about not-for-profit organizations and social media. She discusses how she's managed to introduce often quite recalcitrant nonprofit sub-sectors to the concept.

I can't comment on not-for-profits in general. From our work a while ago in the MLA sector, I got the idea that they had broadly speaking grasped the concept: new website projects were actively planning to release archive material under CC licences. But what I found most interesting was the recent development at the University of Oxford (disclosure: Torchbox developed their "corporate" website, but I write this blogpost from my perspective as an alumnus.) As an internal project they've launched a permanent online resource of research materials, the Oxford University Research Archive (ORA), and are effectively offering alumni a chunk of webspace for their DPhil theses, in perpetuity. You can also store source typesetting files, not to be viewed by the public, in case you ever need to recreate bits of the document. They have a neat and functional (if slightly buggy) interface for uploading content: the bugginess is completely and totally excused by the fact that they seem to be gradually iterating the front end of the site. Since I last visited it's got tinyurl.com references and more authorial information. I wonder if they're running an agile project behind the scenes....

It's a brilliant experience: both to see this sort of thing happening, and also to be able to take part in it. What's most exciting about ORA is that you can make your research available under a CC licence. So: although you've always been able to read it---if you really wanted to---on my own website, you can now peruse Stabilization and control in a linear ion trap in the comfort of your home, and distribute it to all your mates for free (if you don't want to have any mates any more), safe in the knowledge that you're doing so in accordance with an open and pro-distribution licencing arrangement.

My thesis had been languishing---my supervisor, being encouraging, would doubtless pooh-pooh that description---for a few years until I put it on ORA and stopped worrying about having to maintain a semi-permalink to it. When I did so, it was a matter of weeks before I was contacted with a view to publishing it. Surprising and welcome, you might think; unfortunately, the publishers in question were these people. Much has been said about them elsewhere, and I don't particularly want to repeat it here (especially as I wouldn't want to attract the Google-happy commenter.) But, would you know? Since I explained to their employee about Creative Commons, and how they'd be welcome to publish copies of my thesis if they agree to not charge a commercial excess for distributing said copies, I haven't heard a peep from them. I can't imagine why.

Pages

Subscribe to RSS - projects