Doctrine - difference between bindValue() and setParameter() on prepared statements


Doctrine project logo.

This pissed me off and I couldn't figure out what I was doing wrong. So I'm blogging about my ignorance. Imagine you're using Symfony and Doctrine to access a database. You are using prepared statements to prevent any SQL injection problems. There are two main ways of doing this - and they disagree about how […]

Continue reading →

Some thoughts on "Hacking the Cis-tem"


Black and white photo of the Queen Mother pressing a button on a 1960's era computer.

I recently read a wonderful paper by Mar Hicks called "Hacking the Cis-tem" which is about database design in the 1960s and the nascent digital state's approach to transgender individuals. It's a short and readable paper with some jaw-dropping anecdotes. Like the man who immediately got a pay rise after his transition, despite working in […]

Continue reading →

How do you store numbers with leading zeros?


Binary code displayed on a screen.

I am very interested in your opinion on this. Imagine that you work at a company which sells widgets. Each widget has a unique serial number. The number is a fixed length, and can contain leading zeros. That is, the following are all valid identifiers: 00001 01010 12345 What data type would you use to […]

Continue reading →

Civic Hygiene


Trans pride flag.

Imagine, just for a moment, that the Government wanted to keep a record of everyone's sexuality. They need to know this detailed demographic data because it will be highly useful in civic planning. It will help them work out what provision needs to be made for sexual health services, how many children are likely to […]

Continue reading →

Open Source Shakespeare (in MySQL)


My good friend Richard Brent has often complained that my blog has very little Shakespeare content. Despite the domain name, I don't think I've ever blogged about The Big S. For shame! Fear not, my Brentish-Boy, this post is all about Shakespeare. And MySQL.... Ahem... When I first started shkspr.mobi it was intended to be […]

Continue reading →