Over a million developers have joined DZone.

Cocycles: The code search revolution

A demo on how to use CoCycles to search for exactly the open source JavaScript code you need.

· DevOps Zone

The DevOps zone is brought to you in partnership with Sonatype Nexus. The Nexus suite helps scale your DevOps delivery with continuous component intelligence integrated into development tools, including Eclipse, IntelliJ, Jenkins, Bamboo, SonarQube and more. Schedule a demo today

Cocycles: find the code you need

Image title

On February Cocycles launched it’s code search engine, built to find every piece of open source code by functionality. For the first time, open source code it being organized and made accessible by code functionality. In simple words, describe what you want the code to do, and Cocycles will find it for you. Like most things, this comes as a much needed solution to an even bigger problem.

The problem with finding open source code

According to GitHub, the amount of open source code being written doubles itself nearly every single year. GitHub reports it currently holds over 31 million different repositories.

Sadly, 98% of that code become obsolete within 1 year from the day it was written. Until now, no one knew exactly which pieces of code has been written and where to find them. One can try searching for entire packages and look for entire libraries, hoping their names had been mentioned or made accessible via services like NPM. But what if, one simply needs a piece of code that does something?

What if, I just need a quick Javascript function that swaps two elements in a given array? or a parser class? am I bound to search through endless lines of code in different libraries? Well, This makes 0 sense. It makes no sense that there isn't a way to search for different code pieces directly in the vast sea of open source code which is just waiting to be tapped into. Further more, code needs to be searched like code: By functionality.

Cocycles: find code by functionality

Cocycles is search engine for code. Not only libraries, not mere text, but code. One can describe the code functionality desired, and find multiple matching code pieces from across the open source. Infact, cocycles is much more than that. For the very first time, open source code is being organized in pieces by code functionality. Cocycles is able to understand exactly what every single piece of open source actually does, may it be a library, a class or even a single function. Using NLP (Natural Language processing) algorithms Cocycles is  also able to understand natural language being used by developers, and translate these queries into code functionality. All that’s left is to match the functionality described by the user to the matching code pieces from across the open source.

For example, when searching for a piece of code to swap two elements in a given array, one need only to submit a query such as "swap elements" and find different open source code units to do exactly that:

Image title

When available, Cocycles will not only provide an interactive view of the full code implementation, but will also provide the original docs along with real world usage examples and useful meta-data. Cocycles is also able to generate a fully functional snippet containing all dependencies and sub-functions within a single code unit. This allows developers to use the code they find as is, ready “out of the box”.

Additional features include “Cocycles Immediate”. When cocycles is sure it recognizes exactly what your are looking for, it will instantly provide a fast and useful view of the essential data related to that exact piece of code:

Screen Shot 2016-04-04 at 5.59.00 PM.png

Cocycles currently only supports Javascript, but It should support more languages later this year. Under the open source philosophy, CoCycles is and will be open and free for all developers worldwide.

Clearly, Javascript isn’t enough and additional languages need to be added. However, this hopefully is a first step towards making open source what it really should be: open and accessible.

Check it out @ https://www.coycles.com

The DevOps zone is brought to you in partnership with Sonatype Nexus. Use the Nexus Suite to automate your software supply chain and ensure you're using the highest quality open source components at every step of the development lifecycle. Get Nexus today

javascript,open source,code,programmer tool,web,github,search engine

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}