“You know what truth is? It’s some crazy thing my neighbor believes. If I want to make friends with him, I ask him what he believes. He tells me, and I say, “Yeah, yeah – ain’t it the truth?”

  • Accessing the Child Class In Django Multi-Table Inheritance

    Django has 3 different ways to deal with model inheritance: Abstract base classes Multi-table inheritance Proxy models The differences are described pretty well in the linked documentation so I am not going to recapitulate them here. I just want to talk about a specific pattern I have been playing with for Multi-table inheritance. In Multi-table…

  • Oversampling Canvas for better quality

    The html5 canvas is a very fast and simple immediate mode graphics system, but unfortunately the image quality (especially text rendering) is often lacking. A quick and easy way to address this is to oversample the canvas.  This works by making the internal size of the canvas a multiple of the size you want it…

  • Rorschach Test

    I’m not personally a fan of either Ron Paul or Thomas Friedman, but I think these two videos are interesting as some kind of Rorschach test of your feelings about national security. Ron Paul: Ron Paul Ad   Tom Friedman Tom Friedman on Charlie Rose  

  • The Grok Point

    Whenever I have a significant programming task to complete I usually begin the process not by thinking about all the data structures I want, or how the output will look, or what will the biggest concerns for efficiency etc. What I am usually doing at the start is trying move as fast as I can…

  • Doing what you aren’t supposed to do with Django tests

    So I wanted to run my django test scripts against my development database. The django test system really wants to create a database from scratch but I wanted to see whether I could run against my local scratch copy since its already got a lot of data in it and I am too lazy to…

  • No Virgina, there is no such thing as Write Once Run Anywhere

    I think the first time I heard “Write Once Run Anywhere” was the uscd-p system pascal. From Wikipedia: UCSD p-System achieved machine independence by defining a virtual machine, UCSD p-System began around 1974 as the idea of UCSD’s Kenneth Bowles[1], who believed that the number of new computing platforms coming out at the time would make it…

  • Making a nice little Netbook

    Step 1: Get an Acer Aspire One I got mine at Costco, last time I was there they were on sale/instant rebate. Model D255E Step 2: Add Ubuntu Natty Narwal I went with splitting the disk in 1/2 because its pretty big and If I want to punish myself I can still run windows 7.…

  • The other reason why Fixed Rate Contracts suck

    You have a prospective client and you are discussing the project. Often the client would like you to quote a fixed fee for the work, so maybe you think thats ok and come up with some number by using a fancy estimation tool or tossing chicken bones. It really doesn’t much matter, something is likely…

  • Django Logging Setup

    Post 1.3, Django has some nice integration with the python logging module. It can dictConf to specify the formatters, handlers, etc. This is all pretty well documented here. What wasn’t immediately obvious (to me anyway) was that you can use any of the handlers in django logging and pass the __init__ params to them in this config. So for…

  • PySide + PyInstaller = Joy

    I have a small project to make a pretty simple windows GUI executable. In the past I have always used wxpython + py2exe for this kind of thing but decided to try something new. After some poking around I settled on PySide which is the bindings for QT from Nokia. Its nice. Seems a little…