I know that ADHD meds like adderall and anti-narcolepsy pills like Modafinil are all the rage in tech. But is it worth developing a dependency on them?
Or, should I just accept feeling like a tired potato?
More personally what I did with my caffeine problems was consume less and restrict the time I have it. One good coffee in the morning is enough, the withdrawal will suck but you'll sleep better in the long run. And the trick to not feeling tired all the time is to sleep well and not consume a bunch of nasty stuff in the afternoon and evening that your body can't handle well in excess.
Psychoactive chemicals aren't a solution if you don't have a problem that they can really help. That's why you see a doctor or three to determine if it's worth the risks.
I also like to drink much less than the max before I start feeling bad, so that if I have a really long day I can drink more than usual and really feel the effects, without needing to have so much that I have a bad trip(Some of the Starbucks drinks will make me feel like crap with just one of them).
There seems to be studies saying coffee drinkers live longer, and it tastes great, so I do enjoy a daily cup or two of coffee or tea, but I would not want a lifestyle where I couldn't have no caffeine at all most days if I did want to.
I mention this one a lot, but removing a lot of personal side projects from my life has helped me tremendously. I think of it kind of like decluttering, but in the time domain.
I've even mostly changed my stance on open source from "Always use it" to "Avoid things that cause vendor lock in, otherwise prefer FOSS if convenient, but don't hesitate to use proprietary".
Of course you might not have easily discardable projects to free up time with, if you're busy with work or study grinding.
I mostly do it because I like the thrill of building something in one weekend. I would not like to live a life where I have to use it to keep up with work though.
Then after the pause, go back to drinking 1-2 cups per day and never more.
Reframe your question starting from this. You should not be needing caffeine to stay awake as a rule and normal baseline in your life. Solve that problem before thinking of starting with a stronger drug.
Talk to your doctors.