If you are looking for code from an open source project, you should try Google’s code search engine. It searches thousands of projects for snippets and files. Sourcegraph, our second tool tip, can do that too.

Open source projects, such as those resulting from Google’s regular summer of code events, have had a common home on the “Google Open Source ” portal since 2017 . This is a recommendable and extensive platform for everyone who wants to deal with modern open source projects.

Search function keeps an overview of the projects

To facilitate the handling of the overwhelming amount of code that is accessible via the platform, Google has put a flexible search function, namely the code search , as a bracket.

The code search works in full text mode and reveals all snippets that match or come close to the snippet you entered. It looks like this, for example:

In addition to the comprehensive code search for all projects, the platform has a project subdivision. Each project is given its own homepage. From this start page you can then search specifically for code and files in this one project. This is what the homepage for the Angular project looks like:

Sourcegraph – independent code search engine

Nevertheless, we cannot really call the flexible code search from Google the “Google for code” because the function is limited, quasi curated.

The Sourcegraph code search engine , on the other hand, is really open , with which snippets of almost any project can be found anywhere.

In addition to full-text search, Sourcegraph supports advanced search queries. So you can search with regular expressions. Sourcegraph provides a query builder for sophisticated searches. You can use the to narrow down the search if the standard method gives you too many results.

One of the two tools should be usable for every application. It’s best to put them directly in your developer toolbox.

 


Continue Reading...

If you are looking for code from an open source project, you should try Google’s code search engine. It searches thousands of projects for snippets...

Read Post

If you are looking for code from an open source project, you should try Google’s code search engine. It searches thousands of projects for snippets...

Read Post