The Benefits of Giving Away Code

In 2007 I decided to start releasing a few pieces of code to the public.

At the time I was experimenting with Rails, so I released a few plugins, including one that became pretty popular.  Since then, I’ve released a few more odds and ends, notably a few WordPress plugins and Premailer, a tool that helps build email newsletters.

My motivation was pretty clear in the beginning–the web had been good to me, and I wanted to do my part for other developers. But I’ve often wondered if there were other benefits to releasing code, and what they could be.

Here’s a brief of summary of what I’ve found.

Economic benefits of giving away code

After two years of giving code away for free, my bank balance hasn’t changed much.  I’ve made money in three different ways: selling sponsorship, being hired to write plugins, and receiving donations.

First up: sponsorship.  Campaign Monitor has paid to sponsor Premailer since its inception.  I approached them and offered them exclusive placement.  I felt it would be good value to them (since the site is used exclusively by people designing HTML email) and I liked them as a company.

Next: code for hire.  I’ve received quite a few enquiries about modifying my code for specific purposes, as well as requests to write plugins from scratch.  That’s how the MailChimp Shopify plugin came about.  About 15% of those requests came to fruition.

Finally, donations.  I’ve never put up a ‘donate now’ button, so the few I’ve received are from people who actually emailed me and asked for my PayPal account.  Those emails always feel very nice.

All told, I’ve made $5,000 or $6,000 giving away code.

Promotional benefits of giving away code

The promotional benefits have been a little thinner than I would have guessed.  With each release I’ve gotten some nice announcement posts (see here and here) and a little upswell in traffic, but none of that has lead to an enduring client relationship.  I put this down to the fact that the people using my code are my peers (sometimes known as competitors, I prefer peers) who don’t necessarily need to hire a web developer.

Educational benefits of giving away code

Releasing code to other developers has made me a better programmer.  When I build a web site I’m in complete control of the environment, including what libraries are installed and what character encodings are used.  Public code gets scrutinized and tested in many different environments and has helped me learn what it takes to make something portable. I’ve also learned from the bug reports and contributions of other programmers.

Finally, writing and releasing code is my preferred way to learn.  Long after my initial flirtation with Ruby on Rails, I keep up my limited Ruby skills by maintaining code that I’ve released.

All in all, giving away code has been a good experience.  I don’t think it’s possible to reconcile the hours of labour to the intangible benefits of education, but I do feel that giving the code away has been very beneficial.