This post originated from an RSS feed registered with Ruby Buzz
by Eric Hodel.
Original Post: Contribution Granularity
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Accepting feature additions and improvements to my open source projects can be a tricky thing. Some improvements bring obvious benefits and will be easy to maintain. Some improvements are tangential to my projects and are uninteresting to me. Some patches I outright disagree with, but simply as a matter of opinion.
The latter two types of feature addition are more problematic to maintain. If a problem occurs the original author may not be able to help me in a reasonable time frame, for example when I wish to release a new version. In such a case I will need to expend extra effort to figure out the problem which lowers my morale. Over time this reduces the quality support for portions of my project.
Varying quality across the feature set of my projects is undesirable and personally embarrassing. I don't like to say, "I'm sorry, but I don't know that code very well, you are on your own".
A Solution
I have found it more useful to alter my policy on accepting contributions. Instead of adding contributions to form a kitchen sink I prefer to reject contributions in favor of extensibility. If a feature can stand alone but for a small change to my software I would prefer to make the small change. This may involve altering my API, adding hooks or a plugin system.
More extensible software is more useable by both users and other developers. The contribution constraint also leads to smaller, more flexible and more maintainable software with a better API. The extensibility not only decouples libraries but also development itself as the only communication between developers required is the API and its documentation.
An Example
RubyGems has a gem test command which is also hooked in to gem install -t. It is hard to support this feature well in RubyGems. RubyGems needs to know about every test framework which is useable in Ruby and needs to support their APIs. Since this hasn't been well-maintained almost nobody even attempts to run tests when installing gems.
RubyGems is instead adding the appropriate hooks to move the feature out of RubyGems itself into the rubygems-test extension. This will allow the plugin to release on its own schedule and respond more quickly to its users' needs and desires.
While Ruby has a good culture of testing, it is sadly missing from RubyGems. Hopefully moving maintenance of the test-running code out of RubyGems will fulfill make the feature both useable and desirebable.