Inspired by What’s your favorite “abandoned rule”? What is the number 1 "rule" you know you should follow, but don't?
Go to bed before midnight, not siting behind monitor for "15 more minutes".
My professor preached functions with single entry point and single exit points.. this saved my life a lot of times. But every now and then I slip in return statements in the middle of the function definition rather than refactoring the code around it.
When I consider the code on my project, including some of my code...
Code as if the person who ends up maintaining your code is a dangerous psychopath who knows where you live
Don't take prototype / proof-of-concept code into production. (Now that I think about, Jeff Atwood had a blog entry on this: The Prototype Pitfall). That said, a ground up rewrite v2 frequently happens if the code is important enough.
Keep the original estimation and compare it with the actual schedule after the project is done.