Codiga has joined Datadog!

Read the Blog·

Interested in our Static Analysis?

Sign up
← All posts
Julien Delange Thursday, March 31, 2022

Snipt: Search Engine for Code Snippets

Share

AUTHOR

Julien Delange, Founder and CEO

Julien is the CEO of Codiga. Before starting Codiga, Julien was a software engineer at Twitter and Amazon Web Services.

Julien has a PhD in computer science from Universite Pierre et Marie Curie in Paris, France.

See all articles

We are excited to announce the release of snipt.dev, a search engine to help engineers find safe and reliable code patterns. Code Snippets are very popular for developers but the ecosystem of tools is very fragmented and not unified. Developers are often looking for snippets to use and spend hours searching on Google, StackOverflow of Sourcegraph.

To help developers find the right code snippet, we built snipt.dev: a one-stop shop for searching for code you can reuse.

snipt.dev logo

But first, what is a Code Snippet?

A Code Snippet is a block of code you can share and reuse. By reusing safe and proven code, you not only improve your productivity but you also make sure you always import the correct code and are not missing anything (e.g. missing argument, not checking error code or exceptions).

By using rock-solid, proven code, you avoid many common pitfalls and mistakes developers already did. You find the correct block of code to reuse to focus on what matters: shipping code and improving a product.

Why use Code Snippets?

Writing code is quite complex and requires having a really good knowledge of the language and libraries you are using. Even with languages with lots of abstractions, it is often hard to follow the code path and understand how code actually works! Sharing and using vetted code patterns directly in your IDE maximize your productivity but also make sure you are using the correct code block for your job!

So now, what is snipt.dev?

snipt.dev is a new platform for searching code snippets. It includes a semantic analysis feature that detects what framework, library, or language you are looking for and optimizes the search results based on your criteria. For example, if you look for “react typescript”, the engine will only show snippets related to TypeScript while “react javascript” will show you only snippets related to JavaScript (and obviously, react).

snipt.dev is built to be blazing fast: a request takes just a few milliseconds to come back to you. As with most search engineers, results are suggested as you type, showing you the most relevant snippets for your query.

Adding your own snippets

The engine indexes and searches snippets from the Codiga platform. To add your own snippet to snipt.dev, simply add snippets on the Codiga platform: they will be automatically indexed and visible on snipt.dev. Adding snippets is very easy and can be done directly from your IDE using Codiga plugin (see VS Code, JetBrains, or Chrome plugins). You can find more information in the Contribute section of snipt.dev

Open-Source

snipt.dev has been designed using popular open-source libraries (NextJs, GraphQL) and it was natural for us to share this project with the community. You can find this project on GitHub. If you have any comments or issues to report, please open an issue on the GitHub project.

Are you interested in Datadog Static Analysis?

Sign up