Rules to Better Open Source Software
If you get a tradesman in to fix your tap, and on the way to the kitchen he sees your bookcase is messy and re-orders it for you.... you probably wouldn't be very happy.
When you contribute to open source projects it is great to fix bugs and contribute features, but it is essential to be respectful of the people that came before you, and possibly have invested lots of time in putting everything where it currently is.
This issue is described beautifully here http://tirania.org/blog/archive/2010/Dec-31.html
For the original article check out Don't "Push" Your Pull Requestsby Ilya Grigorik.
Open source software projects love it when the community get involved and pitch in.
It's great when someone fixes a bug.
A short pull request to fix a small problem is easy to review and accept.
It's great when someone adds a much-needed feature...as long as the feature fits in with the project the core contributors have for the project...and it meets the existing coding patterns and engineering standards.
This is where frustration often starts to set in on open source projects.
A contributor has a great idea for a feature, or identifies an area where they can add value and does so without consulting with the core contributors who have often spent hundreds of hours working on the project.
Their contribution might solve their problem, but after it has been accepted it will most likely be left for the core contributors to maintain.
# Poor Communication Contribution
- developer has good idea for project
- bashes away and writes 600 lines of code
- submits pull request
- core contributor looks at large pull request she doesn't fully understand purpose of request / the problem it solves she doesn't like that the PR author hasn't followed the existing coding standards she makes a push back comment
Figure: Bad Example - Poor early communication can lead to mis-directed work and pull requests not being accepted
# Good Communication Contribution
- developer (PR Author) has good idea for project
- reviews the list of outstanding issues for the project and confirms that someone hasn't already had the same idea and started a discussion on it
- author creates an issue on GitHub and outlines the problem they are trying to solve, and outlines their suggested solution
- the core contributors and other interested parties can help refine both the idea for the feature and the suggested implementation
- the author can then start working on the feature knowing that their idea for the project complies with the maintainers vision for the project and know it is likely to be merged into the core codebase
Figure; Good Example - Good communication leads to collaboration and better outcomes for the author and the project
# Projects with Internal Teams
- Internal SSW team members should only work on features during work hours that have been assigned to a release by the core contributors for a project
- Features will be assigned to a release during the Community Standup
It is important that users of your open source contributions are aware if you are maintaining them and keeping them up to date.
The key to building a great open source project is to build a great community around your project.
To do this it is essential that potential contributors can find out how to get involved.
It is a common pattern for open source projects to contain a CONTRIBUTING.md markdown file that supplies information on how to get involved.
The code within your solution should be consistent. (We all know that)
In an open source project the easy way to ensure that all developers share and are aware of the expectations is to include and ENGINEERING-GUIDELINES.md markdown file that includes important technical considerations like:
- Copyright header requirements
- Approved external dependencies
- Coding guidelines and standards
- Source control requirements
- Branching strategy
- Solution and project folder structure and naming
- Unit testing requirements