My limited experience agrees with Ryan Williams's answer. As an undergraduate, I wrote a paper with my advisor (last name Mills) and she insisted that my name appear first (my last name is Shelly) so that readers would know that I did most of the work. She was actually being quite generous, and I think really she just wanted the publication to benefit me as much as possible. As she said, if people saw my name second they would assume that I helped out with some trivial aspects of the paper.