I am amazed you were using mephedrone on regular basis for coding marathons? One can do quite a lot of things on mephedrone but trying to find a missing semicolon or figuring out even the simplest algorithms is not on the list of things I would ever enjoy on meph.

While meph is highly stimulating and increases focus it's way too euphoric and talkative to be a good drug for anything else than partying in my experience. Note though that I always used it in high doses so things might be different in few tens mg range. Still I'd say even methamphetamine is better option for productivity despite it's label of terrible killer drug.
Now, all the fluoroamophetamines are good, whether 2-fa/3-fa/4-fa/4-fma, also maybe 3-fmc/4-fmc (those are cathinones though like meph which rarely works out longterm for being productive).
Methyl/ethylphenidate have been used for ages, as well as strict amphetamine (which is simply the best IMO).
Avoid all pyrollidines like MDPV and anything psychedelic and anything too emphatogenic obviously.
I assume you don't like coffeine, neither do I, but for most people it helps.
Now always good to mention is that truly longterm the most effective aid is healthy lifestyle, means healthy food, physical excercise, good sleep, next to none drugs of any kind and avoiding stress. Such person is more effective than a tweaker who sleeps badly, eats shit having to deal with comedowns. In the beginning stims make you superhuman but it's hard to keep it that way.
Save for cases where you need to work nonstop for 24 hours etc.