The other day, I came across slides from a talk on hacking unicode, that is,
using UTF-8 encoding edge cases to inject unexpected code. This post discusses
one of the issues mentioned in the talk, and explores
As mentioned in the talk, the UTF-8 spec seems to allow multiple
This morning, I decided to try to install Python 1.0. I wanted to get a
glimpse of where the language came from, how it's grown, and what it
was like in its early days. I figured an earlier version would probably be a
little simpler, and perhaps the ...
Recently came across an error trying to run gunicorn in supervisor. A command that
worked perfectly when run on its own failed when launched through supervisor. This
manifested as a repeated error stating that the port was already in use:
2014-03-07 14:25:09  [ERROR] Connection in use: ('127 ...
I just figured out how the descriptor protocol works. It is not the most
intuitive part of python, but it allows for some cool constructions. Just
as a way of writing down what I've learned so I remember it. Say you have
a class that you're trying to ...
For a while now, my rstgo module has been broken. It kind of still rendered
go diagrams, but sometimes (usually), simple stones without annotations would
just show up as big white or black rectangles. This was particularly evident
in my own blog post, reST Go Diagrams Implemented.
I just submitted a talk proposal to DjangoConEU. This is a conference being
held in Warsaw. The talk is on making django tests faster and more effective.
The goal is to give attendees a bag of simple, effective tricks for speeding
up their test suites and, in the process, their ...
One of the best ways to improve your development process is to pay attention
to how the process is currently working, and where the points of pain are.
This is a complex process that involves everything from discussing how
developers feel about the process, to understanding when and how communication ...
Just a quick note to say that my company, MetaMetrics just released
django-hotrunner on BitBucket. django-hotrunner was written to
scratch our development team's own itches around running django tests. It's
a small module which provides a drop-in replacement for Django's test runner
which adds some new functionality ...
I was talking with my coworkers Jeff and Randy yesterday about some work
Randy was doing implementing a finite state machine in django, and I was
reminded of a pattern I've previously used to implement state machines
using Python's dynamic typing to do it.
Happy 2012, everyone! After a long hiatus, Stylish Programming in Python is
back. In Part 0 and Part 1, we built a program to convert kilograms
to pounds, and then cleaned it up so that the code and the interface clearly
communicate its functionality to both ...
I just imported a bunch of old posts from my old Wordpress blog.
Pelican has a pretty spiffy import facility that builds on pandoc to
convert a wordpress export to the appropriate rst files to create pelican
posts. Comments have been lost in the process, but I wanted to keep ...
Today is so-called Black Friday. I'm planning on saving a lot of money
today. In fact, if you're going shopping today, I'm pretty sure I'm going
to save more money than you. Why? Because I'm not buying anything. I
just read a comment on Facebook ...
This is the first part of a tutorial on how to write well structured
programs using python. It is intended for novice programmers who have some
familiarity with python, and have perhaps written a couple of small scripts
on their own. I will not be explaining what ...
My big accomplishment at the gym on friday was that I missed a snatch at 58
kg. I went into the gym on Friday excited about training after my Crossfit
Total, but still a little bit sore, so I wasn't expecting to set any
new records. But I also ...
The go diagram rendering I was working on a couple weeks ago is functional
now, at least on a basic level. It can show full or partial boards. I'm
currently rendering the image as a data URI, because it looks like the
ability to figure out where to save ...
Saturday was the grand opening of Crossfit RTP, which is a new gym where
a few of my friends will be coaching. I rode my bike down there (about 9
miles) to check out the space, and play with their equipment.
Yesterday was an exciting day for Oakwood Community. First, we got profiled
in Dirty Durham which is an excellent blog which discusses community
initiatives and local politics around town. We've been grateful for all the
support an encouragement we've gotten from people around town.
A couple nights ago, Jayme and I had a goal-setting conversation with one of
the Oakwood Community interns, Tyler, to figure out what he wanted to get
out of his year with us, and how we could help him get there. One of the
things he expressed was that he ...
With six people living in our house and only two cars, we have a lot of bikes at Oakwood Community. For the past few months, we've been stashing the bikes wherever we can. Jayme and I have a double-decker bike rack in the front ...
As of today, I am switching my blog over to use Pelican, which is a static blog generating tool written in Python. What that means, is that I don't have to write blog entries in Wordpress. It means that my blog can be hosted anywhere, and it means that ...
There's a pattern I see fairly often in code where someone uses a
function that returns a sequence of some sort, filters it, and then
wants to use the first result that matches the filter. It looks
something like this:
I've been working on my olympic lifts for the last couple months. In
July, I set a goal for myself to get my snatch up to 135 lbs. I had one
day where I got 125 lbs, and worked pretty hard on 130 lbs, but just
couldn't catch ...
This past week, my beloved and I were given the opportunity to train
with Nick Horton and the folks at PDX Weightlifting. Nick was
gracious enough to let us lift with them while we were in town, and even
spent quite a bit of teaching us the lifts, and coaching ...
Often, when designing interactive websites, you want to have elements
that look like links, but submit POST requests, because they modify some
data on your website. Maybe it's a delete link. Maybe it's a "Like"
button. Today, I just stumbled across a dead easy way to do this ...
It just came to my attention that psycopg2, the python driver for
PostgreSQL database has a website again! For several months (years?)
the site was unavailable, except for an plaintext rant about the
author's ire toward Trac. Now it has several pages of nice-looking
sphinx documentation. I haven't ...