On Caffeine
I should note that most of the information I have about the brain and anything associated with it comes from Andrew Huberman, so you can safely read on without worrying about the accuracy of what you're about to read (but it's also a good idea to be skeptical of all claims a 20y/o college student makes, so if you wish to dispute anything I've written here, please shoot me an email).
Everyone has their drug of choice, and mine is caffeine. Despite it being the most widely-used psychoactive substance in the world, I feel like most people are unaware of how fascinating it is. It helps you focus, elevates your mood, improves cognition, and gives you a head start to your day - without being addictive1. Bottom line: Caffeine is good for you.
Fundamentally, caffeine works by stimulating the release of Dopamine and Acetylcholine, two neuromodulators responsible for increasing focus, alertness, and feelings of well-being. What's even better is that this release of Dopamine occurs in a manner that's distinct from the classical dopamine pathway associated with addiction and reward (mesolimbic pathway). In the mesolimbic pathway, caffeine only increases the amount of Dopamine receptors, thereby increasing the efficacy of the Dopamine that's already available, instead of tapping into that very potent pathway like so many other drugs (alcohol, opioids, etc.) do.
Use Cases
  • Wakefulness: The reason caffeine is a great way to shake off morning/daytime grogginess is because it is an Adenosine-antagonist, meaning that it competes with Adenosine molecules to bind to the same receptors. Adenosine, present in large-quantities in humans, is a chemical compound that makes us feel drowsy because of the way it interacts with the energy production system in our body. In a nutshell, because caffeine binds to the same receptors as Adenosine, it temporarily blocks the effects of Adenosine, thereby making us feel less drowsy and more alert/energetic. This means that caffeine simply delays the effects of adenosine. It does not get rid of the already present adenosine, and it does not stop that adenosine from doing its job once the caffeine gets dislodged from those receptors.

    Consequently, it's generally not a good idea to take in caffeine right when you wake up. Throughout the course of the day, Adenosine builds up in your body and makes you feel progressively tired. When you sleep, your body metabolizes most of the built-up Adenosine, and after a good night's sleep, Adenosine levels in your body are at their lowest (but not 0). If you consume caffeine right after you wake up, you're not giving that residual adenosine a chance to wear off, so you're bound to feel a noticeable dip in wakefulness and energy once the caffeine starts getting out of your system. The way to combat this is to engage in activities that boost your cortisol awakening response (a walk in the morning sun or physical exercise if you can) right after you wake up, and wait 90–120 minutes before you consume caffeine. Doing so will ensure you're minimizing the amount of residual adenosine in your system, thereby extracting the most out of the caffeine you take in and avoiding the afternoon crash.
  • Learning & Memory: Caffeine leads to an increase in catecholamines (epinephrine, norepinephrine, and dopamine), and they are certainly helpful when you're trying to concentrate on a task or have a focused bout of learning. But a spike in catecholamines leads to the consolidation in memory of the information you learned prior to that spike, which means that if you want to optimize your learning and memory, you should consume caffeine after a learning/study session, instead of consuming it during or before the session. This is certainly the most unintuitive part of how caffeine works (at least for me), and I rarely have the mental fortitude to abstain from drinking coffee until after I'm done studying. That being said, consuming caffeine during a learning session will ensure that your ability to learn and retain information from the session will be at least as good as (and usually better than) not consuming caffeine at all, but waiting until after your bout of learning to consume caffeine is the most effective way to consolidate that information in memory.
  • Performance: Unsurprisingly, caffeine enhances both mental and physical performance. This includes reaction time, power output, alertness, strength, focus, and mood. I personally don't use caffeine as a part of my pre-workout, but I know a few people that do, and their experience aligns with what I just mentioned above.
  • Dependence & Problems: There really aren't any problems with caffeine if it's not abused. As in, don't drink 20 shots of espresso and you'll be fine. Don't drink Red Bull at 11PM and you'll be fine. Since caffeine does not activate the brain's reward circuit, its use is classified as a dependence , not an addiction2. The current consensus seems to be that chronic caffeine use can induce mild physical dependence - the withdrawal symptoms of which may include headaches, nausea, loss of focus, joint pain, etc. Beyond that, no significant harm (that we know of).
My Caffeine Usage
I love coffee, and I love mornings. I look forward to most mornings with the excitement that a 9 year old has on christmas eve. I usually go to Brewlab and get either a 12 oz mocha or a brown sugar latte with oatmilk, or less frequently, a triple espresso. I limit myself to one cup (150-200mg) a day. I also restrict my coffee intake between 10 AM (since I wake up at 8:30 AM) and 12 PM. I've been following this routine for the last 6 months (as part of my Grand Plan To Optimize My Life), and it's much easier now than it was 6 months ago to restrict my caffeine intake to a 2 hour window once a day in the morning.