Pulling an all-nighter when I'm already in sleep debt only produces code that sucks. The next day, I'm too tired to be functional and I've got a bunch of code that needs to be thrown out and rewritten. Sleep is a better use of time.
If you are really hardcore you can go all out and convert to the Uberman polyphasic sleep cycle. 6 20 min naps, every 4 hours apart. Once adapted you can code for 22 hours a day its awesome...
If you're really interested you should try to find a copy of Why We Nap by R. Broughton. There's a lot of confusion and general BS on the net about Polyphaic sleep. This book takes a scientific approach. The problem is its no longer in print so you might try a university library...
As far as how it works, I love it. Being awake for so much of the day is a huge plus, but the biggest improvement is actually in how you feel. Much sharper, better concentration, mood, etc. That is if you can make it past the adjustment period and you can stay on schedule. The big downside is that its still socially a "weird" thing. People will look at you crazy when you try to explain it...
Kratom is a great stimulant. If you take too much, you don't get jittery, you just get really happy.
If you really need to pull a few all-nighters, consider taking something on a measurable dosage, so when you decide to rehabilitate, you can adjust your intake on a decay curve.