OVO Tech Blog

We Love Open Source

Introduction

Dave Salomon

Software Engineer - Vox Populi @ Kaluza


We Love Open Source

Posted by Dave Salomon on .
Featured

We Love Open Source

Posted by Dave Salomon on .

Here at Ovo, we're big fans of Open Source - check out our Github!

Many developers will use hundreds of open-source projects in their own code throughout their career, and a good portion of those will give something back. The Stack Overflow 2018 Developer Survey indicates that around 45% of developers surveyed (a sample size of around 100,000 people) have contributed to Open Source in some way. StackOverflow release the anonymised suvey data, so I pulled it down and did some analysis.

Screenshot-2018-12-23-at-16.52.19

More and more 'new-generation' developers are contributing to Open Source, which is fantastic. Unsurprisingly, the more experience people have in development, the more they are willing to contribute to Open Source.

Screenshot-2018-12-23-at-17.11.50

For those interested, the data from the StackOverflow survey is available here, and I've cobbled together a Node script to work with some of the data which is available here.

As an aside, The script itself is kind of fun; I read the CSV using a Stream (trying to grab it all at once caused some memory problems) and operate per-row. There's a bit where I need to check if the final part of a chunk is a complete CSV row or if it's partial. It's nothing too complex, but required a little thought at the time!

Why?

There are loads of reasons to contribute to Open Source, so there's little point in covering them all in detail here. (Google will give you 3.37 billion results if you search for "why open source"!)

In my experience, open-sourcing:

  • creates a good engineering culture within a team
    Not only are you smashing out stories with well-written, documented and tested code, you're contributing to the global engineering community!

  • encourages good practice
    After all, it's not just your team that'll see your code, but the whole world!

  • makes you do things right
    There's no such thing as security by obscurity when your code is open for all to see!

If you need more convincing about why Open Source is good for business, as well as good for you and your team, here's a great article written by Elastic.

How?

Just do it. When I first set out into the big bad world of software engineering, I never even thought of contributing to the world of Open Source. I figured there were people much smarter than me that would do that stuff, and all I needed to do was plug the bits together. The fact is, engineers that are working on libraries are just like you and me.

One recent example; in some of our apps, we use a charting library. We let our users toggle datasets off and on by clicking the legend, and I'd noticed that the axes associate with that dataset would not match the dataset visibility, but instead it would reduce the scale down between -1 and 1.

chartbug

That's a very simple example; our actual graphs have several datasets with several axis, and so it was confusing for users when a random axes scaling between -0 and 1 was displayed.

And so I forked the repo, cloned it to my local machine, changed my package.json to point at that, and started fiddling around with the code. A few hours later, and the bug was fixed.

chartok

I'd never contributed to this library before, and so it wasn't perfect. There were a couple of chart behaviours I wasn't aware of, but maintainers were super helpful, very accomodating, and were pleased to have a contribution, even if it wasn't 100% right.

I've spoken to a few developers who are afraid to submit a PR for a project they don't really know a lot about. To them (and if you're the same, to you) I say -- don't worry. The maintainers of open-source projects are generally always happy to receive feedback, whether it's opening an issue or submitting a PR.

It wont always be right, and it doesn't matter. I've spent a couple of hours fixing things only to be told about a config option which does the thing I need. I trashed the PR, no sweat. Nobody's going to give you grief for trying to make things better.

So next time you're taking 10% time, or are looking for something to challenge yourself with at the weekend, go check out the repo for a framework you use, pick an Issue from the list, and give it a go. Your future self will thank you for it, as will the other hundred thousand people using that project. Plus, it looks great on your CV :)

As a final thought, I just want to put a shout out to Google Open Source. There are so many articles, resources and projects over there, I'd highly recommend checking it out!

Dave Salomon

Software Engineer - Vox Populi @ Kaluza

View Comments...