staring at a 300-line function, asking myself what I was thinking.