Wednesday, May 16, 2012

How I Open Source

It's been recently brought to my attention that I don't view open-source the way that many of my friends do. My attitude has always been:
Here's some code that works well for what I want. If it works well for what you want, great! If not, I'm willing to make changes that improve the library; however, I'm also going to reject any code that causes the library to bloat. Lastly, the library will likely be 'done' in the next few years - at which time I expect it will be mature enough that a stable final release will be possible, or someone will (re)write a superior version. I don't expect an open-source project will ever define what I accomplish in our industry.
It finally occurred to me that others don't think this way when they began telling me that they don't open-source due to -
  • the code isn't mature enough
  • they don't want to write documentation
  • they don't want their time monopolized by feature request emails
I can understand each point of view, but events have occurred in my career that have shaped my (differing) opinion.

I still remember my first open-source project: I didn't tell a soul about it until I had used it in production for over a year and was very confident that I'd addressed the majority of common use cases. It was a .net object relational mapper called NORM, and it was released in 2005. No, you haven't ever heard of it. I polished it for months, and no one cared. After that I never waited to release anything. I now believe that it's highly unlikely that whatever I create will ever gain any traction, so I might as well get it out there, fail quickly, and move on.

No one writes documentation for themselves, they write it for people who they hope will use their software - and very few people people ever gain anything from someone else using their open-source software. That simple equation makes documentation scarce; however, scarce documentation doesn't mean you can't open-source your software, it just means adoption rates will very likely be slowed.

Two years ago I open-sourced expectations with zero documentation, and documentation stayed at zero for at least a year. In that year very few people paid any attention to expectations; however, expectations does fit a sweet spot for some people, and some adoption did occur. Eventually, new adopters began to send pull requests with documentation, and their contributions inspired me to write some documentation of my own. It can be hard to get motivated about providing documentation to theoretical adopters; however, I got my code out there and adoption began, and the motivation came along with those (no longer theoretical) adopters.

If you end up lucky enough to create a project that is widely used, there's no doubt that you'll start getting swamped with email. In the beginning I expect everyone will be overjoyed with their success, and the added workload will be no big deal. However, I imagine over time it begins to feel like a second full-time job, and for what? Developer-fame doesn't get you closer to retirement any faster than watching grass-grow. However, I don't believe that should deter you from putting your work out there. Additionally, I think GitHub has changed the game with respect to moving on. If your project is on GitHub and you decide to call it quits tonight, there will probably be plenty of forks that are more than happy to take your place.

I have no qualms with walking away from projects, as I expect that if the idea is valuable, someone else will be happy to step up and take my place; furthermore, it's more likely that several people will step up and the strongest will survive - which is best for everyone. The best example I've ever seen of this behavior was Capistrano. Jamis Buck famously walked away from Cap in 2009, yet I still know plenty of people using it today without any issue. I firmly believe that if an idea is good, it'll live on even if you've decided you're ready to do something else.

It occurs to me that I might be a bad open-source citizen - releasing way too early and walking away too early as well. If that's the case, then I expect well deserved criticism, but that's just not how I see the world at this point...

5 comments:

  1. Amen. I feel the same, but it's taken me a while to get here. Dr. Nic has talked about this sort of thing as well.

    These days I'm happy to contribute, if I have time. I'm happy to accept pulls requests, if I can manage it. But if I think of something and decide to share it, that's a positive net effect, and I don't let anything change that.

    Might mean less docs, walking away early, who knows. I still think it's better to have gotten it out there in the first place.

    ReplyDelete
  2. Hear, hear!

    This reminds me of a post by Alan Gutierrez from a few years ago.

    I have to believe that the anxiety about starting an Open Source Project (TM) prevents a significant amount of useful code from being open sourced. That's a shame.

    I hope that posts like yours and Alan's help people feel more at ease about sharing their code.

    As a humble contribution to this cause, I offer this README as a template for anyone that is thinking about sharing some code on GitHub, but is feeling hesitation about it.

    ReplyDelete
  3. I now pretty much consistently open source everything I make in my spare time. I see no reason not to.

    Only one serious attempt at it, though I do not really know if anyone really uses it. I would be incredibly exited to get a real pull request someday.

    I took the approach of at least writing a blog post, and a fancy readme at github that shows sample usage. I might consider more tutorials, but I'd rather blog about stuff that people actually will read if there's little use of my work.

    At least I think someone is using it. Someone seems to download it from NuGet at least that's something.

    ReplyDelete
  4. Anonymous8:50 AM

    I have a tendency to put most of my stuff out there to the public. I think there are pros and cons. I am happy if others should find value in it. I also think that the preponderance of "not ready for prime time" projects on Github and so on pollutes the resource pool, and can make it harder to find stable code to solve a particular problem. I mean, I have a few repos that are total junk, which I put up a year ago and promptly ignored, because I never moved very far on the project.

    I think it's better than it be easy than hard to make your code available, but it would be nice if most open-source warehouses had something as simple as a flag that you could use to indicate a project status, e.g. "be very afraid," "works for me," "awesome except I haven't written documentation yet," and "I have registered a domain name for this project."

    ReplyDelete
  5. Anthing that is being given away should be appreciated for what it's worth. And at the very least it is worth the time the developer took to make it available.

    We all know that our time is one of our most precious possessions.

    Thanks for your time.

    ReplyDelete

Note: Only a member of this blog may post a comment.