I think I may be about to make a coding breakthrough, but right now I'm in the "I am stupid and I hate my life" stage of dealing with a programming problem.