Brad's Blog

web dev, django, running, food, or whatever

Published: 2008-08-08

The Apple Dock is a Mirror!

Fun Mac

I guess I'm still a relatively new Mac User, but I consider myself fairly technical and probably more savvy that your typical Mac user (though there are a lot of mac users who are far more savvy than I!)Imagine my surprise when, while working tonight, I discovered that the Dock in Leopard is a Mirror! Yes, I'd noticed the reflection of the Icons, but tonight, I actually saw my cursor (in Terminal) moving as I typed... that ...

Published: 2008-07-30

PHP is chopping off my Access Memo Fields

I've got a few simple web forms that use PHP to read and write to an Access database (running on IIS), and I just spent the last few hours frantically trying to figure out why some of my Memo fields were being truncated around 4000 characters. I know Memo fields "should" be able to contain up to 65536 characters, and I could verify this by inserting data directly into the database. However, when querying the database through PHP (using ...

Published: 2008-07-16

Django: Generating an Image with PIL

I've been reading through the Django Book, and in chapter 11 they talk about generating non-HTML content (such as PDF files, Images, RSS/Atom Feeds). They mention using PIL to generate images, but they don't give an example. So, I thought I'd post a simple example View that generates an image.def pil_image(request): ''' A View that Returns a PNG Image generated using PIL''' import Image, ImageDraw size = (100,50) # size of the image to create ...

Published: 2008-07-15

The Structure of a Django App

Programming Python django web

Previously, I'd lamented the difficultly present in choosing an web development framework. I'd worked through several symfony tutorials, and though I could see the benefits down the road, it just didn't feel right to me (yes... "feel" is a technical drawback).So, I checked out a copy of Django, and I haven't looked back. If you're the least bit proficient with python, and you need to build a database-driven web site, USE DJANGO! They have ...

Published: 2008-07-12

Why Bluetooth headsets didn't catch on in the '90s

Fun Hardware

Published: 2008-07-11

Games for Kids: dodger

Apps Games Python pyglet

I've always thought it would be fun to build video games, and when my daughters were born, I knew I would eventually want to build some simple games that they could enjoy while they're young. My original attempt at this lead me to pygame, and the result was a simple alphabet/number game that plopped letters and numbers on the screen (very similar to AlphaBaby, but not nearly as good!). Unfortunately, I never continued to develop that one ...

Published: 2008-06-25

Mac OS X, Python, and Fink: Playing Nicely Together

Fink Mac OS Python X

Since upgrading to Leopard, I've been using Mac's default install of Python (which is 2.5.1). For the most part it's worked well for me, namely because I've installed additionaly packages either using Mac installers or through easy_install. I recently needed to install python-ldap which didn't work using easy_install. So, I turned to Fink.Unfortunately, Fink wanted to install it's own version of python (2.5.2) as well. (I say unfortunately only ...

Published: 2008-06-17

Lions, Tigers, and Web Development Frameworks, oh my!

Javascript Programming Python php web

Apparently I've stumbled upon a problem that has recently faced many web developers. That is, I would like to adopt an open-source web development framework for mid-sized project. Well... searching that phrase only yields 200,000+ results. So how does one choose?I guess Ruby on Rails sparked the whole "Web Development Framework" movement (among other things). I've typically used PHP for my web-based projects in the past, but over the last 2 years, I've also become ...

Published: 2008-05-24


I've recently started running Folding@Home. This project (out of Stanford) has been around for a number of years, and apparently they're still going strong! They simulate the way that proteins fold (or assemble themselves t) in order to investigate diseases that occur when the proteins don't fold correctly. Check out their link for more info.Anyways, I've got these computers, so why not do something good with them while I'm not using them! Here ...

Published: 2008-05-20


Fun Image Python

Occasionally, I need to crop some images. I suspect this happens to a lot of people, and they simply use their favorite photo editor to perform the task. For a few images, this works just fine. Plenty of people have Photoshop, the Gimp, or even iPhoto. This past weekend, however, I found myself needing to crop about 1000 images, and I need to do it quickly. This was more than my machine could load into the Gimp at once. Even ...