9 Code Smells of Preprocessor Use - Quality Coding Preprocessed food also smells [This post is part of the Code Smells in Objective-C series.] Every time you use the preprocessor, what you see isn’t what you compile. With few exceptions, using the C preprocessor is a code smell. Here’s a handy command to run from Terminal. find . \( \( -name "*. This command builds in some exceptions. Here are some common preprocessor idioms, and how to replace them: 1. Let’s start with a simple one that comes from our C heritage: Smell Unless you’re delivering platform-agnostic C or C++ code, there’s no reason to use #include, along with the accompanying include guards. 2. #define WIDTH(view) view.frame.size.width Just because you’re in Objective-C doesn’t mean you can’t use plain C functions! And this isn’t your dad’s C! static inline CGFloat width(UIView *view) { return view.frame.size.width; } 3. Now we begin a set of preprocessor smells around constants. #define kTimeoutInterval 90.0 If a constant is used only within a single file, make it a static const.