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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|