In a few weeks, my project is going to be finished and I want to start getting my code ready for other people to use it.I am going to be posting everything to GitHub so people can tweak it and hopefully make it better.I guess what I'm asking is, what would be the best way to make sure my code is sufficiently documented and worded right for other people to use?I know you should always comment everything and I'm going to be putting in the @params feature for every method, but are there any other tips in general?
How should I get my code ready for OpenSourcing it and putting it on GitHub?
coding style;coding standards;github
Make sure there is a README.txt file in the root of the repository that points people to instructions on how to build it. The instructions could be in that file, or they could be in a separate file or wiki page. Ideally, make it so that you can completely build and test the code with a single command. Don't require a bunch of manual steps. Make sure you have tests for the code. This provides a convenient place for other developers to see how your code is used, plus it provides a safety net for people who modify your code. Knowing I can edit your code and then run a suite to see if I broke something is invaluable. Follow common coding standards, or publish the ones you use. If your code uses OO, make sure at least all public methods and attributes have sufficient documentationMake sure it's clear what license your code uses. Typically this means to include a LICENSE.txt file, or follow whatever mechanism your specific license requires. Also, make a conscious choice about the license. Don't just use GPL because that's all you know. Likewise, don't just use BSD or MIT or Apache if that's all you're familiar with... spend an hour researching those so you at least understand the fundamental difference between GPL and non-GPL licenses.Remove all sensitive information from the code, such as hard-coded usernames, passwords, email addresses, ip addresses, API keys, etc. (thanks to Hakan Deryal for the suggestion)