WordPress Ad Banner

The Impact of Generative AI on Coding: Enhancing Efficiency and Problem-Solving

Generative AI has captivated the public’s imagination and ignited a tech gold rush. While AI tools that generate natural language prose and visual art have garnered significant attention, the coding capabilities of AI are increasingly intriguing tech professionals. By simply describing a desired program to an AI chatbot, developers can receive executable code within seconds. This advancement both fascinates and unsettles programmers, but the reality is that machines are unlikely to replace human coders anytime soon. We interviewed programmers who utilize generative AI in their work to understand how it is transforming their workflow, uncovering valuable insights about the benefits and limitations of AI in coding.

The Power of AI in Assisting Coders:

Among the generative AI tools frequently employed by developers, ChatGPT from OpenAI and GitHub Copilot, integrated with popular IDEs like Visual Studio, stood out. While both tools generate code based on natural language queries, Copilot and its experimental successor, Copilot X, go beyond conversational models by acting as advanced IDE autocompletes that anticipate developers’ intentions.

WordPress Ad Banner

Vanessa Freudenberg, co-founder and chief architect at Croquet.io, uses GitHub Copilot in conjunction with Visual Studio Code for her daily coding. She explains the practical workings of the tool.

If I write the line:

    let x = this.leftMargin + this.width / 2;

it will automatically suggest the next line:

    let y = this.topMargin + this.height / 2;

And it knows that it needs to replace “width” and “left” with “height” and “top”. That saves me a lot of typing.

Panickos Neophytou, co-founder and CTO at NetBeez, utilizes Copilot X and ChatGPT extensively in his coding process. He employs two distinct approaches to leverage these tools beyond simple autocompletion. The first approach is systematic, where he provides a detailed description of a well-defined function, including specific inputs, expected outputs, and relevant data models. The AI can infer associations, and Neophytou instructs it to implement the function in a specific language and manner. He suggests defining project management tasks as such prompts.

Additionally, Neophytou finds a more conversational technique effective. While working on a task, he poses questions that arise in his mind, simulating the experience of having an experienced engineer by his side, answering queries and guiding him toward completion.

Mastering the art of prompting the AI correctly is crucial, regardless of the technique employed. Shanea Leven, founder and CEO of software provider CodeSee, highlights the importance of chain-of-thought prompting to ensure precise verb selection and prompt refinement. Prompt engineering is emerging as a significant discipline for this reason.

AI’s Coding Strengths:

Developers shared various use cases where AI tools have proven valuable in their work. Some notable examples include:

  1. Solutions to solved problems: Programming often involves reinventing the wheel, which can be frustrating. Jeff Wills, engineering practice lead at Rise8, views this as a prime area for AI assistance. For instance, when Wills creates a method to calculate the distance between two points on a sphere, Copilot can automatically find and generate the Haversine algorithm, eliminating the need for redundant coding.
  2. Updating or cleaning up code: Chris Love of Love2Dev finds ChatGPT particularly useful for updating his existing code. He describes scenarios where he converts older promise-based functions to use the cleaner syntax of async/await or adopts modern syntaxes like destructuring and updated variable declarations.
  3. Potentially faster coding: Many developers perceive that working with Copilot or ChatGPT enables them to work more efficiently, although quantifying the exact impact is challenging. Love believes these tools help him write better code a little faster, while Wills feels they enable him to iterate through potential solutions more swiftly, which enhances the quality of his work.

Conclusion: Generative AI is revolutionizing coding practices by empowering developers with tools like ChatGPT and GitHub Copilot. Programmers are benefitting from AI assistance in solving problems, updating code, and potentially working more efficiently. However, while AI enhances productivity and problem-solving, it is not poised to replace human coders in the near future. The ongoing integration of AI into the software industry promises to reshape workflows and augment the capabilities of human developers, leading to a new era of coding possibilities.