When I quit drinking coffee, as well as smoking cigarettes, my programming productivity went through the roof. I was convinced for years that caffeine and nicotine were improving my natural talents; you can find tons of studies showing that nicotine improves short term memory, for example.
But you know what those studies didn't talk about? Withdrawl. I was drinking 2 pots of coffee a day and smoking 2 packs a day. I was on a constant up/down/crash/withdrawl cycle. All day long. If I hadn't just put chemicals into my system, I was thinking about them. I was planning my meetings around being able to get a smoke in, or which ones I could be late to so I could smoke before them. I would need 15 minutes before a long meeting, so I could have 2 cigarattes, so sneak out for one. Do you know how embarassing it is to come back from "the bathroom" in the middle of an important meeting, and realize that company executives know that you ditched the meeting for 10 minutes to smoke a cigarette and refill your coffee?
On top of that, I was fairly tightly wound. After all, I was either riding a constream stream of uppers, or crashing from them. Throw in the constant vending machine sugar and corn syrup buzzes. Never mind the health effects of this lifestyle (I was putting on 25 lbs. year for the last 2 years that I lived like this); when I went for a checkup in 2007, the doctor considered putting me on cholesterol drugs because my cholesterol was so high, and I was only 28 at the time! I was a miserable jerk to be around. I had to work extra hard to be nice to people, because I was so edgy all of the time.
Maybe some people can handle caffiene and cigarettes, but I can't. There was nothing "productive" about it for me.
In the last 18 months or so, I quit smoking, no longer consume caffeine in any form (other than trace amounts in food), cleaned up the way I eat, and exercise (a combination of cardio and intense weightlifting) 6 days a week. Over that period of time, I dropped 30 lbs. of fat, put on 30 lbs. of muscle. My cholesterol dropped 9 points as of September, and I am looking forwards to another large drop this year. The amount of energy I have is unreal. I can put a laser focus on my job, because part of my mind is not constantly watching the clock waiting for my next cigarette or cup of coffee. I'm not constantly in and out of the bathroom. Thanks to my heavy lifting regime, my back and forearm muscles are much stronger, which has eliminated the pain I used to get from sitting at my desk, and has severely reduced the pain from typing/mousing that I used to experience. When I put my head down at night, I fall asleep and stay asleep. And I am now longer a pain in the neck to deal with.
My experiences may be a bit more extreme that others. But let's get real. Having a quiet area to work in will do more for your concentration that any amount of caffeine or nicotine.