Sunday, November 26, 2023

Dirty Trick #14 -- Tall Tales

In one of my jobs, members of the team used to gather around a table at lunch time and chat. A short time after joining, the topic turned to hiking and I mentioned that I had summited Long's Peak in 4 hours. The team lead then mentioned a former girlfriend who was a pathological liar who claimed to have summited Mt. Rainier.

It seemed a bit of a non-sequitur. One understands that Mt. Rainier is a technical climb -- often used as preliminary training for Mount Everest expeditions. Sure, anyone who claims to have gone up Mount Rainier deserves genuine admiration or genuine skepticism. In contrast, in late summer it is possible to just walk up to the top of any one of Colorado's 14,000 ft peaks -- assuming, of course, that you are in very good physical condition.

Shortly after that, when the talk turn to cars and driving, I claimed that the first car I ever drove was a Porsche 911-S. In response, the same girlfriend was mentioned again -- in which her supposedly equivalent exploit was having flown an F-18. 

At this point, I caught on to the fact that my veracity was being questioned. Without skipping a beat, I said that I had only ever flown an F-15, slyly omitting the fact that it was in a simulator. "It's really not that hard: It handles like a rocket with control surfaces." From that time on, I made a game of relating stories about myself that were 100% true, but leaving out certain details that might tend to make them more credible. The pathological liar girlfriend was a recurring theme: I pretended to be completely obtuse -- never connecting the mention of her to anything I had said.

I claimed to have cut down 100 trees in a single day. I claimed that while building a deck for a friend, I had driven 900 nails in 6 hours. I talked about how I had fixed any number of stalled vehicles using only a pocket knife, and how I had extinguished a car fire using two cans of beer (which I just happened to have handy) and my mighty breath.

On the subject of photography, I put in that I had once waded out into the middle of the Delaware River, to get the best view of John Roebling's suspension bridge at Lackawaxen PA. On the subject of canine misadventures, I claimed that I had pulled a tree out of the ground and used it to defeat two guard dogs. I was able to claim with a straight face, that I had overpowered and escaped from 5 guys who were trying to beat me up.

I particularly enjoyed relating my past athletic exploits, such as: Riding my bike to the top of Flagstaff Mountain in 23 minutes; riding from Longmont to Boulder (a distance of 17 miles) in 34 minutes; riding from Trentino Alto Adige in Italy to Munich, Germany (a distance of 480 km) in less than two days. I once ran from my apartment in Boulder to the IBM plant in Gunbarrel (a distance of 10 miles) in an hour and 20 minutes. And one fine evening, I ran from the Carolina Circle Mall to 1109 Pebble Drive (8 miles) in 59 minutes. 

Every one of these claims is quite true, but to feed skepticism I would sometimes correct myself on the numbers involved. "Wow! 17 miles in 34 minutes? That would be, um, 30mph. Maybe it was 43 minutes instead...."

The story of summiting Long's Peak in 4 hours is still an admirable feat, and I know someone who can corroborate the story. In September of 1976, Paul Beatty and I agreed to hike up Long's Peak together. He wanted a hiking companion and I felt equal to the challenge. We met at his house and he drove us to the Long's Peak Trailhead. We hit the trail just after 9 am, and had crossed the Boulder Field by noon. Just below the Keyhole, I stopped in the hiker's shelter to catch my breath while he went on ahead. Passing through the Keyhole, I found it was only a short hike to the summit. I came up a few minutes later, reaching the top close to 1pm.

The story of the Porsche is also quite true. I baby-sat for the Sansons before and after they had moved to the condos on Bear Mountain Drive. In December of 1974, when I was 15 1/2, the parents came back well after midnight from a party in Denver. It's hard to fathom the logic behind it (since he'd just driven 25 miles), but Fred considered himself too drunk to drive me the mile and a half home. So he gave me the keys to the Porsche and settled himself in the passenger seat.

Growing up, I had watched my dad intently as he drove our VW van, so I understood the basic theory of driving a stick shift. I started up the Porsche and we went jerkily out of the parking lot. The powerful engine made up for my lack of skill in working the clutch: I only stalled the engine once while crossing the opposing lane of Table Mesa Drive at Gillaspie Drive. I even managed to get up to 3rd gear while driving up Stanford Drive. I pulled in to the top of our driveway on Kohler Drive and left the engine running. Perhaps the adrenaline helped Fred drive himself home safely.

When I worked at GE in Binghamton NY, they had an F-15 simulator set up in the lab two doors down. I was allowed to go in and use the simulator during my lunch hour. I got to get the feel of flying the aircraft with very little risk on both sides: I lost about half a dozen lives and as many aircraft before I could handle it well enough to stay airborne. (One queued up the next life by hitting the red reset button on the side of the cockpit.)

The twist in the claim of cutting down 100 trees in a day is that all of those trees were maple seedlings. I literally mowed them down (with a push mower). The number of trees thus dispatched was actually in the 1000s, but claiming to have felled 100 trees in a day seemed outrageous enough.

When I built a deck for George Keenan in Binghamton, I drove 900 decking nails in six hours with a regular 16oz claw hammer. But I guess I forgot to mention that I did this in two 3-hour stints on consecutive days.

I also tested credulity by claiming to have gotten numerous stalled vehicles back on the road using only a pocket knife. The part that I left out was that this invariably happened when the weather was cool and damp. The damp weather would cause corrosion to form on the inside of the distributor cap, but as long as the corrosion was damp it would conduct OK and the engine would run. After the engine warmed up, it would drive the water out, making the corrosion a better insulator. Then, the car would stall out. All I had to do was to scrape the corrosion off the inside of the distributor cap and the car would start right up. It helps the impression of fiction that few people these days have experience with anything but electronically fuel-injected engines. (They have no distributor cap.)

The story of extinguishing a car fire with my breath began at my cousin John's wedding in Washington D.C. My girlfriend, Carolyn, and I had driven up from Raleigh to attend. After the reception, there was an after-party at the newlywed's hotel suite. We stopped by for a short time (and a few more drinks). Before leaving, I helped myself to two 16oz cans of beer, putting one in each pocket of my suit coat. As we were driving back to our B&B, Carolyn asked to go by the National Cathedral to look at the call board and find out when services were to be held on Sunday morning, so we did that. 

As we were driving away, we came down a hill to a stop sign. There, directly across the intersection, there was a Karmann Ghia with flames coming up underneath it. I jumped out of the Horizon and ran across the intersection. The woman in the car saw me coming and got out. Her engine had stalled, so she already knew that something was wrong. My running toward her must have convinced her that something was really very wrong. 

I sat down in the driver's seat and put out the clutch so the car could roll back away from the flaming puddle of gasoline underneath. Then I got out and asked how to undo the latch for the engine compartment. She said you just raise it, so I did that. There were flames rising around the sides of the engine. What to do next? At that moment I recalled that I had a can of beer in each pocket, so I proceeded to open one and then the other, using them to douse the flames. At last there was a little flicker near the fan pulley, which I blew out with my breath. 

The young lady turned out to be a nurse who was just returning home after a late shift. We rolled her car back and parked it against the curb, and then gave her a ride to her apartment nearby. That story doesn't need any spinning to seem improbable.

The missing detail from the story about the Bridge at Lackawaxen is that the upper Delaware is quite shallow (especially since much of the water that used to flow there is diverted into the NYC water supply). On canoe trips in late summer, I would sometimes scrape bottom -- meaning that the mighty Delaware is less than 2" deep in some places. At the famous bridge, I had to pick my way carefully to cross the deep channel next to shore without going in over my head. Out in the middle where I took my shots, though, the river was no more than knee-deep.

The story of how I used a tree to cow two dogs began as I returned home from Paul's rental house on Marine Street late one Sunday evening. My usual route took me along the levy next to the Farmer's Ditch. A construction site had sprung up and was surrounded on 3 sides by chain-link fencing. But the side next to the ditch was open, so I just walked on through. Then, I heard barking and figured that guard dogs had been posted to protect the construction site. 

I looked around and saw the trunk of a pine sapling that had been uprooted by a bulldozer. It was about 10' tall with roots still attached, and seemed to me to be a pretty good weapon. I picked it up by the crown end, and laid it across my shoulder like a baseball bat. Then, I waited for the dogs to come up. 

When the dogs were about 20 feet away I made a roundhouse sweep with the tree trunk, roots hissing through the air in front of their faces. That display brought the dogs up short. They simply turned tail and trotted back to their kennels. Evidently, exposing themselves to injury was not part of their contract. 

My elaboration, of course, was to omit the detail that the tree had already been uprooted: I merely had to pull it out of the mud. Also, "tree" to most people suggests something bigger.

The 5 guys that I "overpowered" were members of the provisional troop that I was placed in at Scout Camp. They had learned their social skills by observing (or participating in) gang behavior, and wanted to assert dominance over other members of the troop. They caught up with me as I was exploring the woods, and two guys ended up holding me by the arms. The gang leader stood facing me, and his henchman was positioned behind me. Their smallest member stood in front of the gang leader and was given the task of punching me, to "teach me a lesson".

Well, even in that situation I'd be damned if I let a scrawny pipsqueak beat me up. So I didn't. Using the guys on each arm as supports, I jumped back and brought my knees up to my chest. Then, I kicked the little guy in his chest. He fell back and knocked over the gang leader. The guys on my arms weren't prepared to hold me aloft, so they fell back and let go. The counterforce from my kick propelled me back into the henchman, who also fell over.

The moment of surprise gave me the head start that I needed. I sprinted off through the woods, and then circled back to camp to tell the troop leader what had happened. Interestingly, I had no further trouble with those five guys for the remainder of my stay at Scout Camp.

The incredible part of the story is that my attackers had arranged themselves precisely so that one kick was enough to knock them all over like tenpins. That's the way it was, believe it or not.

Saturday, December 25, 2021

Dirty Trick #15 -- Petrodiesel

As a bicycle commuter, I get to sample the exhaust fumes of many vehicles. I can tell, for example, if the engine in the car that just passed me need a tune-up (lots of unburnt hydrocarbons), a ring job (engine oil) or a new head gasket (ethylene glycol). When a car burning biodiesel passes me it smells like french fries, and when a car burning petrodiesel passes me, it smells like dead dinosaurs (no kidding). At least, it smells how I imagine a dead dinosaur would smell, because there is the faintest whiff of rotting flesh under the many layers of soot and light hydrocarbon chains and sulfur dioxide and oxides of nitrogen.

Being an avid cyclist, I also occasionally go on long rides. And so it was on the 28th of June 2015 that I found myself in Hartline, just off of Highway (U.S.) 2 in eastern Washington. I had ridden from Mercer Island up to Wenatchee the previous day and stayed in a motel. That morning, I had risen early and continued east through Waterville and Moses Coulee. I was already pretty hungry when I reached Coulee City, but there did not seem to be any diners open there, so I pressed on.

At Hartline, there was a sandwich board that advertised a cafe open in the Hartline School, so I rode the two blocks north and dismounted. The cafe was in what had been the cafeteria of the school. The kitchen was at the far end of the large room that occupied most of the ground floor of that wing of the building. So I walked toward the counter, my cleats clicking as I went: Clicka-tic, clicka-tac, clicka-tic, clicka-tac.

I had been planning to order french fries, one of my favorite fuels. But as I made my way across the polished linoleum, my nose picked up a strange smell. The smoke from the fryer was nothing like the light "come hither" potatoes-in-canola aroma that McDonald's so cunningly wafts across neighborhoods with its enormous exhaust fans. My olfaction was confused by a weird mixture of burnt toast and heating oil. This smelled like ... ah, there it is: petrodiesel!

The fat in the fryer had not been changed since the beginning of the Cenozoic -- or, to be fair -- any time in recent history. I had already decided before I reached the counter that I would not be ordering french fries cum Loch Ness Monster. I settled on the alternate plan of looking over the packaged snacks and selecting whatever seemed least likely to kill me. I had lost hope that anything there had an expiration date in the current millennium. But once again, I was smiled on by Providence and rescued from peril.

When she chose to recognize my presence, the lady behind the counter glared disapprovingly at my footwear and said, "We don't allow cleats in here."

"Oh, sorry," said I, facing about and heading toward the door with the optimum balance of composure and haste. Clicka-tic, clicka-tac, clicka-tic, clica-tac. The air outside was delicious.

Another half hour on the road put me outside of Almira. But the modern highway bypasses the center of town, so I was unsure whether it had any food to offer. I had already used up my two spare tubes and had a slow leak in my rear tire, so I was trying to avoid riding very far out of my way. I passed Almira and rode on.

No food in Wilbur or Creston, the mounting miles adding to my hunger. I was almost weak with exhaustion on the last stretch into Davenport. On the far side of town, I discovered a drive-in. I went right inside and asked for a large order of fries. They arrived promptly, and were the best french fries I have ever tasted.

Wednesday, June 28, 2017

Dirty Trick #13 -- Great Balls o' Fire

My first car was a Mazda RX-2.  It was overdesigned in every way -- which was probably an apology-in-advance for the fact that it never got more than 19.6mpg (though interestingly, seldom less).

One of its features was a 4-barrel Holley carburetor. Four barrels for two rotors is ... well, go figure.  Anyway, I had discovered that right around 60mph, I could make the car backfire.  This was achieved by accelerating and decelerating right at the point that doing so caused the secondary throttles to open and shut.  Opening and closing the secondary throttles would send a pulse of rich exhaust down the pipe.  When that hit the open air at the other end, Blammo!  It is possible that I could have achieved the same effect using the manual choke (yes, it had one), but I already had one method, and that was good enough.

So there I was.  On one of my samurai driving stints between my apartment in Boulder CO and my parent's house in Greensboro NC, I happened to be driving through downtown Knoxville just at dusk in the middle of rush hour.  And there had to be some guy in a big hurry, filling up my rear-view mirror with his Cadillac -- as if that would somehow make the people going 60 in front of me move faster.  So I let him have it.

I did the trick with the gas pedal, and a great big, blue ball of flame rolled out of my tailpipe.  (I saw the reflection in his grille.)  It was magical! Thy guy in the Caddy slowed way down, and I traversed the rest of Knoxville, still at 60, but with plenty of space behind me.

Thursday, August 27, 2015

Dirty Trick #12 -- Speech Synthesis

Shortly after I started working for the Office of Telecommunications, my manager set up a demo that involved a minicomputer linked to a Votrax voice synthesizer.  He had programmed it to say, "Hello! This is the computer talking ... ."

The temptation was too great.  After he had left for the day, I studied the phoneme vocabulary for the Votrax, and replaced his program with one that started out: "Howdy, y'all!"

Dave was not too happy when I showed up the next day, and only slightly mollified when I showed him the backup copy I had made of his program.  Practical jokes need to be carefully calibrated, I guess.

Wednesday, May 27, 2015

Dirty Trick #11 -- Master Key

The combination locks that were checked out to students in my junior high and high school were outfitted with a cylinder that would accept a master key.  This was undoubtedly a great convenience for the custodian, in case access had to be gained without the student's participation.  It immediately occurred to me that I would have great power over my fellow students if I possessed a copy of that master key.

I had no thought of "borrowing" the master key from the custodian, but I did consider making one.  Before I started high school, somehow one of the high school locks was added to my collection.  I used an assortment of my father's tools to destroy enough of the lock to remove the cylinder.  And during the same time, I obtained a blank of the right dimensions from the local K-Mart.  It only remained to measure the tumblers and shape the key so that it moved the tumblers into the right alignment..

That is where I lost confidence.  I had only one blank, so I didn't dare make an error.  I had the cylinder out of the lock, but I didn't want to take the tumblers out of the cylinder, for fear that I would not be able to reassemble the precious cylinder and test my creation.  If I had had 10 blanks and 2 cylinders, the outcome might have been different.  As it was, I abandoned the project after taking one small nick out of the blank with a file.

No matter.  It turned out that the idea of a master key was just as good as the real article.

The spring of my sophomore year, I was standing near Kathy Humphries' locker and chatting with her before fourth period.  One of a group of bullies standing nearby reached into Kathy's locker, took out a package of Twinkies, put it in his own locker and slammed the door before we could protest.  We both demanded the Twinkies back, but the boys laughed and went off to class. 

I vowed revenge.  I had noticed that the boy had a baseball glove in his locker, and I imagined there were other valuable items in there as well.  I returned before 7th period and tried to get the baseball glove in order to force a swap.  But the bully saw me coming and guessed my intent.  The locker door was closed before I could reach inside.

It happened that that day was a Friday.  I returned to the school on the next day and used my usual trick to pop the latch on the cafeteria doors at the west side of the building.  Soon enough I gained access to the math wing, and went to the right locker.  With a swift kick, my hiking boot knocked the entire handle off the front of the locker. 

I had observed another locker whose handle had been broken off by accident, so I assumed it would be easy enough to repair.  I examined the locker handle, and found that it had been held in place by two small machine screws.  My blow had caused both to shear off near the head, but neither the locker nor the handle was damaged.  All I needed was two replacement screws, and the locker would be good as new.  I backed out the shafts of the headless screws and picked up the heads. I put all these in my pocket for later comparison.

It was then easy enough to help myself to the locker's contents.  But I didn't want to be found with stolen property in my locker.  That would never do.  I needed a safe place to store the loot that was not incriminating.  I immediately got the idea of putting the stuff in the lost-and-found.  I took the glove and a cap and a few smaller items, and went down to the principal's office.  I used my latch pick to open up the main door and then went into the closet that held the lost and found.  I burrowed down in the pile of forgotten clothing and nested the goods near the bottom of the cardboard box.

Then I went down to McGuckin's Hardware, and found a match for the broken screws in thread size and length.  I even had the good fortune to find ones with hexagonal heads, just like the ones I'd broken.  I went back to the high school, repaired the locker handle and left.  So far, so good.
---***---   ---***---   ---***---   ---***---   ---***---   ---***---   ---***---   ---***---  

On Monday, I was met at my locker by a very angry bully-boy.  Angry, but respectful, lest he should make me decide to return his property never.  He demanded to know if I was responsible for the disappearance of his baseball glove, and wanted to know how I had done it.  I told him I had made a master key that fit all the locks in the building, and he wasn't going to get his glove back until he returned the Twinkies.  He said he didn't have the Twinkies any more (presumably having eaten them).  Too bad.  (Conversations were short, because the halls cleared out in a hurry when the second bell rang.)

A short time later, I received a note that summoned me to Millie Beavers' office the following period.  Millie was the head of the math department, and also was responsible for managing the lockers in the math wing.  When I showed up in her office, she put out her hand and said, "Okay, where is it?"  (I was taking independent study math which she supervised, and her tone was normally much more cordial.)  I was forced to explain that there wasn't any master key, and how I had obtained access to the locker by breaking off its handle.  When asked about the loot, I said I didn't really take it -- I had just put it in the lost-and-found.

That was the end of it: I received no punishment; the boy reclaimed his stuff, and Kathy never did get her Twinkies back.  In retrospect, I suppose Millie was smart enough to let the master key story stand. Revealing that a locker handle could be sent flying by a sincere glancing blow would have precipitated general mayhem.  So that was our little secret. 

From the bullies' perspective, however, the idea that I had made one master key certainly meant that I could make another.  Bully-boy and his chums treated me and Kathy with proper respect for the rest of our time at Boulder High.

Monday, September 1, 2014

Dirty Trick #10 -- Applied Physics

By the time I was in high school, I was already a feminist.  My mom -- being then the president of the Boulder chapter of NOW -- had made sure of that.  But she had also moved beyond believing (as some feminists did) that common courtesies -- such as holding doors and allowing ladies to enter first -- were symbols of sexism. Rather, she treated them as a mark of respect that was her due.

Two of the young ladies in my physics class, Kathy and Alison, had decided at this time that they were feminists, but they were still on the previous page.  I would often arrive at the dual doors to the math/science wing a few moments ahead of them, and began holding the door open for them.  Whereupon, they would make an elaborate show of opening the other door for themselves and passing through.

After the second or third occurrence, I decided to take advantage of their predictability -- and I knew just how to do it:  Some time before, I had noticed that the left-hand door was hard to open, and took a long time to close.  An  examination of the door-closer mechanism revealed a set screw. Using my pocket knife, I loosened the set screw and tried the door.  It opened easily, and closed more rapidly.  "Ah, hah!" I said to myself, "this must be an air bleed, intended to control the speed at which the door closes."  But it could also make the door hard to open. [cue ominous music]  I had thought that door-closers contained a one-way valve that would always allow the door to open easily: the air bleed would only control the speed at which the door closed.  But this one either lacked such a valve, or that valve had long since failed closed.

The next day, I made an extra effort to arrive early, took out my pocket knife and twisted the air-bleed screw on the left-hand door-closer firmly into its seat.  No air bleed.  I tried the door and it swung open a few inches.  It would have taken a team of oxen to open it any wider.  Perfect.  People were starting to arrive, so I held the right-hand door open for them.  Those exiting the wing were obliged to duck around the mullion. 

Right on cue, Kathy arrived.  Following the standard script, she went over to the left hand side and tried the door.  No dice.  She gave me a look that would melt steel as she swept through the right-hand door.  Mission accomplished.  I put the set screw back to its previous position, and joined the physics class.  Kathy avoided the left-hand door for weeks....



Sunday, March 16, 2014

Dirty Trick #9 -- Office Space

One year on the 31st of March, I took care to put a 6mm hex wrench in my pocket before setting out for work.  After most people had gone home for the day, I went to the multi-purpose room and helped myself to a spare piece of cubicle wall.  I carried it up to my boss's cube and installed it in place of the gap that formed the entrance.

The next morning, Mikel strode down the hall, cut a quick dogleg to the left and ran smack into the newly-installed barrier.  I wasn't there to witness it, but he related the story to me later with a chuckle.

Thursday, May 23, 2013

Dirty Trick #8 -- Remote Control

In junior high, I was already doing my own bike maintenance.  From time to time, it became necessary to transport a disabled bike down to The Spoke in the Table Mesa Shopping Center.  What better way to do so than to push the stricken bike while riding on another one?  A bit of experimentation revealed that grasping the second bike across the handlebar stem afforded me complete control over where that bike was headed.

My new skill came in handy a short time later.  There was a bully that went to the same junior high, and rode his bike to and from school along the same route through the Bureau of Standards.  It was not a through street for cars, and crossed some undeveloped grassland for about an eighth of a mile.  Away from observing motorists and residents, he felt like he could get away with anything -- such as shoving me off the roadway or trying to put sticks in my spokes. 

The day he came up and prepared to force me off the road, I simply reached across and placed my right hand on his handlebar stem.  It didn't take him long to realize that the situation had changed completely.  His nasty/smug look disappeared almost instantly.  After I plotted a new course for him that veered gently away (well, maybe there was a rock or two on the shoulder that he had to avoid), he left me alone on that day and ever after.

Dirty Trick #7 -- Making Tracks

My bike route to and from school took me across the Bureau of Standards.  The sidewalk entering from King Avenue went through a curb cut and emptied into a parking space that was clearly marked as No Parking, with yellow hatching throughout.  But there's always someone....

The day I found a blue Mustang hatchback blocking my path, I decided to leave the driver a message.  I took the front wheel off my bike and looked around for a handy mud puddle.  After coating the full circumference with black mud, I went back to the Mustang and drew a tire track up the hood, up the center of the windshield, over the roof, down the hatchback and onto the street.

It's an open question whether the driver got the message, but I don't recall finding that particular car blocking my path ever again.

Sunday, November 4, 2012

Quality Only Breaks Once

In a recent party, we were discussing the poor quality of most kitchen appliances.  The topic began because a friend (Mike) complained that he was on his third or fourth bread machine.  I jokingly suggested that any appliance with "For Household Use Only" stamped on the bottom was a piece of junk, meant to hold together only long enough to get it off the showroom floor.  This was called to mind by my seemingly solid electric pasta machine, which nonetheless stopped working after it had produced a few dozen batches.  It provided the information needed to translate "For Household Use Only" correctly.

The first Kitchen Aid stand mixer I had stopped working after about a month of use.  It came with a lifetime warranty, so I took it to a local appliance repair center.  There, they replaced the broken annular gear (free of charge), and it has worked fine ever after -- providing almost two decades of faithful service before I gave it to my niece.  I joked that it came with a cheap, nylon annular gear, but when I took it in for service, they replaced that one with one of solid brass.

Whether or not that's true, it suggests a business model that could be quite successful:  Have a production model of your product that is manufactured rather cheaply.  Nonetheless, deliver the standard model with a lifetime guarantee, and charge a bit extra because you can claim superior quality.  The trick is, that most owners will not use the product nearly enough to discover its flaw.  Those who do will hopefully return the unit for service or replacement.  The replacement unit or parts are top quality.  If the unit ever comes in for repair, *all* of the cheap critical components are exchanged for top-of-the-line replacements.

Among those who actually use the appliance it will eventually earn the reputation for high reliability, while among the rest the assertion will never be tested.  Meanwhile the difference in price between what can be charged for a top quality model and the cheap models you actually produce is almost pure profit.  As long as the amortized cost of repairing (or replacing) the models which do come in is less than that margin, you're money ahead.

I suppose that selling crappy software along with the promise to fix any bugs that may arise follows pretty much the same business model....

Monday, October 15, 2012

On Parallel Programming

"Sequential programming is really hard, and parallel programming is a step beyond that." -- Andrew Tannenbaum, USENIX 2008 Keynote Speech

A colleague quoted this in a recent email, and I feel obliged to respond to it.  From practical experience, it is easy to nod in assent and let it go at that.  An application that is not designed to run in a multithreaded environment is quite likely to fail when simulated or actual parallelism is added.  And even some applications that are carefully designed to run under parallel execution fail because the designer or coder neglected an important detail.

 But the fact that I am working on a programming language that is intended to make the job of programming parallel applications easier means that I cannot agree with this assessment wholeheartedly.  Of any profession, the promise that automation can rescue practitioners from tedium dangles closest in front of software engineers.  Early programmers struggled with machine code until the first symbolic assembler was created; later coders strove with assembly language until usable high-level languages were introduced.

Even though the concepts used to produce code that will run correctly in a parallel processing environment have been around for decades, it is reasonable to assume that parallel programming is still in its infancy, and that software tools will again come to the rescue.[1]  The main reason is that multicore processors have only become common within the last half-decade or so.  The redundant cores are currently an underused resource, but already applications must find ways to utilize this resource to remain competitive.

As with any in the technology used to program computers, it will take some time for new programming models to become widely used.  There is a lot of legacy code and many entrenched coders.  The old code bases may need to be recoded or encapsulated to run efficiently in the new environment.  Experienced coders will have to learn a new skill set to be effective with new coding paradigms.  However, we have ample examples from the past in which this paradigm shift has occurred.  The new programming model not only shapes how software is written to run on existing machines, it affects how the machines themselves are designed.  Hardware advances impinge upon the tools and programming model used, and the cycle continues.

In the present turn, the presence of parallel hardware is the motive force; tools and especially the programming model are obliged to catch up.  The programming model is central to the discussion, and carries the burden of the perceived difficulty.  Serial programming is hard, but in my view it is harder than it needs to be.  If the process of creating a parallel programming involves first writing a serial program and then parallelizing it, it is no wonder that parallel programming is thought to be more difficult.  But the excess complexity of serial programming and extra step of parallelization can both be dispensed with.

The inessential complexity in serial programming arises the expression of a linear flow of control.  Early single-processor machines could execute only one instruction at a time, so a complete ordering of the instructions fed to it was an accurate representation of what the machine was doing.  The state of the machine between each instruction could be predicted with precision.

With the advent of superscalar architectures, however, the connection between instruction sequence and execution sequence became more tenuous.  Superscalar architectures can dispatch more than one instruction at a time, perhaps blurring the exact state across several instructions.  Such processors contain internal circuitry to ensure that the observable state of the machine matches what is expressed by the code.  A hazard occurs when two simultaneously-executing instructions intend to read and write (or both write) the same register or memory location.  The circuitry enforces a stricter ordering of the execution of instructions when hazards are present.  A programming model that fundamentally assumes parallel execution would not require this extra circuitry.

If, in the absence of hazards, instructions can be executed in any order, then it becomes clear that the serial expression of execution carries extra information that is not essential to the expression of the algorithm.  It is convenient to list the work that needs to be done linearly.  But often, the exact ordering of the statements in a program is incidental.  I use this flexibility to group statements that are related and thus enhance the readability of the code.  But the very fact that I can do this reflects the presence of ordering information that is unimportant.

In fact, some compilers will perform instruction reordering to reduce execution time.  They perform a dependency analysis among the variables described in the program, and determine the order in which operations must be performed to preserve the original intent.  In effect, that optimization throws out the most of the ordering information supplied by the programmer, preserving only those partial orderings which are essential to the algorithm.  It then builds a new total ordering from scratch.

Given that much of a serial program representation is incidental, we are encouraged to consider a programming model that avoids this overhead.  The language must provide the means to express important sequence constraints while ignoring or discouraging the inclusion of incidental ordering information. 

It turns out that a number of programming languages already exhibit this property to some extent.  The goal-dependency representation in makefiles is a familiar example.  The goals express the dependence of a given target on a number of source files, which is in effect a sequence constraint:  A given source file must be present before the target can be produced.  In a serial processing environment, a feasible total ordering can be derived from an initial goal and the constraints provided.  In a parallel processing environment, each goal represents a task; a task can be added to the ready queue as soon as all of its constraints are satisfied; any available processor can execute any task from the ready queue at any time; completion of a task changes the state of each file touched by the task.

This declarative (as opposed to "procedural") style of programming is represented by many languages -- some of which have been around for decades.  Prolog is an early example, XSLT a more recent contribution.  What these languages have in common is that -- at least at a high level -- they specify the "what", not the "how".  This approach allows the implementation considerable lattitude in scheduling tasks so long as the explicit sequence constraints are met.  In fact, the algorithm for executing on a single processor is just the degenerate case of the algorithm used for parallel execution.

If declarative languages are more suitable for parallel applications and implementations exist today, why haven't they enjoyed more widespread use?  One reason is historical: When declarative langauges were introduced, available computers were almost exclusively single-processor.  Quite a bit of overhead is involved in scheduling the tasks to be run, and all of this had to be simulated in software.  Once scheduled, the tasks were run on a single processor, so no speedup was possible.  It was impossible for an algorithm specified in a declarative language to run faster than the same algorithm specified in a procedural language.  Hence, declarative languages were labelled as "slow" and dismissed.

With an abundance of processors sitting idle and hardware-assisted task scheduling, the landscape has changed.  Perhaps it is time to give declarative programming another chance.  In future posts, I'll provide a more thorough review of existing programming languages, with an eye to their applicability in a parallel execution environment.  Then if need be, I'll decribe the characteristics of a new language that is well suited to bridging the gap between serial and parallel programming.

[1] Myths About Scalable Parallel Programming Languages Part 6: Performance of Higher-Level Languages

Tuesday, January 24, 2012

Dirty Trick #6 -- Fun With Ice

From time to time, a random chance works out in your favor -- especially if you nudge the odds in the right direction.  The last winter we lived in Allentown, it snowed a lot.  Like 65 inches.  It soon got to be too much trouble to clear all the snow off the top of our Dodge van, seemingly every time we wanted to go out.  And so it happened that when temperatures climbed above freezing in the spring, there was still an inch-thick layer of ice on top of the van.
I knew I had this load of ice on the roof as I got onto US 22.  My idea was that sometime before I got up to speed, the wind would lift the ice off the roof and let it smash harmlessly in the roadway.  All I had to do was time my acceleration so that noone was following too closely behind.  I drove with a good bit of my attention directed toward the rear-view mirror.
It was also the case that -- even though the I-78 bypass had recently opened -- most of the truck traffic still went through on US 22.  And they drove as if they owned all 4 lanes.  Passenger cars were not welcome.  (I'll bet you can guess where this story is going.)  Well, the ice proved more tenacious than I had anticipated.  And in the mean time, one of those obnoxious trucks came up behind and completely filled the rear-view.  I was already doing 60, and there he was -- not 16 feet off my rear bumper.  He was, in fact, driving in my slipstream -- as proven by what happened next.  I had switched from thinking "I hope it doesn't go now." to "Oh please oh please oh please!"
The little bump going onto the deck of the Lehigh River bridge and a little gust together were enough to tilt the leading edge of the ice sheet up, and away it went!  I watched it start to fall toward the pavement, but then the slipstream carried it up and let it smash right across the hood of the truck.  Score!  Well what do you think? A minute later he was back on my tail blowing the horn like crazy.  OK, fine.  I'd be upset too.  I slowed down a bit, but he continued following for at least five miles.  Somewhere in there it became apparent he wanted me to pull over.  But there was nothing I could do because the shoulder was all filled with snow.  When I did finally pull over, the trucker came up and wanted my insurance information.  He said that the ice from my car had cracked his windshield and wanted my insurance to cover the damage.  OK, fine.  We exchanged insurance and contact information.  He wasn't angry like I expected him to be.  He was also apparently clueless that his tailgating played a major part in getting his windshield smashed.  Maybe he got a clue later.
When I returned home, I received a call from my insuror, wanting to know the circumstances of the claim.  I stressed that the trucker had been following me so closely.  Otherwise, the ice from my roof would have fallen harmlessly to the ground.  An hour later, the trucking company called and I gave them the same story.  My guess is that the claims adjustor for my insurance called the trucking company and at least gave them a hard time before paying up.  I can only hope that the trucking company gave their trucker the same treatment.

Tuesday, October 25, 2011

Dirty Trick #5 -- No Traction

When I was in Junior High in the 8th grade, I was already developing bicycling as a hobby.  At least I commuted 4 miles a day to school and back, and also pedaled an ancient one-speed coaster-brake bike through my paper route.  I found I had considerable strength from the waist down, and wondered if I was strong enough to lift the front end of our VW bug entirely off the ground.  So one Friday evening, I laid a flashlight down next to the left-front tire, pointed at the rock wall on the opposite side of the car.  Then, I squatted and slid my legs under the front bumper so I could lift it using the tops of my thighs.  All I had to do was flex my thighs and gastrocs a bit, and both front tires went up 2 inches in the air.

A few months later, I was on my bike waiting for the light at Baseline on 20th Street, and I noticed that my English teacher, Mr. Reno, was in his yellow Volvo Sport wagon just ahead.  I used the same trick to lift the rear of his Volvo off the ground.  When the light turned green, Mr. Reno tried to drive off, but his wheels just spun.  I hadn't managed to get the rear entirely off the ground, but there were patches of ice from a recent snowstorm.  It was enough to keep him from being able to go forward.  I set the back end of his car back down and then he drove away.

Monday, October 10, 2011

Dirty Trick #4 -- No butts

When you ride a bicycle between towns, you go slowly enough that you can truly enjoy the scenery.  You also get to examine all the litter that human swine have chucked out of their cars, as if they can't tell the difference between the roadway and a trash can.  To me, the apex of insolence was when someone would chuck trash out of the driver's side window while I was waiting right behind him in the left turn lane.  If the timing was right, I would pull along side, pick up said trash item, and chuck it right back in.

One time, I took this tactic a bit too far.  I was waiting for the left turn signal at Arapahoe Avenue on 30th Street when the guy in front of me tossed a lit cigarette out the window.  I pulled up and tossed it back in.  Then, I took off like a shot -- fully expecting the guy to try to run me down.  Instead, he had jumped out of the car to try to keep from being burned.

You can probably only expect to get away with something like that once per lifetime.  So I still occasionally toss back candy wrappers and the like, but never again a lit cigarette.

Thursday, October 6, 2011

Dirty Trick #3 -- Spare Change

When I was an undergrad, I one time decided to ride my bicycle up to the East Portal of the Moffat Tunnel.  On the way back, I stopped in Rollinsville to buy a candy bar at the general store.  And that evening, I stopped at the King Soopers to pick up some items for a well-deserved large supper.  I had started the day with a $5 bill in my pocket, so taking out the 26 cents for the candy bar, I knew I had $4.74 to spend.

Imagine my surprise when I got ready to pay and found I was short.  In fact, I had only $3.38 in my pocket.  It didn't take me very long to figure out what had happened: The lady in the general store had short-changed me -- precisely one unit in each denomination.

So the next Saturday, I rode back up to Rollinsville and informed the lady she'd short-changed me and I wanted my money back -- one dollar, one quarter, one dime and one penny.  She dished it out of the till without even looking up.  Her unquestioning reimbursement confirmed my suspicion that she tried to short-change every customer, and would therefore be unable to identify anyone she hadn't cheated.  "This is great!" I thought, "So long as I can get myself to Rollinsville, I shall never be penniless in this world."*

*Caveat: This took place 38 years ago; the general store in Rollinsville (if it still exists) is probably under different management by now....

Monday, October 3, 2011

Dirty Trick #2 -- Elementary Swahili

While I was a graduate student at NC State, the university decided to roll out a new automated class registration system.  One registered for classes using a touch-tone phone, using student number and a 4-digit PIN to log in.  There were four of us sharing an office, and one of my fellow graduate students, Gee-Gwo Mei, left his PIN sitting out on his desk.

I knew exactly what to do: I signed him up for Elementary Swahili! 

I waited until his printed schedule arrived and he was exclaiming  to the rest of the office how the "stupid computer" signed him up for the wrong class.  Then, I admitted my misdeed.

Saturday, October 1, 2011

Dirty Trick #1 -- Special Donut

I took a summer course in Surveying in Boulder between 8th and 9th grades.  The kids in the class were supposed to take turns bringing in a snack to share mid-morning.  One kid in the group was obnoxious: always the first to select a snack, and always taking the largest or best.  So I thought, "This guy needs to be taken down a peg."

When my turn to make snacks came up, I decided to make doughnuts.  I made enough for the group and then took Tobasco sauce and mixed it in to the batter to make the final doughnut.  I made sure the last doughnut was larger than any of the others.  I also made sure that it was at the top of the pyramid.

The next day, the whole thing went like clockwork: I took off the plastic wrap and held out the plate.  Mr. Obnoxious (I forget his real name) was first in line and went straight for the one on top.  He took a bite and screwed up his face.  Score! Meanwhile everyone else was complimenting me on how good the doughnuts were.  Mr. O seemed to have no idea he'd been had.  Double score!!

It is said that revenge is a dish best eaten cold.  Indeed, and you get the special sauce when the target remains clueless.