When you're stuck on something creatively, you can't solve a problem, you go to a coffee shop.
When you drink coffee, you become very focused, and in fact, the key to creative genius is to be defocused.
If you walk into a coffee shop in 1903 Vienna, you might find at the same table the artist Gustav Klimt, Sigmund Freud, Leon Trotsky and possibly Adolf Hitler, who lived in Vienna at the same time.
People don't go to Starbucks for the coffee - of that I'm pretty sure - they go for the atmosphere, they go for the 70 decibels, they go for the Starbucks effect.
The coffee shop played a big role in Vienna of 1900. Rents were sky high, housing was difficult to come by, your apartment probably wasn't heated, and so you went to the coffee shop. You went to the coffee shop because it was warm, because it was great Viennese coffee, and you went for the conversation and the company.
The coffeehouse is good for genius, and the Viennese coffeehouse is a classic case. Freud had his favorite coffee shop, and so did Gustav Klimt.
Psychologists call it "defocused attention," where you broaden your horizons, let your mind float and drift a bit. Coffee keeps us sharp and alert. It's great if you're driving at 3 o'clock in the morning. It's not so great if you're trying to come up with the next violin concerto.
I would love to think there is a direct relationship between coffee and genius, but they've done studies, and if anything, caffeine probably makes you a little less creative.