I haven't read the article yet (I intend to do so when I get some free time). But the best advice I can give you for maximising your productivity as a programmer is to sleep when you are tired. Try not to make an exception of it.
Some people are not very good at organizing their free time so that they get enough sleep the night before. This will hurt your career as a programmer. If you want to improve your performance, drugs will be nowhere near as effective as sleep.
If you have a social or medical situation that making it so that you can't sleep, do whatever you can to fix that problem. I advise you to try to make it your top priority. Get professional help if you need it.
If you are in a situation where you can't sleep because your work/commute time is eating into your sleep time, quit. You are damaging your health and also your ability to grow as a programmer. It is not worth it in any way.
Nothing else I have done has been so important to my life and career as the above.
Agreed here. I found myself lethargic and frankly stupid until I discovered, through a sleep study, that I have sleep apnea. To cure this, I was simply prescribed an anti histamine pill, to be taken once a day, and a corticosteroid spray to be taken in the nostrils once a day. My sleep apnea was cured within a week and my abilities as a developer increased tenfold.
It is really amazing how much of a difference in your personality and abilities a good night's sleep can make.
I would also add, never sacrifice your health in general for a job. It should be possible to maintain a healthy diet, exercise regimen, sleep schedule, social life, relaxation techniques, and perhaps still have a bit of time for other hobbies.
I started using 100mg/day modafinil for the first time about a month ago (week days only). I felt no clear discernible cognitive enhancement that is often said about modafinil use. What I did however notice is that it does a good job keeping me awake to handle one more day in a sleep-deprived state ... only to crash with a god awful hangover a day later. (Severe headaches, dizziness and loss of physical strength). Modafinil masks your exhaustion artificially.
I'm down now to 50 mg (broken pill) for days I feel I need "a starter". This seems to be an optimal dose for me right now but I am certain I won't be using it long term or in larger doses.
Just quietly with those side effects and the fact that you didn't stop suggests you might want to consider whether you have a problem from all the angles. Consider all the silly angles as well. It may be you don't but please entertain the other possibility too. You only get one brain and one body. My best wishes to both.