The real psychological reasons behind late-night bugs, tech debt rage, and how to make peace with your own codebase.