In what ways can a PHD student who asks me to do some of her work give me due credit for my work? A PHD (in Computational Biology) student asked me to do some programming for a software application she is developing as a part of her work for her PHD. To be more clear, she is not asking for any help in the design part, but rather in the implementation.

The PHD student I am talking about was my teacher in my undergrad. She taught me a software related course in my undergrad, and was generally a very nice teacher. She taught well, and she was polite, cooperative and kind. 

She called me yesterday and told me that she is doing her PHD. The mobile application she wants to develop is only a small part of her work. She asked me to help her with it. There are two kinds of help that she mentioned:


She wants me to guide her on how to go about learning mobile application development. I am fine with that. 
She said that she is very busy and if her schedule gets tighter, she will like me to complete the application. The application has not been started yet, and she told me about already being very busy, which tells me that she wants me to write a considerable amount of code for the application. 


From my web search, I found out that doing this is permissible, if the work of the external person is acknowledged. 

So, if she does want to acknowledge and give me due credit if I do some work (that is if I actually write some code for her application), in what ways can she do that?
She should mention your contribution in the acknowledgments section of her thesis and the related article(s) she might publish.

Additionally, she could provide monetary compensation for your time. Or, as per Dan Neely's suggestion, she could arrange that you receive academic credits or that your work counts as one of the requirements for getting a degree. This is only applicable in a subset of situations where you are pursuing a degree and where the involved institutions are willing to do so. 

In response to comments arguing that you should get co-authorship, or that you could bargain authorship instead of a salary, I'm copying the authorship guidelines of the ICMJE:


  The ICMJE recommends that authorship be based on the following 4 criteria:
  
  
  Substantial contributions to the conception or design of the work; or the acquisition, analysis, or interpretation of data for the work; AND
  Drafting the work or revising it critically for important intellectual content; AND
  Final approval of the version to be published; AND
  Agreement to be accountable for all aspects of the
  work in ensuring that questions related to the accuracy or
  integrity of any part of the work are appropriately investigated and resolved.
  
  
  In addition to being accountable for the parts of the work he or she has done, an author should be able to identify which co-authors are responsible for specific other parts of the work. In addition, authors should have confidence in the integrity of the contributions of their co-authors.
  
  All those designated as authors should meet all four criteria for authorship, and all who meet the four criteria should be identified as authors. Those who do not meet all four criteria should be acknowledged.