So from my experience (as someone who averages 3-4 hours a night), NO CAFFEINE. Caffeine ends up destroying you and making you less capable of doing things. Apples wake you up more than a cup of coffee. EXERCISE. A few pushups in the middle of the night wake you up better than anything.
Prioritizing is probably the most important. I usually go Schoolwork -> Programming -> Sleep as my priorities. On days before track workouts or races or big tests, I swap Sleep and Programming as priorities.
It really is difficult to balance school and programming, but hey if you want to pursue something you gotta give it your all. Just don't destroy yourself while you're at it. I exercise, eat, and sleep binge on weekends. Its a good life.
Though, admittedly it hurts your liver and slows brain development. And bad sleep patterns will follow you later into life...
but hey, we're young and we think we're invincible! Dont ruin the illusion! ;)
Instead it is always from someone working on something lame and going to some random 2nd rate school. Most people who are good at what they are doing have time to sleep.
Not gotten enough sleep? :D
I guess to each his own though.