collaboration in phd project from an undergrad student Actually I am making my PhD studies that is in the field of Computer Science and its algorithms related. There is one part in which for proving my ideas I have to program a web related extensive set of tests, but currently I really do not have time to program it. I have met a friend that is following an undergraduate degree in CS and he has been working in web development and programming for almost two years. 

The question is if it would be ethical to tell him to program some parts that I need for make the testing. I was thinking to include him as a co-author in some papers that I am planning to do based on my current research, because I consider is the right thing to do. Would that be fair?

Thanks
That's probably a question best asked of your PhD adviser -- if you want your friend to become a co-author, your adviser will have to know about that friend's contributions anyway.

In any case, if your friend contributes significantly to the work, it's not a question of "being nice" when you think about making him a co-author: he contributed intellectually to the work, so he needs to be a co-author.

Whether that is "fair" is a different question and depends on what your friend hopes to get out of it. If he's interested in getting publications, then he may consider it fair. If he is only interested in graduating and then getting a job in industry, he may not be interested in publications and might consider money to be a better way to compensate him for the work.