One of my previous room mates was productive when he was smoking. He got bored, smoked and coded. Seems like it depends on the person.