Skip to content
Generative Coding Heats Up: ChatGTP-4 vs Bard vs Einstein GPT for Developers

Generative Coding Heats Up: ChatGTP-4 vs Bard vs Einstein GPT for Developers

Things are heating up fast in the generative coding space for engineering teams. Last week Google announced an update to Bard, their generative AI experiment, designed to attract coders to their platform. And I have developed some observations using OpenAI ChatGPT-4 heavily as a Salesforce, Go, and Typescript pair programmer for the last month. Plus, we have Einstein GPT for Developers coming down the pike. In this post I’ll compare the offerings and make some comments about how disruptive generative AI will be for Salesforce devops engineering teams.

Using OpenAI ChatGPT-4 for Generative Coding

I have taken a deep dive into using ChatGPT-4 as an AI pair programmer for the last month. In combination with GitHub Copilot, I must admit the experience has been nothing less than revolutionary. I was an analyst for the Internet revolution in the 1997 to 2002 era, and I get all kinds of Internet 1.0 vibes when I talk to people and show them what I’ve been doing.

Both GitHub Copilot and ChatGPT-4 are fully capable of working in Salesforce languages. Here’s a quick list of things you can do:

  • Paste an Apex class into the chat window after saying “generate a test class”.
  • Paste in an obscure error message and get assistance.
  • Use GitHub copilot to copy patterns in your code.
  • Use ChatGPT-4 to generate original Apex classes based on a functional description. Sample prompt: “generate an apex class with a static method to convert string to a date. Use multiple input formats.”

I do find, though, the chatbots can hallucinate, which is the technical term for when they make up facts. I have had it make up NPM packages or API calls that don’t exist. Fortunately, we have our compilers and code editors which catch most of these problems.

You can also have in-depth architectural discussions with ChatGPT-4 by specifying the type of expert it should be. Such as an AI pair programmer with expertise in Salesforce languages and system integration techniques.

What is Google Bard?

Bard is Google’s attempt to compete with OpenAI ChatGPT-4 in the GPT chatbot market. However, it has been poorly received, with even Google’s CEO, Sundar Pichai, virtually apologizing for its quality. Despite this, Bard’s latest update includes assistance with code generation, debugging, and code explanation in over 20 programming languages.

To date, I am unaware of any other major updates to the Google Bard GPT models, so I don’t know if it has gotten better as a chatbot. But this update features Bard’s ability to assist with code generation, debugging, and code explanation in over 20 programming languages. This includes popular languages like C++, Go, Java, JavaScript, Python, and TypeScript. Bard also helps write functions for Google Sheets and export Python code to Google Colab.

 Salesforce Einstein GPT for DevelopersGoogle BardOpenAI ChatGPT-4
Primary FocusSalesforce ecosystem and languagesGeneral-purpose programming languagesGeneral-purpose programming languages
AvailabilityWaiting for Pilot ProgramLimited Beta$20/month subscription
Supported LanguagesApex, VisualForce, and other Salesforce languagesC++, Go, Java, JavaScript, Python, TypeScript, and 20+ more languagesAll major languages plus Salesforce languages
IntegrationIntegrated with Salesforce tools and environmentIntegration with Google tools, including Google Colab and Google SheetsAPI and emerging plug-in ecosystem
Target AudienceSalesforce users and developersAny developer or coder working with various programming languagesAny developer or coder working with various programming languages
Source: SalesforceDevops.net research

Salesforce Einstein GPT for Developers

We are still waiting for Einstein GPT for Developers, which was announced at Salesforce TrailblazerDX on March 7th. Here is what I said back then:

Einstein GPT for Developers appears to work the same way as GitHub Copilot. In the press release, Salesforce claims an advantage because they have a separate language model. Salesforce had better get moving because Microsoft recently announced an upgrade to GitHub Copilot. With Copilot Business edition, enterprise customers can now train Copilot on their proprietary code bases. GitHub Copilot Business edition is now generally available.

Generative AI and Salesforce Devops

There are tons of Salesforce devops use cases for generative coding and GPT chatbots. I’ve already used ChatGPT-4 to help optimize a GitHub Actions workflow. I asked it to make an integration with our Jira instance so we could post updates. I had a working solution, and I was done with the task in about an hour.

Generative coding and Salesforce devops use cases must number in dozens. Here are a few.

  • Automate repetitive tasks. Instead of thinking, “I wish I had a BASH script that did something,” it takes five minutes to have the script in your browser.
  • Code Refactoring. ChatGPT-4 is the ultimate code refactoring factory. It is easy to get suggestions that optimize existing code for better performance, maintainability, and readability.
  • Test Case Generation. My friends at Provar showed off a prototype for test case generation using ChatGPT at TrailblazerDX. I’ll be doing a webinar next month with Richard Clark on how I’ve been using ChatGPT-4 for Salesforce devops. And we’ll get an update on how they are exploiting AI for the Provar platform.
  • Automated Documentation. Use generative coding to automatically create documentation for your Salesforce applications, including code comments, user guides, and API documentation.
  • Generate Deployment Scripts. Use generative coding to create dynamic deployment scripts for continuous integration and continuous deployment (CI/CD) pipelines.
  • Platform Cybersecurity. Leverage generative coding to integrate AI-driven code vulnerability scanning within the Salesforce DevOps pipeline, identifying potential security risks before deployment.

And don’t forget about GitHub Copilot, which I now consider essential for every VS Code user. GitHub Copilot works in just about any file in VS Code, including shell scripts, GitHub Actions YAML files, and Makefiles. This considerably shortens the time required to complete tasks. Also, ChatGPT-4 has a knack for arcane system integration techniques. That is helpful, because those techniques are frequently used in constructing devops system orchestration pipelines.

Generative Coding will be Highly Disruptive

Bottom line, as a coder I sometimes get that 10x productivity feeling using generative coding. And I can do more things faster than before. For example, I will be debugging an Apex class in one window while ChatGPT is writing a test class in another window at the same time. Generative coding is going to have a tremendous impact on technical debt and software quality. This is because it makes it much easier to do things right up front.

Engineering managers and software developers will be among the first professions to be disrupted by generative AI. Its power to assist with coding is at times astonishing. OpenAI, for example, uses generative coding to help build its own products. And they have amazed folks like Bill Gates and others with the speed of their advancements.

We don’t know how generative coding will impact large engineering teams, because we are still discovering what generative coding can do. But I do believe it will revolutionize how enterprise application development work is divided and performed at every level.

There will be workforce optimization, which is consultant-speak for eliminating jobs. And for the USA and other Western countries this means the pullback in offshoring will start almost immediately. I think it is IT workers in those offshore communities who will be the first tangible casualties of generative AI.

Generative Coding for the Enterprise: What to Do?

There are clearly huge privacy and confidentiality issues when it comes to generative coding for the enterprise. GitHub Copilot offers a business edition with privacy features, and OpenAI is rumored to have an enterprise program with a “do not learn” clause. The products and services needed by enterprises to take advantage of generative coding are still emerging. I’ll try to keep you updated on any announcements. Additionally, powerful AI models like GPT-4 may outcompete smaller, specialized AI models, which could affect companies like Salesforce.

Large IT organizations should treat the emergence of generative AI and generative coding as their own Red Alert. Executives need to get up to speed fast, and then start developing rapid response plans. The new management flows and how to collaborate with generative AI need to be anticipated before you get blindsided. It looks like 2023 is turning out to be a lot more interesting than we thought. 

Post
Filter
Apply Filters