Tim Hatch

Weblog | Photos | Projects | Panoramas | About

Squashing a bug 17 Jul, 2010

I spent half of yesterday tracking down a particularly pesky bug that’s existed since before I started working here. There was a big workaround that I added a year ago that fixed the symptom because we didn’t see root issue, and that workaround broke yesterday. In the end it was a one-line fix, and the bug was caused by f calling g(a1, a2, a3, a4) which then did a4.append(...) and f had a local variable that referenced a4[-1]. It felt a little bit like the proverbial piano tuner (f is 200 lines and g is 170).

Fix totals section (and others) on multi-customer receipts

 CHANGELOG         |    2 +-
 src/parser.py     |   24 ++----------------------
 src/rparse.py     |    1 +

That sort of diffstat makes me happy.