It's ok, although I have a tendency to wear myself out mentally when I take stimulant meds.
Certain kinds of programming have a very high activation energy. In each programming session, it can take a lot of time (sometimes hours) before I've gathered enough context to start making progress on a problem. Once I start making progress my motivation is usually self-sustaining. Sometimes I can't focus long enough to get to that point, and in that case the stimulants do help.
However, I also become very reluctant to take breaks and lose the context I've built up, so I often end up working quite late. I feel exhausted and sort of disoriented sometimes after these sessions. I can't do days like that too often without sacrificing health, relationships, etc.
In 2020, meds didn't help me at all. I just ended up being really focused on some useless distraction or cleaning my house or whatever. My problem was more fundamental than "I can't focus long enough to build up self-sustaining momentum."
What don't you like about programming on meds?