Never leave an unfinished function behind
This is my new coding mantra. Never ever leave unfinished, incomplete, buggy function behind. The chances are, you are going to forget about it and soon enough it becomes a PITA bug to track down.
Once you start writing a function, you must finish it at all cost. Yes, you can feed your cat later. Those tax forms can wait. Lock the door and your wife will have to wait outside too. You don't believe me? Ok, go ahead write that function halfway through and leave it there. Give me a call when you're ready to wash my car (after getting fired from your job!)