Why Open-sourcing Components Increases Company Productivity and Product Quality

We’re big fans of open source community here at Applifier. So much, that we believe that open-sourcing software components and tools developed in-house will result in better quality, increased cost savings and increased productivity. Here’s why:

We encourage our programmers to design and implement components, which aren’t our core business, into reusable packages which will be open-sourced once the package is ready. The software is distributed on our GitHub site, with credits to each individual who contributed into the software.

Because the programmers know that their full name will be printed all over the source code, and they can be later Google’d with it, they will take better care to ensure that the quality standards are high enough to stand a closer look. This means:

  • Better overall code quality. Good function/parameter names, good packages, no unused functions etc.
  • Better modularization. The component doesn’t have as much dependencies to other systems, which is generally considered as a good coding practice.
  • Better tests and test coverage. Tests are considered to be essential part of modern code development, so you’ll want to show everybody that you know your business, right?
  • Better documentation. The component is published so that anybody can use it, so it must have good documentation and usage instructions.
  • Better backwards compatibility. Coders take better care when they design API’s and interfaces because they know that somebody might be using the component somewhere out there.
  • Better security. Coder knows that anybody will be able to read his code and find security holes, thus he takes better care for not making any.

In practice, we have found that all the open source components have higher code and document quality than any of our non-published software component. This also ensures that the components are well documented and can be easily maintained if the original coders leave the company. This gives good cost savings in the long run. Open-sourcing components also gives your company good PR value and makes you more attractive for future employers.

For example one of our new guy was asked to do a small monitoring component to monitor some data from RightScale and transfer it into Zabbix, which is our monitoring system. Once the person said that the component was completed, I said to him: “Good, now polish it so that you dare to publish it with your own name in GitHub.”

WPG2 patch to display random images from a specified album

I recently installed WPG2 and Gallery2 to my block to manage the photos and images which are related to my blog entries and generally to store the photos taken by me. I found WPG2 quite good, but it lacked a feature I missed: To display random images from an album which is related to a specified blog entry. What I mean, that I take a bunch of photos, import them into my gallery2 installation and then write a blog entry about them. This patch allows to add a “related-gallery” -custom field to the blog article, which the Sidebar Grid Block then picks up and it displays random images from that album.

Usage instructions:

  1. Install WPG2 (I’m using 2.3.0.2 3.0.2)
  2. Apply the patch: WPG2 patch against WPG 2.3.0.2 to add support for Related Gallery to Sidebar Grid Block
  3. Add the Sidebar Grid Block to your layout from Presentation -> Widgets
  4. Configure the Sidebar Grid Block from WPG2 -> Sidebar Grid Block
  5. Upload some photos to your Gallery2 installation
  6. Obtain the album id where you uploaded your images. The album id can be found from the URL of the album. This is an example from my album: “http://blog.juhonkoti.net/gallery2/main.php?g2_itemId=37”. In this url the album id is 37. Obtain this numeric id.
  7. Write a blog entry and add a custom field from the bottom: key is related-gallery and value is the id you just obtained from the step 6.
  8. All done, go and see the results.

Known problems and limitations:

  • Currently you need to obtain the album id manually by looking the Gallery2 urls. This could be made easier by some kind of wizard.
  • You need to use the Custom Fields -feature.

I’ve asked Ozgreg, the founder/programmer of the WPG2 project, if he could add my patch to the main trunk of WPG2. Let’s hear if he likes this :)