Vicky and a handful of colleagues were contracted to help architect and put together a network management system for one of their clients. They did a pretty good job: management appreciated the effort, users were happy, and the code was top-notch. And then they left.

Things, apparently, went down hill from there. They came back a couple years later to try to get the system back up and running. They were amazed at how some of the internal coders maintained the system. For example, they found this rather inventive way of removing colons from MAC address strings from the function that generates them ...

void MacAddrToChar (uint8 *macAddrInt, char *macAddrStr)
{
  sprintf (macAddrStr, "%02x:%02x:%02x:%02x:%02x:%02x", 
    (*macAddrInt) & 0xff, (*(macAddrInt + 1)) & 0xff, 
    (*(macAddrInt + 2)) & 0xff, (*(macAddrInt + 3)) & 0xff, 
    (*(macAddrInt + 4)) & 0xff, (*(macAddrInt + 5)) & 0xff);

  RemoveColonsFromMacAddr(macAddrStr);
}

void RemoveColonsFromMacAddr (char *macAddrStr)
{
  int i, j;
  char  tempStr[16];

  j = 0;
  for (i = 0; i < strlen (macAddrStr); i++)
  {
    if (macAddrStr[i] != ':')
    {
      tempStr[j] = macAddrStr[i];
      j++;
    }   
  }
  tempStr[j] = '\0';
  strcpy (macAddrStr, tempStr);
}