blog

  • Home
  • blog
  • Free as in Puppy — Open Sourcing Your JavaScript Code

Free as in Puppy — Open Sourcing Your JavaScript Code

Open Source is much more than making something available to the public. It is not only about your code, it is also about licenses, understanding participation and herding cats a.k.a. dealing with community issues. In this article we will briefly look at the benefits of open sourcing your code and the pitfalls to avoid.

Open Source is probably the most exciting thing that happened to our market and is responsible for the explosive growth of the web. Most of our servers are open source technology, a lot of browser code is, and even our editors are written in JavaScript these days. It is our duty to treat Open Source with respect and release quality instead of chucking code over the wall and hoping that magic happens.

Open Source Is Free – as in Puppy

What follows are ideals and advice to follow. You might not have time or desire to follow all of it. That’s fine. What’s not fine is trying to play in an open world and be dogmatic about it. Open Source has mushroomed into a huge part of our world and people make mistakes. Let’s be as open as the code we release. Let’s deal with mistakes like we deal with bugs: collaboratively make them vanish.

Getting a free puppy is great but it also comes with responsibilities. You need to feed it, take it out for walks, groom it and play with it — even when you’re busy. The way you treat the puppy defines what kind of dog it will become. How much it trusts humans, how easy it is to play with, how protective and helpful towards humans it is. The same applies to releasing and consuming open source code. With one small difference: puppies are very forgiving. The open source community less so. There is a lot of tension to be aware of. We’ll cover some of that here, but first let’s point out an important thing when it comes to JavaScript and Open Source.

Javascript Has Always Been Available – but That’s Not Open

Just because something is available doesn’t mean it is free or open. If I forget to lock my bike, you’re not invited to ride it. If I put a sign on it saying “community bike, feel free to ride, but please keep it clean and fix it” we are getting closer to what open and free means in terms of software. The great thing about software is that it can be copied without losing quality. The great thing about JavaScript on the web is that anyone can see it. Many luminaries of JavaScript learned their craft by looking through other people’s code. That doesn’t mean though that you can copy and paste it and call it yours – unless its license explicitly allows you to. I’ve spent far too much time in conversations with clients where they asked me how to protect JavaScript from being seen by others. That’s like asking for water that isn’t wet. JavaScript is a great candidate language for releasing open source code. You are already visible; you may as well make it legal to re-use.

Benefits of Open Sourcing Your Code

Now, why would you bother to share your code with the world when you could become a millionaire by keeping it all to yourself? Well, there are quite a few benefits:

  • Other people have good ideas, too. A lot of my code has been greatly improved by allowing people to contribute. They came up with solutions I hadn’t thought of. They helped me write terser, easier to understand code. They found issues I hadn’t considered. And I didn’t have to pay for any of that!
  • It is a litmus test of your code. People have different environments than me and can test my code for me, inform me of issues, or — even better — fix them for me. It is impossible to hide sloppy code in plain sight. Knowing that I make my code available makes me worry more about code quality and thus a better developer.
  • You become part of something bigger. Your code being used in other projects is a very exciting (and at times scary) thing. It is a great feeling to empower others to build things that they on their own couldn’t have built. As is seeing your work being used by people you thought were much better than you.
  • Your work lives on — no matter what. If you’re unable or unwilling to keep maintaining your code and you want to move on, having open sourced it means you’re in luck. You share the responsibility with a community and they benefit from your initial work.
  • You find like minded people to collaborate with. One of the huge benefits of open sourcing your code is that you find people who are willing to work with you on something you’re excited about. This is invaluable for finding new jobs, hiring exactly the right people or having a foot in the door of another company when you want to reach them. As a larger corporation, open sourcing your code means you can pick new hires from the contributing community. These are people who are already in the know and excited about your product. This cuts down on months of on-boarding and thus means a lot of money saved.

Continue reading %Free as in Puppy — Open Sourcing Your JavaScript Code%

LEAVE A REPLY