Tagged in


Rant-driven Development

Python TDDers: Can we please, as a group, stop doing this:

class MyFunctionTestCase(TestCase):
    """Tests for MyFunction."""

    def test_does_thing_correctly(self):
        # given
        <setup code>

        # when
        <do some stuff>

        # then
        <assert some stuff>

Pretty please? It violates what I'm going to call Binns's First Principle of TDD, which is:

Do not make …

Useful Enums for Django

I published my first package to PyPI today. Which is odd, considering that I've been developing stuff in Python for over a decade.

I decided, after doing a bunch of work on various projects, that I needed to scratch a particular Django-related, itch. Namely, that of choices:

    (0, "My …

Do Not Feed the Pelicans

I've not used this blog for a while, but I keep needing somewhere to dump dev / tech / Python / whatever stuff that's floating around in my heads so that I can see it properly, and that's exactly why I set this blog up in the first place.

Since I'm not so …

Pythonic Confessions

So, I have a confession to make.

Many years ago, I had an job interview with Canonical. This was, I think, my second interview. The first had gone well, and the second had been postponed because the original interviewer scheduled to talk to me kept forgetting.

Luckily, I got a …

sdroW tsegnoL

After yesterday's bit of fun with Python and the English dictionary, the thought suddenly popped into my head:

There are eight six letter words in English whose letters are in alphabetical order. But what about reverse alphabetical order?

Luckily, the change was a simple one. If you pass --reverse to …