Should I ask for a letter of recommendation when my performance wasn't great at the beginning? I recently finished a vector calculus course in which I received an A and I'm considering asking my professor if he would write a letter of recommendation for me when I begin applying for grad school. My biggest problem is that I did not perform well on the first exam. It was a "wake up call", so to speak, and due to grading policies and a substantial improvement in my subsequent performance I was able to get the A grade. I had articulated my concerns in his office hours and met with him again after my second exam went significantly better, but I'm concerned he will view me as lazy for only performing after I had initially done poorly. Is this request ill advised? I should mention that I still have two years of undergraduate studies left, but I've been regrettably lax when it comes to making faculty connections (something I fully intend to remedy in the upcoming semesters), so I'm trying to capitalize on relationships I've already begun to establish.
I think that the poor performance on the first exam might actually help you to get a good recommendation.  In general, faculty like for someone to learn from their mistakes and make up for it.  

Or, the faculty member may not remember your performance on the first exam and just go by the final grade.  Especially if you ask after the semester/quarter is ended.  

Other things that can help you get a good recommendation include asking for help in a polite and formal way (e.g. without complaining) by visiting during office hours, and asking for specific assistance with something.  

If you have more classes and have the same instructor/professor, then do well there too.  Ask them, in person, "Would you provide me with a positive recommendation for graduate school" and if they seem to grimace or have another negative expression, immediately ask "How can I earn a positive recommendation from you?"  People, especially faculty, want you to earn.