I'm a high schooler, taking 7 AP courses and 2 other courses with no lunch period (I have to eat during some classes). After school, I run 10 miles cause I'm on the distance running team. I get home, shower, dinner, and between 8pm and 7am, I have 12 hours to do a combination of sleep/homework/programming.<p>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.<p><i>Prioritizing</i> 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.<p>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.