Publish your module code – It's the best thing for you and your customer
Back in 2007, my former employer and a current Mearra customer, Uusi Suomi, needed a way to measure and show what's hot and popular on their news site. We initially used Drupal's built-in node counter to list nodes ordered by daily page views. That worked for a while until we noticed the apparent weaknesses: 1) the counter gets reset once a day making near random content the most popular during the slow hours after midnight, and 2) the system favors content published near the reset time as the list feeds itself; people want to read content that other people have found interesting. We needed a better way.
I used the full capacity of my not-extremely-techical brain to imagine a system where content that is popular now would be more important than the stuff that was popular six hours ago. I fed the logical algorithm to the oh-so-technical brain of my brother Sami, who at that time was working as a freelancer doing Drupal for Uusi Suomi, and along came Radioactivity. As the name implies, Radioactivity is based on hotness of content, and the hotness has a half-life time, just as radioactive isotopes have in the real world. So, in short, if a piece of content is really popular right now, the value of it's popularity is half of the current value after the half-time, say for example an hour.
The idea proved great and along came the single most important Drupal innovation I ever helped create.
Radioactivity would've fun and cool just for Uusi Suomi's own use, but we thought it was so awesome that we needed to spread the innovation to others. So we published the module on drupal.org and I started to tell the tale on various Drupal meetups and drupalcamps. In 2008, due to community demand and our own interest in learning module development for the just-published Drupal 6, Radioactivity was ported to D6. The module received some attention and even praise in the form of growing adoption and a video tutorial by Greg Knaddison, a community celebrity and a person that we had never talked to when developing the module. We had done something right.
The next tipping point for Radioactivity was in early 2010 when we founded Mearra and started developing the module with a more determined attitude, as a part of the new company's footprint in the Drupal community. Sami, who did the first 2 years of the module development, took some distance from Drupal stuff to concentrate on his doctoral studies and Teemu, a brilliant and passionate developer from Mearra took over the development.
I could ramble on and on about the different phases of the module's life cycle, but for the readers' sake, let's cut some corners. We use the module on most of our projects and take innovative use of the capabilities that it offers. As a result of this, the Lehtiyhtymä project contributed to Radioactivity with extensive Rules support in the D6 version back in 2010, pirkka.fi and fit.fi contributed the support for Drupal 7 and various other projects and Drupal community members contributed other bits and pieces. This results to two fun things of which the first is really cool and the second is worth real money:
- Radioactivity is powering very high profile sites such as groups.drupal.org and the Videola platform, and
- now that Uusi Suomi is moving to Drupal 7 and taking even more advantage of Radioactivity-based popularity (for example in the form of trending taxonomy terms; thank you field-based radioactivity, entity-based taxonomy terms and Varnish-friendly Ajax emitters), they get some of the site's core functionality for free. Free as in free beer. Free as in zero € and zero $.
Executive summary & lessons learned:
- Share your code. You'll be happy afterwards. The idea of Radioactivity would've died with the upcoming Uusi Suomi site upgrade if it wasn't available on drupal.org.
- Explain your customers (even the reluctant corporative one) why publishing modules is good for them.. It raises quality of the code (developers know that others will look at it) and I've never yet encountered a customer that has a valid point for not sharing. It feels hard at first but once the idea gets passed - and it will - it's a win-win for everyone. The competitive advantages of a site are never in a single module but in the processes the site uses and the combination of modules that become the product.
- Publishing modules makes your life a tiny bit better. Creating and contributing a module is a superb way to get invited to various Drupal events and spread the love – and having fun doing it. It’s also very meaningful for the developer that does the actual implementation work. The functionality they write in code could end up being used on hundreds of thousands of sites, or perhaps just on whitehouse.org.
- Publishing a module on drupal.org can actually save you money. All the 1000+ sites that use Radioactivity get a piece of software for free and Uusi Suomi, the original sponsor for the module, now gets an updated, evolved, enriched, tested piece of Drupal 7 software with the cost of configuring a module.