I guess one needs to start talking with the professor months (or even longer) before you asking for recommendations.