I have ADHD and OCD. I take medication. This post on ADHD hits hope with me on how people treat OCD. "My OCD is kicking in, it needs to be aligned!" OCD is not wanting things straight. That's human nature. OCD can be crippling. It can take over your thoughts and your life. That's the compulsion. It takes you over. It's doesn't help with programming, it doesn't make your code neat.
It's a terrible combination since stimulant medications tend to increase anxiety and therefore worsen OCD symptoms.
My OCD is largely under control now. It took a few years of CBT; figuring out how much sleep (5 ± 1 hours for me) I need per night; and nailing-down a daily routine featuring bounded compulsive activity in order to, for instance, enable me to get out of the door in the morning.