I've been thinking about all of my years of schooling and the difference between times that I excelled and times that I failed or just got by. There are some of each.
In grade school, there were structural changes that made a difference for me. In elementary school, I generally had good grades just because I was academically ahead of my peers and homework wasn't such a big deal. I also did well in the gifted program at my main elementary school, where we had a certain number of tasks to complete independently each week, the completion of each of which led to a box being hilited in your folder. If you finished early you could play (educational) games on Friday, and I loved my teacher very much.
Middle school was more of a struggle, because suddenly things like keeping your folder in a certain order were important, and homework began to be more of the grade, which was calculated in a more fixed fashion than before. Some teachers were more flexible than others if you got high test grades but didn't turn in a lot of homework.
And yet, in 7th grade, the middle year of middle school, I got all A's the entire year. I remember doing the same things I had always done - leaving assignments until the last minute if I did them at all, being smart but disorganized, etc. - but I think what made the difference was that I really loved some of my teachers. I had a giant crush on my earth science teacher (Mr. Garrett) and my English teacher (Mrs. Agrons) was the bomb as well. (She taught us to write essays. I remember a whole board filled with statements about Rikki Tikki Tavi that were and were not thesis statements, e.g., "Rikki Tikki Tavi is a weasel" - not a thesis statement - vs. "Rikki Tikki Tavi succeeds through cleverness.")
So, clearly I do better when grading is flexible, and I do better when I love (and thus want to please) my teachers. But those things are pretty much beyond my control, and in particular, the flexibility of grading becomes much less of an issue once courses become hard enough that I actually need to do the homework in order to succeed. (At that point, graded homework becomes a help to me, since it's slightly harder for me to do otherwise.)
If I go to grad school, there probably will not be classes where I can ace the tests while blowing off the homework.
But, more interesting than this stuff is something that I have noticed only recently, though I think it is a pattern of long standing. When I specifically desire to excel at a class, then I do; when I view the class as something to get through, or something I don't want to fail, then I tend to do poorly. I think most of the classes I've taken in my life I've viewed in the latter way - as obligations, basically, or something I just needed to survive - and so I haven't done very well at them.
When I find a class very tricky or puzzling (like Logic at Rice), or I love the teacher (like Mrs. Agrons), or I want to defeat my classmates, or somehow or other I really want to do well, then I generally perform at or near my best. By contrast, when I don't really see an upside to the class, I have a hard time even meeting the minimum standards.
I am not sure how much this generalizes to life, but it strikes me that one of my problems at work is that I don't really see much point to excelling at my job. When I apply a very moderate amount of effort, people are very impressed (probably because most people who have my position are not very talented, or they'd be engineers or something instead). There are not spot bonuses or anything like that. Mostly they pay me a fixed amount of money as long as I do whatever is basically required of me.
I am led to understand that some people have an internal drive to excel (or to be professional or work hard), but I seem to be much more likely to respond to external incentives like grades or professorial approval. (I do respond to some internal things, like feeling brilliant - which is part of why I can excel at math - but doing a good job at work doesn't usually make me feel brilliant since most of my job is pretty easy.)
This is probably why I like school so much, just in general. You get constant feedback (I love getting graded things back) and there are always new people to please and impress.
I wonder if I can find a way to internalize the desire for excellence such that it applies to more situations and is less reliant on external motivators.