Life is a marathon, not a sprint. If you stay up all weekend working or studying and ignoring your sleep, you're going to start the whole week off with a crash. If you throw caffeine or alcohol in to the mix and you only amplify the effects. Caffeine doesn't actually give you more energy it only prevents your body from realizing how tired it actually is. To me, caffeine is like borrowing energy on credit. You're borrowing energy from the future and with the crash you pay an interest penalty. Your energy also becomes inconsistent if you don't sleep on regular schedules and avoid caffeine.
Don't focus on trying to get all of the little wins. Don't go for the low hanging fruit just because you can knock it out the fastest. Go for the most important task that will move you towards your most important goal. Constant progress, even if only a little, is critical to maintaining focus and momentum towards the goal. The small tasks should be seen as the cherries on top, the dessert to be had after the main course. You don't want to get full on dessert and junk food before you eat the entree. Emails and ad-hoc tasks never stop coming in.
After years of learning and teaching both music and programming, I have noticed many similarities. These are some of my opinions and interesting scientific studies that give some insight in to their relationship.