Meme

November 25, 2008
Posted in Code.
5 comments

Today, Eric Florenzano is trying to start a code meme.

Rules are quite simple:

Implement a program that takes in a user’s name and their age, and prints hello to them once for every year that they have been alive.
Post these rules, the source code for your solution, and the following list (with you included) on your blog ...

My Python Gems

November 05, 2008
Posted in Code.
1 comment

I loved reading both of the Eric‘s blog posts and I suggest you check them out. I’m always on the lookout for little tricks or “hidden” features of Python, and I thought I would toss a few of my favorites into the hat along with what they’ve shared.

1. Merging 2 dictionaries

Here is how I merge ...

Django: Excluding Subclassed Objects

September 17, 2008
Posted in Code.
0 comments

Model inheritance is a good thing, right? I think so, except when it’s been one of those days. You know the kind, the days where laziness rules, there isn’t enough coffee to keep you going, nothing seems to work and because of the aforementioned, motivation wanes.

About 30 seconds into writing a view, I nearly scrapped my DB ...