Blog

AI and APEX | How to make a developer's life easier

2024-03-20 10:00
This article is prepared by our Salesforce Developer Alexey Kashirskiy.
In this article, we will consider 3 tools that will help you as an APEX developer. Honestly not only with APEX, but with all languages and frameworks that are involved in your project development.

GitHub Copilot

GitHub Copilot, an innovative AI pair programming tool, has undergone significant advancements in 2024, showcasing GitHub's commitment to leveraging AI for software development. Here's an overview of the key updates and features of GitHub Copilot as of 2024:

  • Copilot Chat: In December 2023, GitHub made Copilot Chat generally available. This feature will be included in the existing GitHub Copilot subscription for both organizations and individuals. It's also accessible at no cost to verified teachers, students, and maintainers of popular open source projects. Copilot Chat is designed to be more accessible and powerful, enhancing the interactive aspect of the tool​​.

  • AI-Pair Programming: GitHub Copilot functions directly within your editor, suggesting complete lines or even entire functions. This makes it a highly intuitive tool that works alongside developers, significantly aiding in coding efficiency and creativity​​.

  • GitHub Copilot X and GPT-4 Integration: The introduction of GitHub Copilot X marks a new era in AI-powered software development. It incorporates OpenAI’s latest GPT-4 model and introduces chat and voice capabilities for Copilot. This expansion means Copilot can now be used in various contexts, including pull requests, the command line, and documentation, to answer project-related queries​​.

  • Improved Code Suggestions: The quality and responsiveness of code suggestions from GitHub Copilot have been enhanced by upgrading the underlying Codex model. This ongoing improvement reflects GitHub's commitment to providing developers with highly accurate and relevant coding assistance​​.

  • Enhanced Performance with GPT-3.5 Turbo: As of June 29th 2023, GitHub Copilot has become more powerful and responsive, thanks to the incorporation of a new model powered by GPT-3.5 Turbo. This update, resulting from a collaboration between OpenAI, Azure AI, and GitHub, has led to a 13% improvement in latency. Additionally, the code completion feature now utilizes an 8k context window, which further refines the suggestions and acceptance rates​​.

Helpful usage in development: you can review the code (e.g. pull requests), ask about improvements in this or that code snippet and also there is a pair-programming feature that helps you to write code much faster and efficiently.

Cody AI

Cody AI, as of its June 2023 release, represents a significant advancement in AI-assisted coding for developers. This tool, designed to enhance productivity and efficiency, offers a range of features to streamline the coding process:

  • Advanced Code AI: Cody AI has evolved to provide more than just AI-generated autocompletions, similar to GitHub Copilot. Its capabilities extend to writing entire files, fixing bugs, refactoring code, and even answering questions related to the entire codebase​​.

  • Business Support: Beyond coding, Cody also functions as an intelligent AI assistant for businesses. It leverages a business's knowledge base, team, processes, and clients to enhance productivity and streamline operations. This aspect of Cody AI makes it a versatile tool not just for coding tasks but for broader business applications as well​​.

  • Codebase Knowledge and Assistance: As a free and open-source AI coding assistant, Cody is notable for its comprehensive understanding of a user's entire codebase. This ability allows it to write, understand, and fix code, offering a holistic coding assistance experience. It is powered by Sourcegraph’s code graph, which contributes to its extensive knowledge and functional capabilities​​.

  • AI-Pair Programming Tool: Fundamentally, Cody serves as an AI-Pair programming tool. It assists developers in building better and more efficient software, akin to having a fellow developer to help with writing, reviewing, or even refactoring code. This feature positions Cody as a valuable resource for developers seeking to enhance their coding practices and output​​.

Helpful usage in development: you can load code base up to 10 projects (in free version) and ask questions about it, fix bugs and do refactoring.

Einstein for Developers

Einstein for Developers, a generative AI solution by Salesforce, marks a significant leap forward in the realm of developer productivity and software programming. Here are some of the key features and aspects of Einstein for Developers as of 2024:

  • Generative AI Solution in Open Beta: Salesforce's Einstein for Developers, a generative AI solution, is now in Open Beta. This development indicates Salesforce’s commitment to enhancing developer productivity through advanced AI technologies​​.

  • AI and ML Tools for Salesforce Platform: Einstein for Developers encompasses a suite of artificial intelligence (AI) and machine learning (ML) tools specifically designed for use within the Salesforce platform. This integration offers developers a powerful set of tools to enhance their programming capabilities within the Salesforce ecosystem​​.

  • Assistance in Writing and Fixing Code: One of the most notable features of Einstein for Developers is its ability to aid in writing Lightning Web Component (LWC) code using plain English instructions. Additionally, it can suggest what code to write next based on the current work and check the code for mistakes, offering suggestions for fixes. This makes it a highly intuitive and user-friendly tool for Salesforce developers​​.

  • Visual Studio Code Extension: Einstein for Developers is available as a Visual Studio Code extension. Built using CodeGen, Salesforce’s custom AI model, this extension allows developers to generate boilerplate code from natural language instructions. It facilitates a seamless workflow by enabling developers to work with their editor and the tool side by side, without any interruptions​​​​.

  • Ease of Installation and Accessibility: The Visual Studio Code extension for Einstein for Developers is designed for easy installation, making it readily accessible to a wide range of developers. Its presence in both the VS Code and Open VSX marketplaces enhances its availability and usability, allowing developers to easily integrate it into their existing development environments​​.

Helpful usage in development: you can do fast prototyping of APEX classes and triggers or creating skeletons for your LWC components, also can help you with Unit tests.