Understanding open source software: A Q&A

0
160
Understanding open source software: A Q&A

We recently started sponsoring open source projects through our newly-launched fund — Codecademy Open Source Sponsorships. This year, we’re committed to spending at least $10,000 toward financing open source software projects that our engineers regularly rely on.

“At Codecademy, we love open source software,” says Josh, a Senior Software Engineer here at Codecademy. “All of us on the engineering team are daily consumers of open source software by virtue of the tech stacks we build and maintain. Many of us also contribute to or even maintain open source projects on our own.”

Open source software is essential to the work of our engineers, but what exactly is it? To find out, we spoke with Josh to learn more about what open source software is, and why it matters.

What is open source software?

Open source software is software with source code that anybody can look at or contribute to.

“Many of the tools we use to develop software are open source,” Josh says. Open source software can range from a few lines of code that help you perform a specific task to full-on frameworks that you can build your code on top of.

Open source tools that Josh likes to work with are Visual Studio Code, TypeScript, C#, ESLint, React, Firefox, and Linux.

The origins of open source

When software was first getting started in the 1950s and 1960s, it was generally released as public domain by its academic authors — even before the internet made sharing it easy. You could say open source software predates the idea of selling software!

The modern concept of open source was kickstarted in the 1980s, with the creation of the GNU Project. A software engineer at MIT launched the project in response to the increasing privatization of software. The goal of the project was to create an operating system that anyone could freely use or modify. It eventually formed part of the Linux operating system.

With the success of Linux in the 1990s, the open source movement started to gain momentum. Companies like Netscape, IBM, and Sun Microsystems released their own open source code and funded open source projects. In the late 1990s, a group of programmers voted to make the term “open source” official.

Since the 2000s and 2010s, platforms like Github and npm have contributed to the rapid growth of open source. “These platforms have made it much easier for newcomers and experienced developers alike to participate in open source communities,” Josh says.

What are some reasons for using open source software?

A lot of software development stays the same between projects, from setting up your development environment, to coordinating servers, to implementing user interface frameworks. “Popular open source projects can take care of all the scaffolding for you, which allows you to focus on just writing the logic specific to your application,” Josh says.

When you need code support, open source communities can be a great place to ask for help. “Popular open source tools often have thriving communities online that answer questions and improve documentation all around,” Josh says.

For example, if you’re just starting out with React, there are several places where you can find code help:

  • React Docs: Open source documentation maintained by the React team and by contributions from the community
  • Stack Overflow: With hundreds of thousands of answers to people’s questions for help and advice on React
  • Reactiflux: A community where people can network and learn

Are there times when you don’t want to use open source?

Very rarely. But there are certain industries where it’s important for all code to be written in-house. That’s because every open source component comes with a license that you agree to when you use the code. Some open source licenses require you to release any modified source code. Without closely tracking these license requirements, companies that use open source code can lose the ability to keep their software closed.

Open source code also requires a certain level of development support. If you find a security vulnerability in your open source code, for example, you might not get it fixed quickly enough if the code maintainer isn’t responsive to requests. Without having the proper development support, it can be challenging to try and fix problems that you encounter in the open source tools that you use.

Where can developers find open source software?

Most programming languages have a registry where anybody can upload packages — or pieces of code — for others to use. “They’re like App Stores for code, except anything is free and you can propose changes any time you’d like,” Josh says.

Some well-known registries are:

Josh shares that you can also find open source projects on GitHub (including their newer registry GitHub Packages), GitLab, and even Twitter. “A lot of developers are active on Twitter. There are a lot of good discussions and new projects that get noticed because of tweeting.”

How do developers at Codecademy use open source?

“Although we have a development team with dozens of engineers actively writing code, the vast majority of software we use is open source,” Josh says.

Let’s take codecademy.com as an example.

When you submit code for a course, a secure container — or virtual computer — is assigned to handle that code on the back end. We set up these on-demand containers with the help of Docker and Kubernetes, which are open source platforms.

On the back end, our systems talk to each other using Application Programming Interfaces (APIs). We set up many of our APIs using open source frameworks, like Grape or Rails, and we document how the APIs work together with an open source tool called Swagger.

On the front end, we use an open source language called TypeScript to write the code that runs on your web browser. ESLint helps us automatically detect errors in our code. And open source tools like Babel and Webpack help us bundle — or package — our code so that it works on most browsers, even ones that support only older versions of JavaScript and CSS.

If you happen to land on our 404 page, you’ll find a message that says Codey is lost. You’ll be able to play a game — built on top of the open source game engine Phaser — to help Codey find his way back.

Where can I find open source software created by Codecademy?

See what we’re working on over at our Codecademy Github repositories. There you’ll find:

As part of a commitment to support open source projects, we recently started funding four of the open source projects we use here at Codecademy: Babel, Doorkeeper, Homebrew, and Stylelint.

”We’re hopeful that beyond the act of giving back, the funding we provide can help maintainers continue to push these projects forward — and, by extension, the tech communities around them,” Josh says.

To learn more, check out our Codecademy Open Source Sponsorships post on Medium.