Developer Relations

Why Does Open Source Code Only Have a 1-Year Lifespan?

2018-10-03
Developer Relations

Honestly, if Sisyphus from ancient Greece was a developer writing open source code in 2016, he would feel right at home. The famous Sisyphus punishment, handed down through mythology, forced him to push a giant boulder up a mountain, only to watch it roll back down after reaching the summit, repeating this cycle forever. Quietly, developers worldwide have been accepting similar punishments over the past few years. And the boulder keeps getting bigger.

The Library of Congress in the United States holds approximately 24 million books of various types. It is the largest repository of written human knowledge ever created by humanity.

GitHub was founded in 2009. It now has over 35 million software repositories or information repositories, containing tens of trillions of lines of code. Research shows this amount is growing exponentially, doubling approximately every 14 months. Open source is undoubtedly at the forefront of programming technology today, representing humanity’s largest, most powerful, and most advanced repository of knowledge.

So why is 90%-98% of open source code abandoned after 12 months?

Details Reveal the Code

Let’s first look at some astonishing numbers: of the code written today, by this time next year, over 90% will never be used again.

They become invalid, obsolete, forgotten in the sands of time. In a 2015 survey, Stack Overflow found that each developer spends an average of about 7 hours per week programming outside of work. GitHub reports that over 12 million users work on open source projects. Millions of smart people have spent millions of hours of work that people simply ignore.

The craziest part is that no one seems to ask “why?” Why is the vast majority of open source code buried and forgotten? Why do we write the same code over and over again every day, while at the same time that code is almost certainly somewhere on an open source platform, waiting for us to use it?

The main reason this happens is because people just treat repositories as storage. Developers know AngularJS, or jQuery, or React, but few know more than 10 open source packages. This is the maddening part—because people don’t know about or use entire open source packages, no one uses the code within them. A package written in 2015 might not be useful as a whole to one person, but perhaps it happens to contain the needed functionality. The most useful part isn’t always the entire package; sometimes it’s just a snippet of code.

Let’s say someone is looking for a JavaScript function to shuffle elements in an array, or a different function to create random strings. There are hundreds of identical small code snippets on open source platforms. But no one knows they exist, and even if they do, no one knows how to find them. Therefore, this valuable knowledge is discarded or forgotten simply because it’s hard to access. This is really absurd and benefits no one.

Organize All Code and Make It Easy to Find

So how do we solve this mess? Answering this question is easy, but doing it is hard. You need to do three things:

  1. Organize all open source code from a functional perspective and categorize them in detail
  2. Build a model to represent the actual functionality of these different codes
  3. Create an easy and simple way to search and find these code snippets

This is why we built Cocycles. Cocycles meets all the above conditions and continues to improve. Its algorithms can process large amounts of open source code, reading and understanding the functionality of each different piece of code. Then, it lets people search for code using simple English.

For example, users just need to type “shuffle array” or “create random string,” and they will be presented with various open source implementations, documentation, usage examples, and more. It even provides generated useful snippets containing all dependencies and sub-functions.

In a few years, AI software might be able to use it to find and learn new code, continuously improving and changing code.

Reposted from: Developer Relations »


Similar Posts

Content icon
Content