George V. Reilly

Review: The Ax

Title: The Ax
Author: Donald E. Westlake
Rating: ★ ★ ★ ★ ½
Publisher: Grand Central Publishing
Copyright: 1997
Pages: 352
Keywords: crime, dark humor
Reading period: Nov 7, 2015

Burke Devore is a middle-aged middle manager at a paper mill, who’s been laid off for some time. There are too many others like him and they’re beating him out for the few positions in his field. In des­per­a­tion, he decides to eliminate the com­pe­ti­tion by placing a fake job ad­ver­tise­ment for others with similar skills and by killing them off.

Westlake is known for a variety of crime novels, including the light-hearted, humorous Dortmunder books. There’s humor here, but in a very dark vein, and social continue.

History of Toilet Paper

Let me tell you, people go on and on about what a great idea electricity was, but I'm going to put toilet paper right next to the wheel and say those are the best ideas anyone's ever had. Scoff at it if you will, but try living for two millennia without it and then we'll talk. - Kevin Hearne

At Freely Speaking Toast­mas­ters tonight, Kim gave a talk on the History of Toilet Paper. It was inspired by the quote above from the Iron Druid Chronicles, by a 2000-year-old druid.

She got much of her in­for­ma­tion from wikipedia. I found the toilet paper FAQ while writing this post.

At FSTM, after the speech evaluator gives the speaker a formal evaluation, we have five minutes of open evaluation from the audience.

My father has a hundred or so sayings that he trots out again and again and again—much to the annoyance of those who know him well. When he moved from the Dublin to the London office of his bank in the


Christmas Puddings

I spent a couple of hours this evening making Christmas Puddings. I soaked several pounds of dried fruit overnight in hot water with a little whiskey. The fruit plumped up con­sid­er­ably. I let it drain throughout the day.

The photo shows the puddings in their bowls just before I sealed them and put them into the oven for four hours of steaming. They’ll get another four or five hours tomorrow. When we’re ready to eat one, it’ll get another hour of steaming to heat it up. We decant it from the bowl, stick a sprig of holly in the top, heat a tablespoon of whiskey until it catches fire, and pour the flaming continue.

Python Print Formatting

On Stack­Over­flow, someone wanted to print triangles in Python in an M-shape. Various clumsy solutions were offered.

Here’s mine which uses the left- and right-jus­ti­fi­ca­tion features of str.format.

Putting them together:

>>> WIDTH = 4
>>> for a in range(1, WIDTH+1):
...     print("{0:<{1}}{0:>{1}}".format('*' * a, WIDTH))
*      *
**    **
***  ***

Handy references: continue.

Review: Star Fall

Title: Star Fall
Author: Cynthia Harrod-Eagles
Rating: ★ ★ ★ ★
Publisher: Severn House
Copyright: 2015
Pages: 256
Keywords: mystery, police procedural
Reading period: Nov 28–Dec 3, 2015

Rowland Egerton, star of a popular antiques TV show, is found murdered in his London home. When Detective Inspector Bill Slider and his team in­ves­ti­gate, they uncover sordid secrets unknown to the British public.

This was a witty and en­ter­tain­ing police procedural, showing both the working and home lives of Slider and team.

Review: Grace of Kings

Title: Grace of Kings
Author: Ken Liu
Rating: ★ ★ ★ ★
Publisher: Saga Press
Copyright: 2015
Pages: 614
Keywords: fantasy
Reading period: Oct 1–Dec 2, 2015

Loosely modeled on the rise of the Han dynasty, Ken Liu’s fantasy tells us of two men who rise up to challenge the emperor. Kuni Garu, the wily and wise one-time bandit, and Mata Zyndu, the warrior scion of a deposed noble clan, are friends initially but fall out. The gods are at play in the affairs of men and they take pleasure in causing trouble and strife.

I enjoyed the novel, but I disliked the pace at which Liu galloped through events.


Microsoft Natural Keyboard 4000 on Mac OS X 10.11: Alt/Windows key no longer swapped

When I upgraded my home and work MacBooks to OS X 10.11 (El Capitan), the single biggest annoyance for me was that my external keyboards, all Microsoft Natural Keyboard 4000s, no longer swapped the Alt & Windows key.

By default, when a PC keyboard is plugged into a Mac, the Alt key, which is im­me­di­ate­ly to the left of the spacebar, is mapped to the Alt/Option key, which is two keys left of the spacebar on a Mac keyboard. And the Windows key, which is two keys to the left of the spacebar on a PC keyboard, is mapped to the Command key, which is next to the spacebar on a Mac keyboard.

On a Mac, continue.

Explaining the epilog of fnmatch.translate, \Z(?ms)

I was debugging a filtering directory walker (on which, more to follow) and I was trying to figure out the mysterious suffix that fnmatch.translate appends to its result, \Z(?ms).

fnmatch.translate takes a Unix-style glob, like *.py or test_*.py[cod], and translates it character-by-character into a regular expression. It then appends \Z(?ms). Hence the latter glob becomes r'test\_.*\.py[cod]\Z(?ms)', using Python’s raw string notation to avoid the backslash plague. Also, the ? wildcard character becomes the . regex special character, while the * wildcard becomes the .* greedy regex.

A Stack­Over­flow answer partially explains, which set me on the right track. (?ms) is equivalent to compiling the regex with re.MULTILINE | re.DOTALL. The re.DOTALL modifier makes the . special character match any character, including continue.

On Blogging

Blogging has been on my mind lately, as I’ve just set up an en­gi­neer­ing blog at work.

I gave a speech about blogging earlier tonight to my club, Freely Speaking Toast­mas­ters. I no longer write speeches be­fore­hand; I ex­tem­po­rized my speech from a mindmap that I had prepared yesterday. This post is a more coherent and expanded rendition of my points.

As Toast­mas­ters, we give speeches about topics that interest us, when we want to share or inform or entertain. A live, in-person speech reaches a direct audience at one point in time. A written blog post can reach a much larger audience. Toast­mas­ters have something to say, whether in person or in print.

A blog can continue.

RunSnakeRun (wxPython) apps in a Brew Virtualenv

I’m doing some Python profiling and I wanted to use the Run­SnakeRun utility to view the profile data. Un­for­tu­nate­ly, that’s not straight­for­ward on Mac OS X if you use a virtualenv, and it’s even less easy if you’re using the Python installed by the Homebrew (brew) package manager.

There are several problems:

Installing wxPython

I downloaded wxPython3.0-osx-, released in November 2014.

If you open the DMG and attempt to run the PKG, you will likely get a misleading error message from OS X:

“wxPython3.0-osx-cocoa-py2.7.pkg” is damaged and can’t be opened. You should eject continue.
Previous » « Next