Abdoullah sends us this little blob of C#, which maybe isn't a full-on WTF, but certainly made me chuckle.

if (file!= null)
{
  if (file.name.StartsWith(userName))
  {
    if (file.name.StartsWith(userName))
    {
      url = string.Format(FILE_LINK, file.itemId, file.name);
      break;
    }
  }
}

Are you sure the file name starts with the user name? Are you really sure?

This code somehow slipped by code review, helped perhaps by the fact that the author was the senior-most team member and everyone assumed they were immune to these kinds of mistakes.

No one is immune.

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!