Tuesday, January 26, 2010

Black out

I've been a bit slack and have yet to black out my website or avatar to protest the Australian government's mandatory Internet censorship policy.

In case circumstances prevent me from doing so, please read the Internet Blackout Australia website to see why it's so important. You might also want to read Hugh Blemings' well-written thoughts on the matter.



Monday, January 25, 2010

Electronic book reader?

On my other blog, I ask about electronic book readers. Recommendations greatly desired.

Tuesday, January 5, 2010

Python testing goodies

Just found out that there's a PPA with the latest releases of a whole bunch of Python testing goodies, including:
  • testtools - Extensions to unittest that make real extensions possible
  • testresources - Safely re-use expensive resources in tests without paying massive set-up costs
  • subunit - Manipulate, exchange and analyze test results without writing code
  • testscenarios - Run the same tests against many different implementations
If you are running Ubuntu 9.10 or later, then sudo add-apt-repository ppa:subunit will add it to your apt sources.

We're starting to grow a lot of useful, small testing tools that become even more useful when combined. I really like the "small pieces, loosely joined" approach, but sometimes that can make deployment & dependency management a colossal pain. Happily, Ubuntu, Rob and Launchpad PPAs to the rescue.

Wednesday, December 16, 2009

testtools 0.9.2 released

I've just released testtools 0.9.2, which I firmly believe is the best testtools release ever. Thanks very much to Robert Collins and Benjamin Peterson for making it so.

For the last few releases, we've been working on being more than just a simple aggregation of existing unit testing best practices and tried to do our own experimental extensions.

These extensions aren't actually all that exciting by themselves. We haven't added better logging support or new types of outcomes or test replay or smart rendering of error results or anything like that. I'm pretty sure testtools will never do those sorts of things.

Rather, the extensions we've added are designed to let you do that, and then share your extensions with other people without getting them into the standard library's base unittest classes.

If you are using testtools, you can change the way TestCase.run() works without overriding run and without figuring out how to safely call user code. You can handle exceptions raised from tests however you'd like — again not needing to change TestCase.run(). You can add new, rich types of assertions without having to modify some base class somewhere. You can store information on a test object that can be used by a sufficiently smart TestResult, which can be handy if you want to see, say, access logs for all failed tests.

Of course, all this starts to get really powerful when testtools is in the standard library, and all of the other major Python test frameworks inherit from it: nose, py.test, zope.testing and Twisted Trial.

Even so, it's worth switching to testtools today, just for the assertion logic alone. All it takes is changing the base class of your test cases to testtools.TestCase. If your test framework supports running standard Python unit tests, it'll support testtools.

Saturday, November 28, 2009

Lean Lean

Ever been confused by people saying "this is Lean" or "that is Lean" or "we should actually be using a cyclometric value-stream set-based burndown kanban for this"? I have, so I thought I'd write a quick pared-down cheat sheet to explain exactly what Lean is. A lean version of Lean, if you will.

At the very least, Lean is seven principles which, we're told, we should apply to making software.
  1. Eliminate waste
  2. Amplify learning
  3. Decide as late as possible
  4. Deliver as fast as possible
  5. Empower the team
  6. Build integrity in
  7. See the whole
The first principle is fundamental.

List taken from Lean Software Development.

Friday, November 27, 2009

How to ask an open source project to do something

This isn't exhaustive, but I think there are two ways to ask an open source project to do something:
  1. I want X. You should do X.
  2. I want X. How can I help do X?
I have no data, but I think that asking the second way is what makes open source actually work.

Thursday, November 26, 2009

To do: To dos (Palm Prē)

You might already know that I have a lot of lists on my computer. I may have mentioned once or twice that I have such lists. These lists are connected to a certain popular productivity system which isn't really about productivity and is a little bit like a cult.

I might have also mentioned that I've been longing for a "smart" phone, partly so I can have these lists with me at all times, to clutch at reflexively like some Popish talisman.

Now that I have a Palm Prē I have lists and a smart phone, and yet one does not know the other. I am at a loss as to how to get my lists — line-separated text files on my laptop — onto the Tasks application on the Palm. Even then, once they are on the Palm, I have no idea as to how to get them synchronized with something I can edit from my laptop.

Any ideas?