I have ADD and am a coder. I am on Concerta (methylphenidate, a derivative of methamphetamine) and find that my interest in math, as well as programming, has increased significantly.
I've given dex to other programmers on occasion; they're often amazed at how much it helps them concentrate and get things done.
It's kind of like coffee that WORKS.
Hence my favourite programming beverage: grind your beans, sprinkle finely powdered amphetamine on the top of the basket, and make yourself a nice motherfuckiato.
That's mighty addictive stuff, for someone with the wrong combination of genetics and psychology, this could be really bad.
The drug war is full of nonsense - but amphetamines are regulated for a good reason.