Make sure the person knows who you are, and that you are in good standing with them. A letter of recommendation can go one of two ways. The recommender can write a letter recommending you, a neutral letter, or a letter against recommending you. Stan emphasized asking the writer if they could “write a positive letter of recommendation.”
At large universities it can be fairly difficult to get a letter of recommendation from a professor teaching a class of 300+ students. Most commonly, that professor can have at least one or two other classes which can make it even more difficult for students to get a good quality and positive recommendation. One method of getting around this dilemma was recommended by the Biological Sciences Councilors here at UC Irvine. It is acceptable at large universities that TA’s assist in the writing process and that the professor agrees to co-author the recommendation letter. Doing this may be easier than getting a professor to know you on a personal level all while maintaining the same weight a letter directly from the professor has.