Skip to main content

Posts

Adopt Simple Rules that Shrink Your Problem Space

When faced with a problem, you naturally start thinking of a solution. By immediately jumping to the solution space, you forgo a deeper understanding of the real problem. One of the most famous ( actually, mythical ) examples is the Space Pen: legend has it that NASA commissioned a special  pen  that can write in zero gravity. Meanwhile the Soviets recognized that Cosmonauts would need  something  that can write in zero gravity: a pencil. Extending this example a bit, the Cosmonauts' pencils have a smaller problem space: What if the ink leaks? What if they lose the cap? Those questions do not even exist. Back here on Earth, you sometimes have the opportunity to create a rule that slices off a big chunk of your problem space; a simple thing you can do to eliminate a whole class of problems. It does not matter how infrequent such problems are now. The point is to make a set of problems impossible forever . You'll always have problems, but in a ...

Avoid the Virtual Kidnapping Scam

A relative recently fell victim to the virtual kidnapping scam, where criminals demand ransom for a loved one whom they only claim to have kidnapped.  To make their claim more convincing, the perpetrators make their ransom demand when the purported kidnapping victim cannot be contacted.  They might simply know when the person is isolated and unavailable, or they might force them to go incommunicado by stealing their mobile phone.

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 agents . 

Repair Fencing with Hog Rings

As a boy I spent a summer on my grandfather’s farm in Mississippi. I learned a lot about farming. Grandpa taught me about hog rings, a piercing applied to a pig’s nose to prevent rooting (digging with its nose). He said they came in three sizes: pig, shoat and hog.

First Check Power, Then Check Clocks

It was during my first job as a computer technician in high school that I developed the maxim: first check power, then check clocks .

The Reef Lounge

When I was about four, we vacationed at the Handerly Hotel & Resort in San Diego (formerly the Stardust Motor Hotel).  That place was heaven on earth as far as I was concerned. I loved the pool. Next to the pool there was a bar, and behind the bar was an underwater theater. It was here that I saw one of the most outlandish scenes I have ever witnessed.

Polymorphic C# and Java Using SWIG

By default SWIG generates C# and Java code that does not support downcast for polymorphic return types.  I found a straightforward way to solve this, provided your C++ code has a way to identify the concrete class of the C++ instances that are returned .  That is, this technique will work only if the C++ API you are wrapping with SWIG has something similar to C# object.GetType() or Java Object.getClass() .