I have heard modafinil is a much better modern alternative for alertness.
I was prescribed modafinil in college to help with the effects of some nasty insomnia that we weren't having any luck getting resolved. Without it, I absolutely 100% would fall asleep in every single class. It worked really well, kept me awake and alert without the jitters and other effects of caffeine, and I could even take a nap while on it if I
chose to. The stuff would help me a ton at work when we have a newborn at home, but it's awful pricey and the insurance will only cover on-label uses, and newborn-caused sleep deprivation isn't one of them...