I do my best work when I take stimulant medication. I simply do not get as much done without it, and even then I find it can be ineffective. With programming I often lose track of what I'm doing and end up off task without even realizing it. I can have a low tolerance for working on things that do not interest me, finding it almost physically impossible to apply myself. Somehow amphetamine salts make me feel more engaged with things I might otherwise find dull.
I should note that I was tested for ADHD and the results indicated that I actually didn't have it, even though the symptoms of inattentive ADHD seem to describe me perfectly.