Navigating the Era of Generative AI as a Salesforce Developer
Years ago, it would have been hard to imagine a time when we wouldn’t have to rely on debugging our code while talking to a yellow rubber duck or constantly seeking solutions on Stack Overflow. It’s also nostalgic to think about the hours spent sitting beside a novice developer, explaining the importance of organizing code and writing effective unit tests.
However, with the advent of AI, these tasks are now being revolutionized, and in some cases, AI can perform them even better than humans. It’s as if we now have a virtual companion by our side, offering assistance, guidance, and pointing out mistakes to help us improve our solutions. Companies like GitHub and Salesforce are embracing this vision by providing developers with AI copilots.
These AI copilots can analyze code, identify bugs, suggest improvements, and provide valuable insights. They act as intelligent assistants, augmenting developers’ capabilities and helping them write cleaner, more efficient code. This development is an exciting leap forward, empowering developers to enhance their productivity and deliver higher-quality software.
In this article, we’ll explore what it means to be a Salesforce developer in the age of AI, and how AI, even in its early stages, can enhance our day-to-day tasks.
Webinar on Salesforce DevOps and Generative AI-Recap
During a thought-provoking discussion held on May 10, 2023, esteemed thought leaders delved into the realm of Salesforce DevOps and quality, exploring the implications of emerging AI capabilities. The session yielded several valuable insights that hold significance for both Salesforce Admins and Developers. Here are some key takeaways:
AI as Your Technical Advisor
During the discussion led by Vernon Keenan from SalesforceDevops.net, the focus was on the emergence of generative AI and Language Models (LLMs) that have given rise to tools like ChatGPT and Einstein GPT. While these tools excel in facilitating conversational interactions, GitHub Copilot is specifically designed to generate code for developers.
Vernon exemplified how he engaged in a lengthy conversation with ChatGPT regarding ways to enhance the architecture of his Salesforce organization, which he uses for business management. To his surprise, ChatGPT not only proposed potential architectures for integrating Salesforce with his website but also provided the necessary Apex code to implement them. Moreover, ChatGPT employed well-known patterns, offering explanations and documentation for the suggested code.
Takeaway for admins: ChatGPT can be a valuable resource in comprehending the functionality of code within your Salesforce organization. This proves beneficial when troubleshooting specific errors and lacking immediate developer assistance.
Takeaway for developers: Engaging in a discussion with ChatGPT, particularly with the advanced capabilities of GPT-4, can yield alternative perspectives and improvements for ongoing or future development projects that may have otherwise been overlooked. It provides an opportunity to explore novel ideas and enhance the quality of your solutions.
AI as Your Pair Programming Partner
Following the initial setup instructions for GitHub Copilot and its corresponding extensions in VS Code, the discussion focused on the diverse applications of the tool.
GitHub Copilot primarily serves the purpose of generating or suggesting code for developers. As a developer, your role is to articulate your requirements and intentions through comments, specifying exactly what you desire. While this may appear straightforward, it can often present a challenge comparable to the task of selecting the ideal variable name.
During the exploration of GitHub Copilot’s capabilities, it was noted that the primary purpose of the tool is to suggest or generate code for developers based on their explanations provided through comments. However, it was acknowledged that effectively communicating your intentions to the AI can be challenging, sometimes more so than choosing appropriate variable names.
Takeaway for developers: It is crucial to develop the skill of structuring and expressing thoughts clearly in a manner that is comprehensible to the AI. This process may involve iterations and occasional frustration, but over time, developers can learn what approaches work best for achieving desired outcomes.
GitHub Copilot demonstrates proficiency in suggesting code in languages such as Apex, Javascript, HTML, and CSS, making it well-suited for generating code applicable to the Salesforce platform.
Additionally, GitHub Copilot Labs introduces experimental add-ons called “brushes” that can enhance code readability, robustness, and ease of debugging. Developers have the ability to add comments, refactor code into smaller modules, and experiment with different approaches. While the performance of these features can be hit-or-miss at present, the exploratory nature of GitHub Copilot Labs remains intriguing.
Furthermore, the upcoming GitHub Copilot X holds the promise of expanding GPT-4’s capabilities to encompass various aspects of a developer’s daily routine, including handling pull requests, documentation, testing, working with command-line interfaces (CLIs), and engaging in code-related conversations.
AI as Your Testing Companion
During the session, Richard Clark from Provar emphasized the significance of using intelligent algorithms to address problems, cautioning against labeling everything as “AI” simply because it appears magical or innovative.
Richard further highlighted several examples illustrating how AI could potentially be employed in the realm of software quality:
- Generation of tests and test data: AI can be utilized to automatically generate test scenarios and relevant test data, enabling comprehensive testing coverage.
- Mutation testing: AI algorithms can be applied to perform mutation testing, where the code is intentionally modified to identify weaknesses and assess the effectiveness of existing test cases.
- Image recognition and comparison: AI-powered image recognition algorithms can assist in automated visual testing, comparing expected and actual results of user interfaces or graphical components.
- Virtual assistance and recommendations: AI can serve as a virtual assistant, providing recommendations and suggestions for improving software quality, identifying potential issues, or offering insights based on historical data and patterns.
Takeaway for admins, developers, and testers: Embrace AI and intelligent solutions to elevate your organization’s software quality maturity. By leveraging AI technologies, you can enhance the effectiveness and efficiency of testing processes, enabling better coverage, creased frequency, and improved overall quality assurance practices.