Minority Opinions

Not everyone can be mainstream, after all.

Archive for June 2012

Parametric unittest cases

leave a comment »

I recently ran into a test case that was unexpectedly failing.  Worse, it wasn’t entirely obvious how, because the case in question contained a loop.  Cleaned up, the test case resembled:

def test_username_punctuation(self):
    for char in self.punctuation:
        self.reset()
        self.do_stuff(char)
        self.assertSomething()

Not all of the punctuation characters were failing, but it wasn’t trivial to see which ones were.  This is a case where nose’s generator tests might have come in handy, except that it’s in a TestCase class.  One that gets subclassed a few times, to ensure that certain API interfaces work identically.

Read the rest of this entry »

Advertisements

Written by eswald

26 Jun 2012 at 5:42 pm

Posted in Python, Technology

Cheese Soufflé

leave a comment »

I couldn’t decide what to make for breakfast this weekend, so I searched through recipe books.  Sadly, our Fannie Farmer cookbook doesn’t have a breakfast section, but it does have an Eggs & Cheese chapter.  That’s where I found this recipe, with an ingredient list that sounded reasonable.  Not until halfway through did I realize just how many steps it takes, how many bowls it uses, and how long it takes to bake.  It was my spouse, when I finally admitted what was in the oven, who brought up how easy it is for a soufflé to fall.

Read the rest of this entry »

Written by eswald

16 Jun 2012 at 8:45 pm

Posted in Food, Lifestyle

Unnecessary Warnings

leave a comment »

On my way to work this morning, a pair of children, apparently siblings, were talking to each other in a front yard.  The younger idly swung a shovel, and picked something off its tip.  As I cycled by, it took effort to suppress a warning of “Careful.”

Parenthood is seeping into my brain.

Written by eswald

12 Jun 2012 at 4:39 pm

Posted in Lifestyle

VCS Complaints

leave a comment »

When I think of everything I had to learn for my first job, it’s somewhat amazing that I survived the summer at all.  In addition to Perl, emacs, pine, and HP-UX, I first used CVS there.  Fortunately, my commits were limited to a few files that never moved, and were rarely edited by anyone else.  Only later did I discover its warts.

Read the rest of this entry »

Written by eswald

5 Jun 2012 at 10:39 pm

Posted in Technology