My team uses Team Foundation Server for source control, and today I fixed some bugs and smoke test application before I checked it in but I forgot to comment some code. (This code made the UI a little bit strange.)

I want to know what good practices there are before checking code in - I don't want to make this kind of mistake again.

One thing I have gotten in the habit of doing is always looking at the diffs of every file I'm about to check in, right before I check them in.