So, if you are like me, you tend to stub out incomplete methods or add in comments to indicate that something needs to be done in the future. I have done this using a specific and consistent pattern since I started programming. My style has always been something like this:
// FIXME make sure to finish this method out
-(void)someMethod {
}
This works fine as I have made it a consistent habit of global searching my project for FIXME before deploying. Xcode makes this soooo much easier and much more reliable with the #warning flag. So now, at least with Objective-C, my style is now this:
#warning FIXME Make sure to finish this method out
-(void)someMethod {
}
This way the compiler warns me EVERY time I build and things which used to be forgotten until right before deployment are brought to light every build.
I have also taken this a step further and changed my code snippet for NSLog to this:
#warning FIXME REMOVE NSLog(@"Log %@",someObj);
That way, I get warnings for all my NSLog statements, so I can take them out of production code.
#pragma mark – here is where i implement this set of methods is also a great search tool…
I didn’t know about the #warning… added it to some code tonight!