In the spirit of trying to drum up some fun discussion, I ask you the following:
Do you have a particular programming brain-cramp or faux-pax that stands out?
Mine, was just this past weekend.
I am in the building a tool based around OpenSSH. So, I have this routine:
my $failedActivation = 0;
sub activateFirstCluster
{
my $offlineStatus;
if ($failedActivations eq 3 )
{
$offlineStatus = &executeTaskSequence($clusterHost, @offLineSequence
+);
}
else
{
$command = "/bin/ls";
($error = &runSystemCommand($command)) && $failedActivations++;
print "failed $failedActivations times\n";
return $success;
}
}
So, as part of my testing, I deliberately injected an error, by specifying $command = " /bin/l ". I was going nuts trying to figure out why my counter wouldn't increment. About an hour or so later, it dawns on me that my system alias for " ls " is " l ".
At the time I thought it was pretty funny. But somebody's gotta have a better one than that.