Build Python from source... with optional dependencies In order to try out Python 3.6's new format strings -- no, really -- I wanted to build myself an alpha version of CPython. The canonical source is on a Mercurial repository;
Nested SQL Statements: Surprisingly not horrifying...? In writing some test queries for my Twitter-ish SQLite database, I came across the idea of nested SQL statements. I noticed a limitation pretty early on, where I wanted to save the result
SQLite for webapps (the very basics!) I've been scared of SQL (and relational databases in general) for a pretty long time. The syntax has always felt clunky to me, and I feel like I'm using technology from 25 years
Trampolines are fun! (and other stuff too) I've been preparing for an intermediate Python talk I'm hoping to give in a few months' time, and along the way I've been discovering some new mini-design-patterns that look like they might come
Watercooling/Drowning the Snapdragon 810! After seeing LinusTechTips' video on watercooling the iPhone 6s, I decided to do some experimentation of my own! I've got a Sony Xperia Z5, whose processor is the infamous Snapdragon 810. This processor
Fixing the Camera App At the end of my last post I mentioned that although the root of my Xperia Z5 had gone pretty well, it (or possibly my unmentioned, failed attempt at installing the Xposed Framework)
How to Root Sony Xperia Z5 Make sure you don't have ANY data you want to keep on your phone before following these or any other instructions. Bear in mind that although the phone was rooted successfully, the default
TMUX Version Mismatch Just a quick hack/workaround this time: I set up a new Amazon EC2 instance last night, and decided to upgrade it from the default Ubuntu 14.04 to the latest version 15.
IF: Skipping Event-Handlers It seems like I'm overengineering the backend somewhat - surely I should just jump in and write usage code instead of worrying about exactly how events are going to be implemented? After the
Interrupt-Before and Conditional Events in IF I quickly sketched out an idea of how the interrupt_before method should work, and made some minor modifications to make the should_fire computation a bit more concise and readable: I also
Object-Oriented Events in IF Last post, I put forward the hand-wavey idea that contrary to typical object-oriented practice, Python would allow you to do something very like method inheritance. I wanted to see how easily my idea
IF and World Representation I've tried a few times to make a framework for Interactive Fiction (more specifically, text-based natural-language-controlled games). I've had some success, but I feel like each time, I've jumped into coding too quickly
Hal Overview and Design Principles Hal is an SMS-based information engine I designed and built at the AstonHack hackathon earlier this month. Since then, I've added a few extra features, done some major code-cleanup, and made the source
Updates and New Projects As you might have noticed, I've taken all of my lecture notes off this blog. Don't worry - I've got them all saved (plus a lot more in markdown format I haven't put
Cellular Automata The best-known automaton is probably Conway's Game of Life. It's a simple system which describes a game-board of cells: each cell can either be alive or dead. For each generation following the first,
My Working Environment It's been pointed out to me that very few programmers are willing to share advice about their setups, so I thought it might be a good idea to run through my regular environment
Current Project: μblog It's a pretty dumb name, but I like the double meaning. Recently I've been working on my first ever web-app. It's not an area I ever thought I'd be interested in, but I
flask Redirect after login with Flask Hopefully this will be useful for anyone in the same situation I was in a few hours ago - Google definitely didn't help with this one. If you want to redirect to a
python Python Gotcha: 'in'-Operator Precedence Here's a Python 'gotcha' I spotted in this StackOverflow question the other day. It's not something that's ever bitten me, but I thought it was interesting enough to write a quick post about.
chatroom TwistChat: Inline Messaging The chatroom now has a few new features, most important among them being its new name: TwistChat. Because, let's face it, Chatroom is not the most thrilling of names. (Plus, all the variations
hacking-team Hacking Team: Reading TFM Thanks to Transparency Toolkit, I've been able to have a look through the whole file-tree without downloading the whole thing. Now, with any luck, I'll be able to find some proper documentation. Side
hacking-team RCS phones home! My last post ended with a bit of a scare when the build script (written in Ruby) attempted to connect to a server called rcs-castore on port 433. Luckily, I didn't have rcs-castore
hacking-team Building Hacking Team's Code: Part 2 So in the last post, there was a whole lot of build output that suggested everything had gone well. But right at the end, make exited with an error; not anything to do
hacking-team Building Hacking Team's Code I left off the last post with saying I'd have a bit of a poke around. I didn't, however, imagine how difficult it would be. I decided that the best thing to do
hacking-team Taking a look at Hacking Team's Code Disclaimer: I'm super unqualified to comment on this code - I'm not a professional programmer, and a lot of the languages in the codebase are ones I'm unfamiliar with. Also please don't sue