About John McGehee

http://johnnado.com

Posts by John McGehee:

Naming Log Files for CAD Applications

Naming Log Files for CAD Applications

An article about log file naming?  Well, somebody’s got to do it, because so few software tools get it right.

CAD software runs a long time in batch mode, so the log file is often the users’ sole feedback. When running a flow, I constantly check progress by listing the log files with the ls command. Repeatedly. All day. Their names and their sort order matter. More

Write Effective Error Messages

Write Effective Error Messages

You might hope that error messages will rarely appear, but whenever your program or design flow does output an error message, users will try to interpret its every nuance. Depending on how they react to messages, enormous amounts of time can be saved or wasted. The tragedy is that good messages are actually quite inexpensive–they consume little run time or memory, they require no exotic algorithms. More

Japanese Input Method on Fedora Linux

Japanese Input Method on Fedora Linux

Over the years I wrote articles showing how to set up Japanese and Chinese input methods for Fedora 11 through Fedora 18.  According to Google, they were quite popular.

But now there’s a new sheriff in town: Mark Rogoyski.  His blog contains excellent instructions for setting up the Japanese input method on Linux—not just on Fedora, but Ubuntu, Mint, SUSE, and OSX.  Wow!

From now on I’ll let Mark to show you how it’s done.

Test XML Output Using Python doctest

Test XML Output Using Python doctest

Python doctest combines unit testing with documentation.  With doctest, you put your unit tests in the Python docstring, and documentation generators like Sphinx render your tests as usage examples.  It’s easy to compare a method’s output to an XML string using doctest.  It’s not so easy when you want the XML string pretty-printed for the sake of  clear documentation.  Here is a simple solution. More

My Encounter with Libyan Agents

My Encounter with Libyan Agents

It was 1986 and the US had recently attacked Libya in retaliation for the Berlin discotheque bombing and other mischief.  I was living In Tokyo, and at a social function for foreigners, I met two young men who worked at the Libyan Embassy.  We had an interesting conversation as I was more willing than most Americans to hear the Libyan side of the story.  Besides, I fancied myself an international man of intrigue whose associates included real live Libyan agentsMore

Test PyQt GUIs with QTest and unittest

Test PyQt GUIs with QTest and unittest

PyQt is the Python binding of the popular Qt cross-platform UI and application framework.  For unit testing, PyQt clients are expected to use the standard Python unittest module, with just a little help from the PyQt QtTest module.  It is not immediately apparent how to blend these two frameworks into a unified unit testing strategy.  In this article, I show you how to unit test a PyQt GUI dialog using only modules included in PyQt and Python.
More

Load More