Ask for recommendation in person?

is it better to ask your potential recommendation writer in person or via email?

I have already asked my boss to write one of the letters,the other person i'd like to ask is one of my history professors. Ive taken a few of his classes and he knows me (my face, name, interests, etc) but we are not 'close'. Though im sure he'll say yes, I feel like it would be rude to put him on the spot if I visit during office hours and ask in person. Thoughts?