Will's blog

purpose: Will Kahn-Greene's blog of Python, Linux, random content, PyBlosxom, Miro, and other projects mixed in there ad hoc, half-baked, and with a twist of lemon

Page 1 of 20  >> (less recent)

Tue, 30 Sep 2008

Bad code: Part 1

If you're writing code like this:

try:
   foo = somevar.getBlah()["xyz"].split(".")[-1].decode("ascii", "replace")
except:
   pass

Please stop! You're killing the rain forest!

Sat, 06 Sep 2008

Long strings in Python

In Miro, we've got long strings that are displayed in the user interface. I think the code that defines these strings is messy and hard to parse. For example:

def some_func():
    description = _("""\
This is a really long description that has multiple sentences and a few \
things that need to %(getfilledin)s and it goes on and on and on and on \
and I'm not really sure what's the best way to format it so that it's happy \
in editors and easier to parse.""") % {"getfilledin": blahblah}

PEP-8 doesn't address this, which is fine. I was curious to see what other projects do.

Thu, 21 Feb 2008

PCF is hiring Python developers

The company I work for is looking to hire a few able Python developers. Instructions and details about the job are on the PCF jobs page.

This is the best job I've ever had. I get to telecommute which really works for me. My co-workers are all able fantastic people. The mission is really important and affects everyone. The work that we're doing is FOSS and we're working with and contributing to other FOSS projects. I've covered the board in terms of projects from bug fixing, to adding enhancements, to debugging upstream components, to Ubuntu packaging (which I need some more practice with), to test systems, to Firefox 3 patches, to Firefox plugins, ... I've also had my hands in Bugzilla adjustments, infrastructure, build systems, ... It's been challenging and interesting ever since day 1.

I've also been meeting a lot of people I otherwise wouldn't have met: Chris Blizzard and John Ressig at Mozilla, SJ at OLPC, Holmes Wilson at Downhill Battle, Asheesh at Creative Commons, and others. It's exciting.

That's my experience at PCF in the last 6 months. If you're looking for a telecommuting Python development job, think about applying.

Firefox 3 enclosure support

I spent almost my entire January adding better support for RSS/Atom enclosures to Firefox 3. I wrote more detail on my work blog.

Sun, 10 Feb 2008

PyBlosxom status: 02/10/2008 and GHOP thanks!

I overhauled the PyBlosxom web-site so that it's now being statically "compiled" using PyBlosxom's static renderer. The whole thing is checked into SVN, too. That's a huge improvement from the previous situation, but the web-site could use user-interface and navigational work.

In doing that, I did a lot of futzing with static rendering using the code in trunk and fixed some issues. I also thought through the filelist implementation and re-worked it so that it handles sorting and truncating better. The results are really nice and I think it fixes all the major problems previous versions had.

GHOP was a big help. PyBlosxom had several tasks that were worked on and the results speak for themselves:

It was a huge help that these people did for PyBlosxom. I haven't fully absorbed their work yet, but it should happen before PyBlosxom 2.0 is released. Many thanks to those of you who helped out and many many thanks to Google and the GHOP, PSF, Titus, Doug, Georg, Leslie and all the others who helped make this possible. Thank you!

There are a few big things that still need to be done for PyBlosxom 2.0. I'm moving through it slowly and methodically. I was hoping to have it done by the end of December, but I'm thinking now it's going to be the end of March or thereabouts.

Thu, 10 Jan 2008

The release hat-trick!

I mothered the Miro 1.1 release earlier today. Then I decided to push out PyBlosxom 1.4.3 which I have been sitting on for a month. Then after talking with "paulproteus", I decided to go for the hat-trick and released Lyntin 4.2 as well.

w00t for releasing three software thingies in one day! Boo for sitting on two of them for extended periods of time.

PyBlosxom 1.4.3 released!

I released PyBlosxom 1.4.3 with better support for WSGI and Paste and support for template variables of the form $(foo). More information on the PyBlosxom web-site.

Lyntin 4.2 released!

It's the last release I do for Lyntin. It's got some new functionality, some bug fixes and I upgraded the license to GPL v3 or later. More on the Lyntin web-site.

Wed, 12 Dec 2007

Pretending to add new files with cvs

I was throwing together a patch for Firefox 3 and needed to add some files to CVS but I don't have add privs. If I don't add the files, then they don't show up in the diff. After a Google search, I bumped into fakeadd which tweaks the Entries file so that the new files show up in the diff. No clue if that's a good thing, but it certainly fixes the problem I was having.

Thu, 06 Dec 2007

Nose and coverage

I'm working on improving the PyBlosxom testing situation and in the process of doing that ran into a problem with nose (version 0.10.0) and coverage (version 2.77). Both installed with easy_install.

When running:

nosetests --verbose --with-coverage --cover-package=Pyblosxom --include unit
nosetests --verbose --with-coverage --cover-package=Pyblosxom --include functional

I bumped into the problem described here (nose.python-hosting.com) and here (code.google.com). The solution is to either:

  1. remove coverage.py from /usr/bin, or
  2. change the filename from /usr/bin/coverage.py to /usr/bin/coverage

Page 1 of 20  >> (less recent)

pyblosxom::2.0 dev

All contents Copyright 1996 to 2008 Will Guaraldi.
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.