I think the biggest key to success in computer science is to plan ahead. Whenever you start things at the last moment in computer science, it is a recipe for disaster. My worst grades are made when i start a programming assignment the night before or day before it's due. Procrastination is a Computer Science majors worst enemy.
Another key to success within computer science is showing up. Some people preach effort and hard work. I believe in those things too, however, I think that simply by showing up you're setting yourself up for success.