Tag Archives: bizarro world

The tyranny of poor tools (1)

I recently had the experience of checking in some changes to a source code file. I had changed just a few lines, but my editor (Emacs) had, as I had instructed it to do, automatically removed the trailing whitespace from each line whenever I executed the “save-buffer” command. Trailing spaces are worse than worthless, so removing them is a Good Thing, right?

Because the “diff” tool in common use where I worked was not configured to ignore differences consisting only of whitespace, each trailing space that Emacs had deleted was highlighted as a source code change demanding attention from the code reviewers. Instead of a few lines appearing as changed, there were dozens.

I found these spurious differences annoying, but thought the right thing for code reviewers to do was to ignore them, since these were not real changes.

Imagine my surprise when I was asked to put the deleted whitespace back!

The reason given was that, in addition to the burden on the code reviewer of having to ignore all these changes-that-are-not-really-changes, the source control software might have trouble handling those “differences”.

Now, the person who made the request is a smart fellow, no bozo. Yet he felt obliged to urge me to spend precious development time in order to better adapt to that broken source control software.

Of course, many organizations developing software have a filter that removes trailing whitespace as part of the check-in. But the relentless pressure to get things done, coupled with the fact that humans are more intelligent and more adaptable than either organizations or software, means that we humans do the adapting, even when the entire point of the organizational procedures or computer software is to help us do our jobs.

Copyright © 2009 Possum Technologies, All Rights Reserved.

Perverse genius

We might well consider a person who is nearly always right in his/her judgment a genius.
What about the person who is nearly always wrong?

If one were to make a series of binary decisions, where one alternative was right and the other was wrong, by flipping a coin, one should tend to be right about 50% of the time.  A person who is wrong in making binary decisions, say, 95% of the time could be valuable as an oracle, provided we always remember to reverse the profferred advice.

Such a person could help us in choosing investments, for example. One perverse genius advised me to buy Food Lion stock, just before ABC News broke the scandal about Food Lion's meat department. I have no reason to think this person had any inside knowledge, just a knack for wrongness.

I have known a few individuals with this sort of instinct for consistently choosing wrong technical approaches to problems. For example, given a file F1 consisting of a 2000-line procedure P that contained a line with the single statement S, instead of changing:

   S;

to

   if Some_New_Condition then
      S;
   else
      T;
   end if;

in procedure P in file F1, the perverse programming genius created a file F2 that was a perfect copy of F1, except that procedure P was renamed to Q and the call to S was replaced by a call to T, then visited the multiple sites whence P was called and replaced the call to P with:

   if Some_New_Condition then
      P;
   else
      Q;
   end if;

My first attempt to make sense of this approach led me to think that this person wanted to please management by increasing his number of lines of written source code, and thus his apparent productivity, but he revealed to me that his true aim was to not alter F1 in any way, thus avoiding breaking any of the code contained in it!

In this instance, the perverse genius was not presented with a single binary choice but with many possible designs. Still, if you were responsible for approving the perverse genius's code changes, you would have a binary choice: adding three lines of code to a single source file versus adding over 2000 lines of code, creating one additional source file and modifying every source file containing a call to P.

Copyright © 2008 Possum Technologies, All Rights Reserved.