AI-Assisted-Coding
AI-Assisted-Coding
What Software
Developers Need
to Know
Should developers use AI to generate code? While there’s no clear
answer, this guide breaks down the pros and cons — and potential
impact — of AI-assisted coding in today’s development environment.
By Christopher Tozzi
NEXT
AI-Assisted Coding: What Software Developers Need to Know
TABLE OF CONTENTS
What Is AI-Assisted Coding, and Should You Use It?............................................... 4
PREVIOUS NEXT
2
AI-Assisted Coding: What Software Developers Need to Know
INTRODUCTION
There’s a shortage of software developers, and that isn’t going to change off in 2023, as more developers will at least start experimenting with it to
anytime soon. With the U.S. Bureau of Labor Statistics expecting that more generate code.
than 165,000 software developer jobs will need to be filled each year through This special report explains what AI-assisted coding is and its potential in
the end of the decade, developers now have more options. But the lack of today’s development environment, covering both its benefits and drawbacks
talent is also putting more strain on them, with their increasing and more for developers. And although GitHub Copilot and Amazon CodeWhisperer
complex workloads often leading to burnout — a 2021 Haystack Analytics aren’t the only AI-powered code generation tools, they are major players,
study found that a whopping 83% of developers suffer from burnout. so we compare the two tools to help developers choose which one best
But help may here in the form of AI-assisted coding — the use of machine suits their needs. The benefits of AI-assisted coding aren’t limited to just
learning models to generate code automatically. Developers are already software developers — this report also details four areas where AI-assisted
turning to AI-assisted coding, thanks in large part to the launch last June code generation tools and platforms can help ITOps engineers.
of Microsoft’s GitHub Copilot AI-assisted development tool and, just two AI-assisted coding isn’t without controversy, however. There are questions
days later, AWS’ Amazon CodeWhisperer. about whether AI-generated code violates open source software licenses,
There are a lot of benefits to using AI-assisted coding, the main one, of and at least one lawsuit has been filed claiming it does. We take a deep dive
course, being that it saves developers time by allowing them to write code into the potential licensing implications of AI-assisted coding that developers
without actually having to write code. That’s why we believe its use will take should know about before diving into AI-assisted programming.
PREVIOUS NEXT
3
AI-Assisted Coding: What Software Developers Need to Know
F
or years, the idea that you could to do. Then, the tools automatically generate
automatically generate custom source the code to do it, complete with custom
code seemed like fiction. But it has variable names and the invocation of external
become reality thanks to new services modules or services, where necessary.
like GitHub Copilot and Tabnine, which In the background, the tools are powered
provide AI-assisted code generation. by algorithms that were trained using vast
Solutions like these have shifted the amounts of existing source code — which
question from “how can we use AI to generate usually comes in the form of publicly available
code?” to “should we use AI to generate code?” source code produced by open source
There’s no clear answer, but there is plenty projects. Based on these examples, the
to say about the pros and cons of AI-assisted algorithms generate custom code on demand.
coding in today’s development environment.
How New Is AI-Assisted Code Generation?
What Is AI-Assisted Coding? The idea of automatically generating
AI-assisted coding is the use of machine source code for applications isn’t especially
learning models to generate code new. Low-code and no-code development
automatically. Most existing AI-assisted tools have been around for decades. And
coding tools let developers describe in IDEs have long offered autocomplete
natural language what they want their code features, which you could consider a simple
PREVIOUS NEXT
4
AI-Assisted Coding: What Software Developers Need to Know
PREVIOUS NEXT
5
AI-Assisted Coding: What Software Developers Need to Know
PREVIOUS NEXT
6
AI-Assisted Coding: What Software Developers Need to Know
A
I-assisted coding — a practice that 1. Creating Infrastructure-as-Code hosting environments. By writing code to consuming and error-prone process.
uses artificial intelligence to help Templates define how the resources should be configured, However, the caveat with IaC is that
generate code — benefits software Infrastructure-as-code (IaC) tools are a then applying the configurations automatically, someone has to write the IaC templates that
developers first and foremost. great solution for ITOps engineers who have ITOps engineers can use IaC to avoid having determine how resources will be configured.
to configure large numbers of servers or cloud to configure each resource by hand — a time- Traditionally, that’s a task that ITOps
But the potential benefits of AI-assisted
engineers have had to perform by hand.
coding aren’t limited to software development.
But in the future, configuring IaC files may
They could also extend into other IT domains,
no longer require manual effort. AI-powered
including IT operations. Indeed, going coding tools could write the files automatically,
forward, the most efficient ITOps teams will based on natural-language input from ITOps
likely be relying increasingly on AI-powered engineers about how infrastructure should
coding tools to help speed their work and be configured. Rather than writing, say, a
reduce the risk of making mistakes. Terraform file by hand, you could simply say,
To prove the point, here’s a look at four areas “Write a Terraform file to set up a t2.micro
where ITOps engineers can benefit from AI- instance,” and an AI tool would write the
necessary configuration code for you.
assisted code generation tools and platforms,
along with an estimation of how close we are to 2. Writing Policy-as-Code Rules
a world where AI-powered coding tools become ITOps teams could adopt a similar strategy
a routine part of IT operations workflows. for writing policy-as-code files. Policy-as-code
PREVIOUS NEXT
7
AI-Assisted Coding: What Software Developers Need to Know
PREVIOUS NEXT
8
AI-Assisted Coding: What Software Developers Need to Know
Does AI-Assisted
Coding Violate Open
Source Licenses?
There are questions about whether AI-generated code violates software licenses.
What does this mean for IT pros who use AI-assisted code generators?
A
I has thrown a wrench in traditional Here’s what developers need to know
understandings of open source about the potential licensing implications
software licensing — and developers of AI-assisted coding, and how to make
should pay attention, whether or not informed decisions about risks associated
they use open source software in the with these tools. for the code they write. generated code to be governed by the same
conventional sense. As a result, it’s plausible to argue — protections (such as the requirement that
The reason why is that AI-powered code Copilot, AI-Assisted Coding, and Open as some folks have — that AI-assisted it remain publicly available) as the original
generation tools, like GitHub Copilot and Source Licenses coding tools infringe on open source open source code on which the AI code
Amazon CodeWhisperer, are raising complex The cause for potential concern surrounding software licenses because the tools analyze generators were trained.
legal questions about what counts as open AI-assisted coding and open source licensing source code to generate their own code, so The fact that most AI-assisted coding
source licensing infringement. The answers infringement is simple enough: AI-assisted AI-generated code could be considered a tools never asked for or received
to those questions may turn out to be benign code generators like Copilot were trained “derivative work” of open source codebases. permissions from open source developers
— or they may place developers who use AI- by parsing millions of lines of open source Under the terms of many open source to train using their code also complicates
assisted code generators in legal hot water. code, and they use that code as the basis licenses, this would require the auto- matters — although legally, that’s probably
PREVIOUS NEXT
9
AI-Assisted Coding: What Software Developers Need to Know
not as important as the argument that original code. They analyze code written other people’s code and using it to help guide lawsuit would have to show that parsing
AI-generated code counts as a derivative by other people to generate their code, but their own programming endeavors. To my of public code repositories by AI-powered
work of open source projects. their code is their own. knowledge, no one has ever argued that a tools is different from humans who look
At l e a s t o n e d eve l o p e r h a s In this sense, AI-generated code doesn’t developer who reads publicly available code at publicly available code, and that seems
already launched a campaign aiming to seem to be all that different from code that written by other developers has violated hard to do.
investigate GitHub, which owns Copilot, human programmers write by looking at anyone’s rights or license. To succeed, a
for “violating its legal duties to open-source An Open Question
authors and end users.” That campaign has For now, the issue of whether tools
spawned a class-action lawsuit “on behalf like Copilot violate open source licenses,
of a proposed class of possibly millions and whether developers who use Copilot
of GitHub users … challenging the legality are bound by the terms of the licenses
of GitHub Copilot.” The suit targets not associated with the code on which Copilot
just Microsoft (which owns GitHub and trained, remains an open question. But it
Copilot) but also OpenAI, whose AI engine has important ramifications for the future
powers Copilot. of both AI-assisted coding and open
source licensing.
Is AI-Generated Code Really Illegal? If a court were to decide that AI-assisted
Parties claiming that AI-assisted coders coding violates open source licensing terms,
have broken the law — or at least violated it would threaten to shut down the nascent
licenses — seem to be facing an uphill battle AI-generated coding industry before it really
inside the courtroom in many ways. has a chance to take off.
Probably the hardest hurdle for them to It would also set a precedent that open
clear stems from the fact that tools like source licensing terms extend much further
Copilot don’t actually copy open source than most people previously imagined. It
code verbatim. They generate their own, would establish a much more expansive
PREVIOUS NEXT
10
AI-Assisted Coding: What Software Developers Need to Know
definition of “derivative work” in this context, CodeWhisperer, which was also trained in
and it might make some developers (and part on open source codebases.
businesses) think harder about when to use But they’re not. They’re singling out
open source code, and which specific open Microsoft and its partners.
source licenses to use or to avoid. Nonetheless, there’s a chance that the
fear, uncertainty, and doubt raised by this
Fear, Uncertainty, and Doubt:
debate will itself entice many developers
Open Source Edition
to shy away from AI-assisted coding. In
I’m no lawyer, but it seems unlikely to me
that respect, the campaign against tools
that courts would actually find AI-assisted
like Copilot may succeed, even if it ends up
coding tools to be in violation of open
source licenses. having no legal leg to stand on.
I also have a hunch that a lot of the That’s ironic, because Microsoft
legal saber-rattling that has occurred adopted this very strategy starting back
surrounding this issue reflects a desire by in the 1990s, when it filed legally dubious
some developers to throw shade over AI- lawsuits involving Unix licenses in order to
assisted coding — and possibly Microsoft, discourage businesses from using Linux.
the parent company of GitHub — more More than two decades later, Microsoft
than it results from genuine concern over has declared its love for Linux, and it no
licensing terms and developer rights. longer spreads fear, uncertainty, and doubt
After all, you’d think that if these folks about open source software. But at least
were worried about the legality of AI- a few open source developers are now
assisted coding in general, they’d also arguably wielding this tactic against an AI-
be investigating or suing companies like assisted coding tool owned by Microsoft.
Amazon, which has developed an AI- As the French say: Plus ça change, plus
assisted development tool of its own, c’est la même chose.
PREVIOUS
11
AI-Assisted Coding: What Software Developers Need to Know
O
n the surface, GitHub Copilot and But when you dive into the details, you’ll
Amazon CodeWhisperer don’t look notice that Copilot and CodeWhisperer work
that different. They are both tools a bit differently, as this article explains. They
that use AI to help accelerate software also focus on different sets of use cases,
development processes. They are also which is the most important distinction
both owned by and integrated with the between them.
ecosystems of major tech companies — What Is Copilot?
Microsoft in the case of Copilot, and Amazon Copilot is an AI-assisted software Copilot works by analyzing the code writing new code. Under the hood, Copilot
in the case of CodeWhisperer — which makes development tool from GitHub (which is that developers have written — including is powered by OpenAI Codex, an AI model
them different from AI-assisted development owned by Microsoft). GitHub introduced it in comments that describe how code should
tools owned by startups, such as Tabnine, 2021 and released it into general availability work, even if the code itself isn’t written yet that was trained on code inside millions of
rather than tech behemoths. in 2022. — then offers automated suggestions for publicly available source code repositories.
PREVIOUS NEXT
12
AI-Assisted Coding: What Software Developers Need to Know
What Is CodeWhisperer? A third similarity is that neither tool claims Nor does it mean that code written with want to write code for moving files between
CodeWhisperer is an AI-assisted software to be capable of writing entire software CodeWhisperer will only run on Amazon
Amazon S3 buckets, for instance, or for
development tool from Amazon. Like Copilot, programs on its own — at least for now. platforms. In most cases, it can run anywhere.
working with EC2 instances, you’ll probably
CodeWhisperer interprets comments made Both Copilot and CodeWhisperer limit Still, when it comes to writing code related
by developers, then automatically suggests themselves to helping complete relatively to Amazon technologies, CodeWhisperer have an easier time getting good code if you
code they might want to implement. small segments of code based on context typically does a better job than Copilot. If you use CodeWhisperer.
Amazon hasn’t disclosed a lot of details that developers provide.
about how CodeWhisperer works in the back
Major Differences Between Copilot
end, but it says that the AI models that power and CodeWhisperer
the tool were trained using both open source When you dig deeper into the specific use
code and code that is internal to Amazon. cases for each tool, however, you’ll notice
some important differences between Copilot
Copilot vs. CodeWhisperer:
and CodeWhisperer.
Key Similarities
The biggest difference is that Copilot is
From a functional perspective, Copilot and
designed to be more of a general-purpose
CodeWhisperer are quite similar. They both
AI-assisted development tool, whereas
address the same needs, and developers can
CodeWhisperer caters first and foremost
use them in the same ways. With either tool, to development use cases associated
you basically just describe what you want with Amazon platforms, such as Amazon
your code to do, then let AI models auto- Web Services.
suggest the code you need to do it. To be clear, this doesn’t mean you can’t use
Copilot and CodeWhisperer are also similar CodeWhisperer to help write applications
in that they are both cloud-based solutions that aren’t linked in any particular way to
offered by major tech vendors. the Amazon ecosystem. You certainly can.
PREVIOUS NEXT
13
AI-Assisted Coding: What Software Developers Need to Know
PREVIOUS
14