DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Find safe and reusable code within your IDE in seconds
Julien for Codiga

Posted on

Find safe and reusable code within your IDE in seconds

Any developer knows how difficult it can be to find the right code online that is safe, secure and reliable. We use these building blocks as a basis to build programs, but searching for this code online can be time consuming, not to mention untrustworthy. You may spend precious time sourcing code that turns out to be outdated or unsafe, leading to a lot of wasted time that could have been avoided.

At Codiga, we firmly believe that whether you work alone or with a team of developers, coding should be a truly collaborative experience. Being able to share and receive code patterns from other developers that you trust can save you an infinite amount of time and minimize the amount of potential mistakes. We want to eliminate the guesswork for you and allow you to become a part of a network of thousands of talented and trusted developers just like you.

Coding Assistant does just that. Think of it as a network of like-minded people who are sharing and taking code from one another to help enrich their projects and save each other hours, so you can stop searching and start coding.

Coding Assistant couldn’t be easier to use, and works anywhere you write code. It can be easily added to your environment using our VS Code, JetBrains, or Chrome plugins, which will populate the Recipes directly in your environment.

Recipes & Marketplace

Reusable blocks of code are known as Recipes. This feature works anywhere you write code and in any language, and you can import code into your IDE in a matter of seconds by simply typing in a few key words (for example create table in a HTML file of read csv file in a Python file). Our automated platform will determine the right code for you based on a number of criteria; keywords, popularity, rating, libraries used and language. Our algorithm will find the right match for your needs, and the Recipe will be imported into your IDE instantly, and you can begin to build your project in no time.

You can search for and subscribe to Recipes within the Coding Assistant Marketplace. Here, you can define search Recipes by name or language, or use our more advanced search settings to search for keywords and tags associated with the Recipes you are looking for. Once you find the right Recipe, you can subscribe to it and easily populate it directly in your IDE by simply typing in the name or a keyword into your top bar.

These Recipes have been added, vetted and used by thousands of other developers, so you can be sure you are only getting the most accurate and safe code to help your development. It allows you to source Recipes for code you might not have a lot of experience writing, so you don’t have to spend crucial hours trying to find and adapt it yourself. You can see how many times a recipe has been used by another developer, as well as any comments and ratings on the Recipes so you can get a full understanding of the code you will be using.

Providing you with the most reliable Recipes is our main priority, so we allow users to flag a Recipe that might not be 100% accurate. We take these flags very seriously, and ask that you provide us a reason why you feel this Recipe cannot be utilized in a safe or efficient manner. Once a Recipe has been flagged by a user and looked into by our team, Coding Assistant will never suggest or populate it in your environment again.

Adding Recipes

We want Coding Assistant to be a give and take environment, so that’s why we made it very simple to add your own Recipes that can be shared with your team or any other developers on our platform. This allows you to easily help out your fellow developers across the world, or streamline projects with your own team by sharing reusable Recipes, meaning your project will be consistent amongst the engineers working on it. Recipes can be created in our web interface, seen below, or directly in your IDE (more on this below).

Create a Recipe

If you want to stay directly in your IDE and not have to navigate around multiple environments, Coding Assistant allows you to create a Recipe right where you are working. Once you write or find a piece of code you want to share, simply highlight it, right click directly in your environment, select create Codiga Recipe and you’ll be asked to add a name, language, a brief description, and most importantly, the keywords that will trigger a recipe to populate in Coding Assistant. Once saved, your Recipe will be available instantly to any developer within our network. Recipes can either be public or private, but know that once you have determined the visibility, it cannot be altered once the Recipe has been added.

Cookbooks

As you might have guessed, a Cookbook is a collection of Recipes, and allows you to store multiple pieces of code together in one place for a particular project to keep things better organized. When creating a Recipe, there is an option to add it into a Cookbook that can be shared privately or publicly with the entire platform. You can also subscribe to Cookbooks, which means you will automatically be able to see all public Recipes within the Cookbook. Cookbooks help you keep code for a team project organized, or allow you to add to an existing library you have created of similar code that can be used separately or together.

IDE Integration

Codiga IDE Plugins for VS Code, JetBrains-based products (IntelliJ, CLion, PyCharm, etc) and Chrome make using Coding Assistant extremely efficient and means you can create and use Recipes directly in your IDE environment. One plugin supports all languages; Apex, C, C++, Dart, Docker, Go, Java, Javascript, Kotlin, PHP, Python, Ruby, Scala, Shell Script, Terraform, Typescript, and YAML.

VS Code

Setting VS Code is simple, and is done in the plugin section. You can find said plugin within the VS Code Marketplace. It’s important to remember to link your Codiga account using an API token, done in the settings section. This gives you access to all of the public Recipes in our network.

Import recipe in VS Code

Once you have subscribed to Recipes, you can use them within VS Code by selecting Codiga: Use Recipe(CTRL+SHIFT+C and search for Codiga). To make things even more efficient for you, Coding Assistant on VA Code allows you to populate a Recipe by typing a keyword on a single line, and the Recipe will appear instantly.

Jetbrains

The Codiga Jetbrains plugin is easily downloaded from the Jetbrains marketplace, and is available to install with all Jetbrains plugins including IntelliJ, PHP Storm, PyCharm and more.

Import recipes in JetBrains

To find a Recipe on Jetbrains, you can select the menu and then find Coding Assistant. You can also trigger the menu using CTRL+ALT+C. From there and as shown below, a window will populate for you to type in keywords to find the Recipe you have subscribed to and want to use.

Chrome

Codiga’s Chrome Integration can be downloaded from the Chrome Store and is compatible with all Chrome-based browsers. What’s amazing about our Chrome plugin is that it allows you to create a Recipe by highlighting and selecting a piece of code on any Chrome browser from around the web. From there, all you need to do is right click and select Create Codiga Recipe and you’ll be directed to the page to determine the specifics of your Recipe, and the code will automatically populate.

Create Recipes in Chrome

Final Notes

We are passionate about making coding as efficient and fast as possible, and Coding Assistant allows you to not only save yourself time, but also help your fellow software engineers save themselves a lot of headaches. Once you try it and see how easy the smart Coding assistant is, you will never go back to the days of scouring the web for a snippet of code. The more Recipes and Cookbooks our platform has, the more robust it becomes for all users, so we encourage you to try the Coding Assistant Feature for yourself and see how much easier it will make your daily working life!

Resources

Top comments (0)

Why You Need to Study Javascript Fundamentals

>> Check out this classic DEV post <<