This is actual code I was reviewing a few months ago. I've anonymized the code and did a bit of renaming...
- (BOOL)aTerribleMethod:(NSString *)iDontKnowWhatImDoingIf you've ever written something like this, please quit programming.
{
if(iDontKnowWhatImDoing isEqualToString:@"YES") {
[self callAnotherTerribleMethod];
goto bail;
}
if(iDontKnowWhatImDoing isEqualToString:@"SOMETIMES") {
[self callYetAnotherTerribleMethod];
goto bail;
}
if(iDontKnowWhatImDoing isEqualToString:@"NO") {
goto bail;
}
//Do a whole bunch of other stuff
bail:
}