Something Obvious: Learn Your Tools

Yes! Learn your tools. It's amazing how many wannabe programmers who are just starting aren't really willing to learn their tools. Now, by tools I mean tools like compiler. Usually, if the compiler gives them a warning - they would rather learn how to disable that warning, instead of learning how to fix the code so that the compiler wouldn't give the warning anymore.

Let's say you are driving the car. Suddenly, on the cars panel, one of the lights starts flashing. You look at the light - it's flashing because you're out of gas. Now, what do you do? Do you disable the light so that it doesn't annoy you anymore, or do you fill the gas-tank?

Same with programming. All compilers, these days, are pretty smart. They're pretty good at detecting smelly code. And when they do detect such code - they issue a warning. Now, compiler doesn't do that only to annoy you. It does that because it actually wants to help you! Compiler is your friend!