GenAI: A New Tool in the Developer Toolbox

Brian King - Nov 29 '23 - - Dev Community

Developers craft software that both delight consumers and deliver innovative applications for enterprise users. This craft requires more than just churning out heaps of code; it embodies a process of observing, noticing, interviewing, brainstorming, reading, writing and rewriting specifications; designing, prototyping and coding to the specifications; reviewing, refactoring and verifying the software; and a virtuous cycle of deploying, debugging and improving. At every stage of this cycle, developers consume and generate two things: code and text. Code is text, after all.

The productivity of the developers is limited by real world realities, challenges with timelines, unclear requirements, legacy codebase and more. To overcome these obstacles and still meet the deadlines, developers have long relied on adding new tools to their toolbox. For example, code generation tools such as compilers, UI generators, ORM mappers, API generators, etc. Developers have embraced these tools without reservation, progressively evolving them to offer more intelligent functionalities. Modern compilers do more than just translate; they rewrite and optimize the code automatically. SQL, developed fifty years ago as a declarative language with a set of composable English templates, continues to evolve and improve data access experience and developer productivity. Developers have access to an endless array of tools to expand their toolbox.

The Emergence of GenAI

GenAI is a new, powerful tool for the developer toolbox. GenAI, short for Generative AI, is a subset of AI capable of taking prompts and then autonomously creating many forms of content—text, code, images, videos, music and more—that imitate and often mirror the quality of human craftship. Prompts are instructions in the form of expository writing. Better prompts produce better text, code. The seismic surge surrounding GenAI, supported with technologies such as ChatGPT, copilot, positions 2023 to be heralded as the ‘Year of GenAI’. GenAI’s text generation capability is expected to revolutionize every aspect of developer experience and productivity.

Impact on Developers

Someone recently noted, ‘In 2023, natural language has emerged as the fastest programming language.’ While the previous generation of tools focused on incremental improvement to productivity for writing code and improving code quality, GenAI tools promise to revolutionize these and every other aspect of developer work. ChatGPT can summarize a long requirement specification, give you the delta of what changed between two versions or help you come up with a checklist of a specific task. For coding, the impact is dramatic. Since these models have been trained on the entire internet, billions of parameters, trillions of tokens, they’ve seen a lot of code. By writing a good prompt, you make it to write a big piece of code, design the APIs and refactor the code. And in just one sentence, you can ask ChatGPT to rewrite everything in a brand new language. All these possibilities were simply science fiction just a few years ago. It makes the mundane tasks disappear, hard tasks easier and difficult tasks possible. Developers are relying more on ChatGPT to explain new concepts, clarify a confusing idea. Apparently, this trend has reduced the traffic to StackOverflow, a popular Q&A site for developers, anywhere between 16% to 50%, on various measures! Developers choose the winning tool.

But, there’s a catch. More than one, in fact. The GenAI tools of the current generation, although promising, are unaware of your goals and objectives. These tools, developed through training on a vast array of samples, operate by predicting the succeeding token, one at a time, rooted firmly in the patterns they have previously encountered. Their answer is guided and constrained by the prompt. To harness their potential effectively, it becomes imperative to craft detailed, expository style prompts. This nudges the technology to produce output that is closer to the intended goal, albeit with a style and creativity that is bounded by their training data. They excel in replicating styles they have been exposed to but fall short in inventing unprecedented ones. Multiple companies and groups are busy with training LLMs for specific tasks to improve their content generation. I recommend heeding the advice of Sathya Nadella, Microsoft’s CEO, who suggests it is prudent to treat the content generated by GenAI as a draft, requiring thorough review to ensure its clarity and accuracy. The onus falls on the developer to delineate between routine tasks and those demanding creativity—a discernment that remains beyond GenAI’s reach. At least, for now.

Despite this, with justifiable evidence, GenAI promises improved developer experience and productivity. OpenAI’s ChatGPT raced to 100 million users in a record time. Your favorite IDEs have plugins to exploit it. Microsoft has promised to use GenAI in all its products, including its revitalized search offering, bing.com. Google has answered with its own suite of services and products; Facebook and others have released multiple models to help developers progress.

It’s a great time to be a developer. The revolution has begun promptly. At Couchbase, we’ve introduced generative AI capabilities into our Database-as-a-Service Couchbase Capella to significantly enhance developer productivity and accelerate time to market for modern applications. The new capability called Capella iQ enables developers to write SQL++ and application-level code more quickly by delivering recommended sample code.

For more information about Capella iQ and to sign up for a private preview, please visit here, or try Couchbase for yourself today with our free trial here.

Author: Keshav Murthy

The post GenAI: A New Tool in the Developer Toolbox appeared first on The Couchbase Blog.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .