Mobile communications is a complicated but lucrative business. With all the buzz surrounding (and created by) cell phones, that's not surprising. And they're not just for calls any more! The new big thing is interacting with web pages and other applications via SMS.


What's SMS? Who knows, but it's an acronym so that means it's probably great. At least that's what Jared's company thought, which is probably why they were in a mad scramble to interface their web service with every cellphone on every network, ever. The problem? No one knew anything about how SMS worked.


In these sorts of situations, there is only one course of action: hire a contractor. And that's exactly what they did, except this was no ordinary contractor. This was a contractor hired by the Vice President of Marketing, who was tired of waiting for Engineering to do whatever it is they do.


What they asked for was code to communicate with different mobile carrier SMS gateways over the internet. Three months later, Jared was asked to evaluate what the VP was calling the final product and the contractor was calling demo. Our hero was determined to complete this task, despite not actually having any source code. Pulling out his trusty decompiler, he found what follows.


private object GetEmailBasedOnCarrier()
{
string text1;
    switch (this.MobileCarrier)
 {
case SMS.EnumMobileCarrier.T_Mobile:
text1 = "tmomail.net";
goto Label_005B;
      case SMS.EnumMobileCarrier.Virgin_Mobile:
    text1 = "vmobl.com";
       goto Label_005B;
          case SMS.EnumMobileCarrier.Cingular:
       text1 = "cingularme.net";
   goto Label_005B;

      case SMS.EnumMobileCarrier.Sprint:
text1 = "messaging.sprintpcs.com";
       goto Label_005B;

      case SMS.EnumMobileCarrier.Verizon:
   text1 = "vtext.com";
       goto Label_005B;

      case SMS.EnumMobileCarrier.Nextel:
   text1 = "messaging.nextel.com";
       break;
}
Label_005B:
return (this.PhoneNumber + "@" + text1);
}

The contractor was paid in full and, with bated breath, they waited for the full version. One of the new features, the contractor told Jared, was that instead of using "email calls" it now made "ip calls." When asked what these calls looked like, the contractor sent back

verizon: [email protected]
nextel: [email protected]
sprint: [email protected]

 
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!