Programmers are increasingly adopting tools powered by artificial intelligence, and this shift is reshaping their approach to coding.

Since the spotlight embraced generative AI tools like OpenAI LP’s ChatGPT and Google LLC’s Bard, the world has been captivated by their conversational abilities and impressive utility. One of their early and prominent applications is assisting software developers in writing code.

Following ChatGPT’s surge in popularity and its remarkable conversational and writing capabilities, numerous code-generating chatbots and developer tools have flooded the market. These include GPT-4, the same model behind the premium ChatGPT Plus service, Microsoft Corp.’s GitHub Copilot coding assistant, Amazon Web Services Inc.’s Code Whisperer, and others.

According to a June survey by Stack Overflow involving over 90,000 developers, almost 44% reported using AI tools in their work, with an additional 26% expressing openness to using them soon. The tools were primarily employed for code production (82%), debugging and assistance (48%), and learning about specific codebases (30%).

To understand how developers are integrating AI tools into their daily work, SiliconANGLE interviewed several developers. Two major coding tool modes have emerged: chatbots like ChatGPT that generate code snippets or check code, and coding assistants like GitHub Copilot that provide suggestions as developers write.

For instance, Oliver Keane, an associate web developer at Adaptavist Group Ltd., uses ChatGPT as a coding companion to swiftly establish code foundations for projects. Keane provided an example of creating a content management system, where GPT was asked to generate a method for admins to update FAQs. He highlighted that, although he could code it himself, using GPT results in a solution 80% of the time on the first attempt.

However, Keane emphasized the need for upfront work, as chatbots like ChatGPT require a conversational history or context to function effectively. Developers must build a rapport by prompting the tool with relevant code until it understands the project, after which it provides better responses.

Once trained, developers can use these models for code reviews, bug discovery, and revisiting old work, essentially turning them into “pair programmers” for discussions on improving old code. Keane noted that, while the AI tool meets his needs 80% of the time, refining prompts can enhance its performance.

Chatbots, besides aiding in coding tasks, also prove valuable for learning new frameworks and coding languages. Well-trained language models can serve as effective tutors, rapidly bringing developers up to speed, often surpassing traditional learning resources due to their conversational nature and interactive code discussions.

AI code completion tools like GitHub Copilot have been a revelation for me and many other developers. They’re not chatbots – they’re like having an extra pair of hands at the keyboard. Copilot helps me write better code, even though I’m not writing most of it myself.

The way this works is that Copilot suggests code snippets as I type. These snippets are often exactly what I need, and they force me to write my own code in a more descriptive and precise way. This is because if my code is too vague, Copilot will either go haywire or suggest irrelevant code.

In the beginning, I found that Copilot would only suggest short stints of code, like a few lines at a time. But as I got used to using it, Copilot started suggesting longer and longer snippets, sometimes even 20 lines or more. This has saved me a lot of time and effort, and it’s given me more time to focus on other parts of my job, such as marketing and business development.

In a recent survey of Stack Overflow users, 37% of professional coders said that the main benefit of using AI code completion tools is improved productivity. Another 27% said that greater efficiency is the main benefit, and 27% said that speed of learning is the main benefit.

I can definitely see why productivity is the primary benefit for all types of developers. AI code completion tools can save you a lot of time and effort, which can free you up to focus on other things. And if you’re just learning to code, these tools can help you learn faster and more effectively.

Overall, I’m a big fan of AI code completion tools. They’re not perfect, but they’re a valuable tool for any developer.

While these AI tools can be incredibly helpful for developers, they’re not without their challenges. For instance, large language models may sometimes produce misinformation or “hallucinate,” generating problematic code. When using tools like chatbots, bugs might be caught by the compiler or a seasoned coder during a code review. However, code-suggesting AIs can introduce similar issues, requiring additional time to understand what went wrong after the fact.

Reeve, for example, shared his experience with anxiety when GitHub Copilot generated a substantial amount of code at once. While it initially seemed like a time-saving boon, a bug emerged hours later due to a minor mistake in the AI-generated code. This highlights a certain level of uncertainty when the tool anticipates too far into the future.

According to a Stack Overflow survey, only about 42% of developers trust AI models, with 31% expressing doubts and the rest having more serious concerns about the outputs. Some AI models may also be more prone to hallucinations than others.

On the flip side, these tools enable rapid code production in ways not seen before, potentially sparing developers from tedious tasks. However, there’s a concern that overreliance on AI may hinder newer developers from fully grasping the fundamentals of programming languages.

Jodie Burchell, a developer advocate at JetBrains, emphasizes that AI coding tools should be viewed as tools and assistants. Developers remain responsible for ensuring that the code aligns with their intentions, even if the AI provides imperfect guidance. Burchell underscores the importance of critical thinking, stating that there’s no shortcut to simply letting models develop code without scrutiny.

The 2023 Accelerate State of DevOps Report from Google’s cloud division suggests that while AI tools slightly improve individual well-being, their impact on group-level outcomes, such as overall team performance, is neutral or even negative. This mixed evidence is attributed to the early stages of AI tool adoption among enterprises.

Despite potential challenges, more developers are expressing interest in incorporating AI tools into their workflows, as indicated by the Stack Overflow survey. This trend is particularly notable among developers learning to code, with 54% showing interest compared to 44% of professionals. Veteran coders, on the other hand, tend to be less enthusiastic about adopting these new AI tools.

In the realm of generative AI developer tools, it’s still early days, but adoption is progressing rapidly. Companies like OpenAI and Meta continuously enhance their models, such as GPT-4, Codex, and Code Llama, for integration into more tools. As these models evolve and become more ingrained in the development process, developers may find themselves spending a significant portion of their coding time collaborating with AI tools. Learning to provide effective prompts, maintaining precision coding for guiding predictive algorithms, and understanding the models’ limitations will likely be crucial for navigating this AI-centric future.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *