The Level: a deck designed to set you in motion

After I wrote about my standing desk last year, I got a nice email pointing me to this Indiegogo project.

It’s a board that you place under your feet while you’re at a desk, and it has a curved underside to keep it moving and tilting. As the board tilts, you move your feet and maintain the blood flow in your legs.

Here’s what it looks like:

It’s an interesting idea, and I can see the potential health benefits. I’d want to try one in person before I committed to backing it – I suspect I might just find it more annoying than anything else – but I’m definitely intrigued. They’re well past their goal, and just a few days left to go on the project. I’ll keep an eye on it, and follow the reviews when the board is released to backers.

In the meantime, my low-tech solution for maintaining circulation in my legs is to take regular breaks. Whether sitting or standing, it’s good to get up and walk around the room at least once an hour. It’s probably not as good as continual gentle motions, but it’s cheap and it’s easy.


I really like Pygments. It’s a Python module for applying syntax highlighting to code in printed documents. I use it on this blog, and when I had to include code listings in my university coursework, I used it with the Minted package in LaTeX.

But recently I’ve needed to generate standalone code listings that aren’t part of a larger document. I was using the command-line each time, but to make it a little easier, I’ve written a small web app instead. Here’s a screenshot:

I enter the code in the first box, select the language, and click the button. The HTML and rendered preview appear at the bottom of the page. Really simple.

The code is all on GitHub, and below I’ll explain why I wrote it.

Continue reading →

Adding Python to the OS X firewall

If you ever get the warning “Do you want the application “python” to accept incoming connections?” on OS X, then somebody on Stack Overflow has helpfully written some instructions to keep it quiet.

My current side project is a bookmarking app written in Flask, and I get this message every time the app restarts. It’s mildly annoying, and I’m glad to see the back of it.

Tidying up my 1Password

I’ve been creating online accounts for years, and saving them in 1Password, but everything was a bit scattered. I’d never stopped to organise or tidy up my database. I also had a lot of weak or duplicate passwords that I’d never changed.

Last week, I set about cleaning up my 1Password database. This was more than just changing some old passwords: it was a thorough and deep-level reorganisation.

Continue reading →

A Flask app for taking notes

This is a pretty good plaintext notes web app. I’d been looking for something to use to take notes at work, and I’ve been trying this for about a month. I think I’ll keep using it.

It has all the features I need: Markdown support, full text search, and it runs on Windows. As a bonus, because it’s open source, I can easily tweak it where I want. (Some features were added in later posts.)

Flask is a small web server framework for Python that I’ve been using for a couple of recent projects. I was considering rolling my own notes app, but this one is pretty good.

Adding checkboxes to lists

Matt Gemmell had an interesting idea this evening:

Thought of a useful Safari extension: change any UL/OL elements on the page into checkboxes, for when you’re working through a tutorial.
Matt Gemmell (@mattgemmell) Feb 12 2015 8:15 PM

I decided to see if it would be possible, and in doing so discovered how rusty I’ve become at JavaScript. This is simple enough that it can be done with a bookmarklet rather than a browser extension, and that’s what I’ve done here.

Drag this bookmark to your bookmarks bar:

Add checkboxes to lists

Simply click it once, and all the UL/OL elements will have their bullets replaced by checkboxes.

If you want a quick demo, click the link above and see what happens to the following lists:

An unordered list:

  • Bread
  • Milk
  • Eggs

An ordered list:

  1. Do the first step
  2. Then do the second step
  3. Finally, do the third step

I’ve given this light testing on the latest versions of Safari and Chrome on OS X, but that’s it. (Using this will also allow you to discover all the interesting ways in which lists are used for page layout, when they break.) This was just a bit of fun; I don’t expect it to be a perfect solution.

Continue reading →

Swift 1.2 improves the “let” keyword, and other improvements

Apple released Swift 1.2 today as part of the Xcode 6.3 beta. There are lots of big changes, but one that I particularly like:

let constants are now more powerful and consistent — The new rule is that a let constant must be initialized before use (like a var), and that it may only be initialized, not reassigned or mutated after initialization.

I’ve been trying Swift for about two months on a couple of academic exercises (like the Matasano Challenges and Project Euler). I was planning on writing up some of my thoughts, and the behaviour of the let keyword was going to be one of my complaints, but now that seems to have been fixed. Hooray!

In Swift 1.1, variables supported an “initialise now, assign later” model, whereas constants had to be assigned at the point of initialisation:

var x: String   // This is okay
x = "foo"

let y: String   // This is a compiler error
y = "bar"

The new changes mean that constants also support “initialise now, assign later”, and the above is legal code. The old behaviour never broke anything, but it was a mild annoyance that I hit pretty regularly. The change won’t radically change the way I use Swift, but it will make my code a little smoother.

I’m impressed with the way Swift is improving and evolving. I don’t think it’s ready to be used for production code, because it’s still changing in pretty significant ways, but it seems to be for the better. I’m looking forward to seeing what the first “stable” version of Swift looks like.

What went wrong at King’s Cross over Christmas?

There were highly publicised problems and delays at King’s Cross Station over the Christmas period, for the nebulous reasons of “engineering works”. But to their credit, about a fortnight ago, Network Rail published a full report about the disruption, explaining how the carefully planned works overran so badly.

The report goes into a lot of detail, and it’s well worth reading. But if you just want a high-level overview of the major problems, then this summary is the best that I’ve read so far.

Register to vote – GOV.UK

Given today’s news that people are falling through the cracks in the Electoral Register, I thought try to spread the link for registering to vote. I did it this morning, and it took about five minutes. Really easy.

On a side note, I’m continually impressed with the design of the GOV.UK site. It has a very crisp and clean look, and the New Transport typeface gives it a distinctive feel. It’s probably one of the best-designed sites I use on a (semi-)regular basis.

Empire’s BBFC Ratings Podcast Special

In an Empire Podcast first, readers posed their Twitter questions, queries and grievances about movie ratings direct to the man who oversees them on a daily basis, BBFC [British Board of Film Classification] executive director David Austin. Why was Gremlins rated 15? What ever happened to What Ever Happened To Baby Jane?‘s 18 rating? What’s a 12A for, anyway? And what happened with A Good Day To Die Hard?

I thought this was a fascinating podcast about how the BBFC works: how they decide on a film’s rating, the way they choose the criteria for each rating, and changing attitudes towards adult content in films. It’s a very candid interview: Austin answers all of the questions head-on, in a very honest and reasonable way.

If you have any interest in film or cinema, then I think it’s definitely worth a listen.

Copyright © 2012–15 Alex Chan. Built using Pelican. Privacy policy.