You have taken at least one of my courses and you have done well in at least one of them. This means that you have a grade of at least 8 out of 10 in one of my courses. I could make limited exceptions to this rule, however I do need something positive to write for you. Hence if you have a lower grade, the chances are smaller.
You have done your Bachelor's, Master's, or PhD thesis under my supervision and you did well.
You have worked with me on some research project or on any other type of project related to my work.
If you decide to ask me for a recommendation letter, please follow the instructions below:
Ask me as early as possible (I suggest at least 1 month before your deadline, if you ask me 5 days before the submission deadline, I may not be able to help you).
Send me an email where you should explain to me why you need a recommendation letter (e.g., are you applying for a M.Sc. program?), why you think I am a suitable person to write a letter for you (list any courses you have taken with me), and also attach in your email a recent CV and your transcripts. Send these in PDF, avoid .doc files.
Send me any other information that may help me write a better letter for you (involvement in other projects, past work experience etc)
If I do not reply to your email, please send me a reminder in one week.