Paste and WSGI

I'm hanging out on #pyblosxom on irc.freenode.net more often now that I'm hanging out on irc.freenode.net for work during the day. Zeth was on today and pointed out that if you're running PyBlosxom with Paste, then the default configuration doesn't allow for css and image files to be served.

This weekend, I wrote a media serving plugin for PyBlosxom which solves this issue, but I decided to spend some time to write a WSGI application to do the same thing and use Paste's urlmap to handle the routing. It took 10 minutes to throw together and it works nicely. I'll clean it up and throw it in the Trac instance tomorrow. Over time, I'm liking WSGI more and more.

Status 09/08/2007

I ordered a Seagate Barracuda Ultra ATA/100 drive from Amazon.com the other day and it arrived today. I opened it up to discover it's a PATA drive. However, I thought I ordered an ATA drive and not a PATA drive.... Long story short after an hour of researching and finally calling up a friend who does hardware work, I discovered that "they" renamed ATA to PATA so that it won't be confused with SATA. No one sent me the memo.

I was at Tag's Hardware in Porter Square (Cambridge, MA, USA) to buy Poly-acrylic for some shelves I'm putting up and they're selling decent bookshelves for $20.00. We bought one--it's pretty sturdy and it folds up for moving/storage/whatever. They probably have more left if you're in the area and interested.

I've been working through PyBlosxom stuff. I updated the web-site to use PyBlosxom 2.0-dev (in trunk). We worked through entry caching plans on the mailing list and implemented most of them. We've also been discussing and working through template variable syntax and semantics. I've been adding new unit tests and using tests to help work out the design issues. The testing framework has made it so much easier to do development work.

I've been writing a todo-list-tracking application in Django. I'm hitting a point where it's half-implemented, but I'm thinking I may switch back to Pylons because it's Paste-friendly and easier to deal with.

Bunch more stuff, but it'll be in separate entries.

Granola

My mother made great granola growing up. I think she got the recipe from her mother. I know my sister makes it, too--it's good stuff.

I keep losing the recipe, though, so I figured I'd post it in my blog. I'm not an aspiring chef, this isn't my hobby, and I don't watch the Food Channel. So... this is probably a once-only recipe blogging experience.

  • 4 cups - rolled oats

  • 1 1/2 cups - shredded unsweetened coconut [1]

  • 1 cup - wheat germ

  • 1 cup - chopped nuts [2]

  • 1 cup - unsalted hulled sunflower seeds

  • 1/2 cup - sesame seeds

  • 1 cup - honey

  • 1 cup - oil [3]

  • 1 teaspoon - vanilla extract

  1. Pre-heat oven to 325 degrees. I don't follow this step... I heat the oven to 300 degrees. However, when I moved in my oven had no markings on the dial so I wrote them in with a Sharpie and it's not clear to me that my markings match up with reality. YMMV, but the key is not to burn your granola.

  2. Mix all the dry ingredients in a big bowl. Sometimes I throw other stuff in, too--whatever I have lying around: flax seeds, wire-cut oats, extra sesame seeds, ...

  3. Heat the honey in a small pot and mix in the oil and the vanilla. You just have to heat it enough such that the honey and oil mix.

  4. Mix it all in the big bowl.

  5. Spoon the granola onto a couple of baking pans that are 1 inch deep and like 9x13. If they're cookie sheets you're going to have a hell of a time stirring the granola--it'll get everywhere.

  6. Spread the granola out so that it's not too thick anywhere.

  7. Put the pans in the oven.

  8. Every 5 to 10 minutes, take the pans out of the oven, stir the granola around and then put them back in. I swap which pan is on top and which is on bottom because my oven is hotten on the bottom than the top. Bake for no more than 30 minutes total.

  9. Your granola is done when it's toasty brown. Your granola is overdone if it's dark brown and/or black.

  10. I take it out, leave the pans on the stove to cool, and do some other stuff for 45 minutes. Then I take a spatula, break up the granola, and in the messiest possible way pour it into large yogurt containers.

Sometimes I throw in dried fruit like raisens in.

That's it!

Better Gmail plugin

I read on Voidspace about Better Gmail and figured I'd give it a try. It fixes one of the things I dislike about Gmail: lack of fixed width font on messages. I've gotten used to or around the other things I'm not wildly excited about, but lack of fixed width font when viewing messages is such a pain in the ass. Bugzilla emails come in and they're all screwy, emails from my stock broker come in and they're all screwy, emails from other people that involve text-based tables... they're all screwy, too.

Anyhow, Better Gmail has a Fixed Font option and it's awesome. I don't understand why the Gmail folks haven't added a fixed width font option to Gmail yet.

Home improvement projects

Since I got married and since we decided to stay in the current apartment for another year, I've been involved in a bunch of home improvement projects to neaten things up, clean some stuff out, re-organize, and build some furniture to make better use of space. I've finished a set of shelves to replace one of the desks I had. I'm in the process of building a small set of shelves to go above the counter to use some vertical space in the kitchen for storage. I'm thinking about building another set of shelves.

My brother-in-law uses Google Sketchup to do his drafting. I had a look at it a couple of days ago and what he's done with it and it's pretty wild. My problem, however, is that I'm running on Linux and I have a preference towards Free Software and Open Source. Partially because I'd like to share my plans with other people in non-proprietary formats and partially because I stand a better chance of fixing things when they go wrong.

Does anyone know of 3-d modeling/drafting/basic CAD software similar to Sketchup that works in Linux?

As a side note, it turns out I have the same estimation problems with home improvement projects that I have with programming projects. Irritating.

Google Summer of Code 2007: PyBlosxom ... finale

I mentored Z who was working on pyblosxom-webfront which is a web-based interface to your PyBlosxom blog.

Overall I'm pretty happy with the project. I had a pretty chaotic May and June that definitely affected the first half of the project, but Z and I had a few chats just before the second half and ironed most of the issues out.

While he was working on webfront, I rolled out PyBlosxom 1.4 (and 1.4.1 and 1.4.2) which have support for Paste. Paste makes writing plugins and testing them _so_ much easier. Z also worked out some problems with making complex plugins. We should look into refactoring the comments plugin accordingly.

From here Z says he'd like to continue working on webfront and maintaining it. There are a bunch of things that it's missing, but it's a good platform to build on and it was a good experience to work with him to get there.

Thank you Google!

Migrating tickets in Trac to bugs in Bugzilla

I spent a large portion of the last few weeks at PCF building a migration script to migrate tickets from our Trac instance to bugs in our Bugzilla instance.

I started writing SQL scripts, but then it got too hairy because there are a bunch of Trac ticket fields that have no constraints and translating them to Bugzilla equivalents required mappings and temp tables ... I abandoned that approach pretty quickly and wrote the migration script in Python.

The outcome of the migration is pretty decent. We've spent time fixing the data in Bugzilla after the migration, but I don't think there's a way to do a perfect migration because of the nature of the two bug systems.

I thought the project was interesting and mentioned it to a few people. The most common thing people respond with when hearing I was working on migrating our bug data from Trac to Bugzilla is, "What??? WHY?!?!" and their eyes would open wide with shock. I think Bugzilla has an undeserved bad rap.

The scripts are here if anyone else with similar plans is looking for them.

As a side note, the Python Database API specification PEP is fantastic--thank you to everyone who contributed to it!

Athlon XP on the side of the road

Last night, S and I were walking to meet some friends at the crepe place when I spotted a black mini-tower with a "free" sign taped to it. I looked at it and it had been hand-built and had case fans with LEDs. I figured that's kind of interesting. So I picked it up and brought it home.

Needless to say we were late to meet the friends. But the next day (today), I took a better look at the machine (i.e. I plugged it in and turned it on). It's an Athlon XP 1800+ with 640 MB of RAM (or something like that). I figure I'll slap one of the half-dozen hard drives I have sitting around in it and use it as a spare build machine or something along those lines. The things you find on the side of the road....

Betahouse -- coworking environment

I'm working for PCF (w00t!) and they're based in Worcestor, MA, so I've been telecommuting. A friend of mine helped start a co-working place a few months back and a couple of weeks ago I joined as a part-time renter. Long story short, they wrote about us in the Boston Globe. The article is a little funny in that it makes it sound like some big fancy thing, but really it's a couple of rooms with desks where a bunch of people work. I wasn't there when Carolyn came in and interviewed people--I was on my way to Oregon for a family reunion.

At Betahouse, I've been sitting at a desk in what I've decided to dub the Python room. It's myself, Nate Aune and another person whose name escapes me who also works for Jazkarta.

It's been exciting and they have a much faster internet connection than I do at home. Can't beat that.

PyPI, Cheesecake, and such

I'm really late to the PyPI party. Both of the projects I've worked on over the years are in PyPI, but neither are up to date and neither support easy_install.

Figured I'd update them now. Three things I bumped into while working on Lyntin:

  1. the PyPI tutorial is good and walks you through what you need to know,

  2. the list of classifiers <http://cheeseshop.python.org/pypi?%3Aaction=list_classifiers>, and

  3. the Cheesecake folks have scores for all the PyPi modules

That last one is kind of interesting. You can see the scores and the Cheesecake log output.