I found an environment with lots of paired programming, or mentoring was best for my ADHD.
Having someone next to you was wonderful for keeping me on task, and I really shined. Other situations where I was constantly helping people get unstuck also made me the office hero.
Otherwise I struggle like crazy.