drieuxster (drieuxster) wrote,
drieuxster
drieuxster

Why We Must Stop The Satanists....

Winner in, "Oh now That Sucks" coding moment.... my fave the SemiColon Splice


The specific piece of code fragment...

while(my($k,$v) = each %$info)
{
my ($portType,$bladeId,$unitId) ;
$me->getComponentsFromPortListKey($k);

my $otherBladeId =
$me->getOtherOfKeyPair($bladeId);

my $redundancyBladeId =
$me->lookUpKeyPair($bladeId);

my $newKey =
$me->getKeyFromComponents($portType,$otherBladeId,$unitId);

my $otherState = (defined($info->{$newKey})) ?
$info->{$newKey}:'unkown_state' ;
....
}

Yes Kids, we wind up in that most unpeasant of moments there, where while we have our $bladeId, it is NOT doing anything more than getting declared, and the nice getComponentsFromPortListKey($k); method was ever so nice as to get compiled NOT in a list context, but in a VOID CONTEXT!!!!!

The first CLUE things were going WONKY was that there were all of these 'undefined results which showed up as we were trying to get at the $bladeId info.... BUT that really was BECAUSE we had failed to 'init' this DB, and hence to Come through here a FIRST TIME to make sure that the stuff that would be hung was hung with care on the Mantel Piece Where Good Old Saint Nick Would Leave Charming COMPRESSED LUMPS OF COAL, also known as Diamonds, if you were a Good Boy, and Mere ROCKS if You FREAKING SUCK BILGE....

So we go through the PAIN of waiting on the system on the far side, to get back to us, and we wait for the system to get back to us.... and then notice that even IF we have made sure to put

#
# the redundantPortStateDbInit
#
my ($errno, $errmsg,$keyPairArray) =
$comm->redundantPortStateDbInit;

$comm->logOrDieOutIfErrno('redundantPortStateDbInit',$errno,$errmsg);

Into the Sanity Check...

Oh Please Sir, Can I have Another One...
Tags: bong_hitz_4_jesus, code
Subscribe

  • What if we had to be a nation of laws

    First off a h/t to a dear fiend, for Crackdown on herd-share farms over certification which is such a classical attack of the FeeMarketeers meets…

  • why do folks forget the clinton years?

    Essentially I agree with When The Magic Starts in that there is much that will need to be undone from the failure of the deregulation game that was…

  • Oil does not grow on trees.

    Let us start from the premise that fossil fuels are not like renewable products such as fruits, vegetables and other forms of…

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments