The old carrot-and-stick method can work, but researcher Katy Milkman suggests a better version: temptation bundling.
Or make it a rule to only visit your favorite coffee shop if you re studying.
Milkman discusses the concept on an episode of Freakonomics, and talks about how to implement it:
What I realized is that if I only allowed myself to watch my favorite TV shows while exercising at the gym, then I d stop wasting time at home on useless television, and I d start craving trips to the gym at the end of a long day because I d want to find out what happens next in my show.
And not only that, I d actually enjoy my workout and my show more combined.
I wouldn t feel guilty watching TV, and time would fly while I was at the gym.
Of course, you want to be reasonable about it.