Recent Posts
Transport routing side-project
I recently got one of my side-projects to a state where it’s semi-usable, so thought I’d jot down some thoughts on the process. It’s a London-centric transport routing engine, which will provide alternative routes to the typical “fastest, without service issues” from other apps. Some ideas:
Least-crowded route (where possible), Routes with air-con (now that Summer is approaching, the shorts are out and so is the Central line), Routes with step-free access (ideally better than “does this station have a blue wheelchair symbol”).
read more
Fix: Pytest hangs on q.join()
This week, in stumping Ross for a couple of hours…
At Snap Tech, we’ve been breaking up some of our large-file-parsing components into smaller units (for testability, reusability, and to be able to join them up nicely with simple Unix pipes). This means they’ve been getting some unit-test loving as well. One component does some lengthy tasks over a small thread pool. Here’s the typical threading + queues Python example:
read more
Working with HUB stations in TfL's StopPoint API
Another “document it, so no one else has to research it” post
I’ve been using TfL’s API a lot recently - in particular live arrivals at a station/stop. I’ve started making my application actually useful for people who don’t live at my stop, by replacing the hard-coded station identifiers for calls to the search API.
Some background In the UK, we have a system called NaPTAN (National Public Transport Access Nodes, that is essentially a large dataset of uniquely identified features of public transportation.
read more
Fixing command overrides when running tasks in Amazon ECS
I’m sharing this as there’s only a single mention of this in the entire AWS ECS documentation; and no hint in the console UI.
If you attempt to run a one-off task in ECS, for example python manage.py migrate, you might see a cryptic error message like this:
Status reason CannotStartContainerError: API error (404): invalid header field value “oci runtime error: container_linux.go:247: starting container process caused "exec: \"python manage.py migrate\": executable file not found in $PATH"\n”
read more
Learnings: React and forms
In building DayLog (intro post coming soon), since it’s a completely personal project, I’ve been trying to play with as much new front-end tech as possible. In this instance, I’ve been finding HTML5 APIs on MDN with poor browser support and trying to find a shim afterwards.
One of the APIs I found was FormData - a nice little library that wraps around a HTML form and gives simple access to element data.
read more