Excessive use of magic numbers or string literals in code is something of a code smell; not necessarily wrong but worth considering carefully. However, one can set up your editor/IDE to highlight string and number literals in garish colours like pink on lime green. That way, you can't help but notice where you are using these types and, hopefully, this practice will force you to consider carefully how you structure your code and perhaps avoiding the code smell, or concentrating it in well-defined places (like declaring all string literals as constants). Code deodorant if you like.
Another example practice is to use a large font size in your editor. This means that a smaller number of lines of code are visible on the screen which makes writing excessively long methods and classes more difficult - effectively guiding you towards writing short, purposeful functions.
What are other development/management practices which steer your programming in the right direction and help avoid programming code smells? See http://stackoverflow.com/questions/114342/what-are-code-smells-what-is-the-best-way-to-correct-them for an excellent catalogue of smells.