If a friend casually wanted to hack with me and we wrote something that took off, are they entitled to equity in my company?
Founders Agreement Founders Intellectual Property
Your partner in coding would have joint copyright of the code. This does not mean he is directly entitled to a company that you start, but it does mean that he has a claim to the intellectual property you are trying to assign to the company. Therefore, he probably won't allow use of the code unless he gets some form of compensation, and equity is one them.
Entitled to equity in the company? No.
But, depending on the details of what happened, he may be considered a joint author of the software you hacked together or possibly even a full owner of part of it. Either one of those things could really impact your company's ability to succeed, so it may make sense to give him some equity in the company in return for his interest in the software.
We agree with Henry above that your coding friend owns intellectual property rights to the code he produced jointly with you. While his contribution to the code does not automatically give him equity in your company, you may wish to compensate him with a one-time payment for his code and connect that with a transfer IP rights to contributing code. Getting full clarity about IP ownership is very important. Equity is also one way to do it, but you could also compensate him with a one-time payment.
You don't want to be a Winklevoss twin.
As long as you haven't told him he would then there would be no reason he would have equity in your company. However, when programming and not working for an employer or aren't under a 'work for hire' agreement typically the default 'ownership' of that code is the person who writes it.
So if he is hacking away why you are out running errands I think the IP of that code would be his. But, if all the programming is done on your computer and it's 'pairing' I doubt you have much to worry about. Unless you become a billion dollar company and then he may sue you anyways. To be safe you may want to draft up something simple that anything you guys work on together belongs to your company, not him / the individual that wrote it. It probably doesn't need to even be that official, just something where he is acknowledging it's not his.
But, I'm not a lawyer