AI Coding Assistants Explained: What GitHub Copilot Actually Does
Development

AI Coding Assistants Explained: What GitHub Copilot Actually Does

M
Marcus Thorne · ·7 min read

In 2021, GitHub released Copilot and quietly changed how developers write code. For the first time, an AI tool could look at what you were writing and suggest the next several lines — including complete functions, test cases, and boilerplate that would have taken minutes to type manually.

A few years later, AI coding assistants are everywhere: Copilot, Cursor, Claude, ChatGPT, Amazon Q. Developers who use them report writing code significantly faster. Developers who don’t are increasingly at a disadvantage on certain tasks. Understanding what these tools actually do — and don’t do — helps you use them effectively rather than naively.

How They Work (The Short Version)

AI coding assistants are built on large language models (LLMs) — the same underlying technology as ChatGPT. These models are trained on enormous amounts of text, including hundreds of millions of lines of code from public repositories on GitHub and elsewhere.

During training, the model learns patterns: what follows a function signature, how database queries are typically structured, what a React component usually looks like, how to implement a binary search. It doesn’t store code snippets to copy back — it learns statistical patterns about how code is written.

When you’re coding, the assistant sees your current file (and sometimes other files in your project) as context and predicts what code would logically follow. It’s completion at a much larger scale and sophistication than what a regular code editor provides.

What GitHub Copilot Specifically Does

GitHub Copilot integrates into your editor (VS Code, JetBrains, Neovim) and watches what you type in real time.

Inline completions: As you type, Copilot suggests completions — sometimes a single line, sometimes a full function. You see the suggestion in gray, and press Tab to accept it.

Chat interface: Copilot includes a chat panel where you can ask questions about your code, request refactoring, or ask for explanations. You can highlight code and say “explain this” or “find bugs in this.”

Context awareness: Copilot looks at your open files, recently edited files, and the libraries you’ve imported. If your project uses a specific database library, Copilot suggests code using that library’s API rather than a generic alternative.

Multi-file understanding: Copilot X and newer versions can understand how functions in one file are called by code in another, generating more coherent suggestions across a codebase.

What AI Assistants Are Actually Good At

Boilerplate and repetition: Writing a new API endpoint that’s structurally identical to five you already have. Generating test cases that follow your existing test patterns. Writing TypeScript interfaces from an existing data structure. These tasks are tedious and predictable — exactly what AI handles well.

Working with unfamiliar APIs: When you need to use an API or library you haven’t used before, AI assistants can show you working usage examples without you needing to read documentation. “How do I parse a CSV in Python?” gets you working code immediately.

Explaining code you didn’t write: Encountering a complex function from an existing codebase or library? Highlighting it and asking for an explanation is often faster and more useful than reading raw documentation.

Scaffolding: The first file, the boilerplate setup, the project structure — AI can generate a working scaffold for a new component, feature, or service quickly.

Debugging direction: Describing an error or pasting a stack trace often produces a useful hypothesis about the cause, even if it’s not always right.

Where They Reliably Fall Short

Novel logic: If you’re building something genuinely new — a custom algorithm, a domain-specific optimization, a complex system design — AI is much less useful. It’s good at patterns it has seen; it struggles with problems that don’t have a well-worn template.

Your specific codebase: The model doesn’t truly understand your system’s architecture, business rules, or conventions beyond what’s visible in the current context window. It can write code that compiles but violates assumptions your codebase relies on.

Security: AI tools can and do suggest insecure code — SQL queries vulnerable to injection, cryptographic implementations with subtle flaws, authentication logic with edge cases. Never blindly accept AI-generated code in security-sensitive paths without review.

Correctness: AI code looks plausible and is often correct, but it can be subtly wrong in ways that don’t cause immediate failures. Tests are even more important when AI is writing significant amounts of your code.

Knowing when to stop: AI assistants will generate code confidently even when they’re wrong. They don’t flag uncertainty the way a senior developer would say “I’m not sure about this approach.” The output always looks finished.

The Right Mental Model

The most common mistake is treating AI output as correct until proven otherwise. The better mental model: treat AI-generated code like code from a junior developer who is fast, broadly knowledgeable, occasionally brilliant, and needs review.

You still need to:

  • Read and understand every line before committing it
  • Run tests (and write them when AI generates logic)
  • Think about edge cases the AI hasn’t considered
  • Maintain code that AI wrote — it’s your responsibility once it’s in the codebase

The developers getting the most from AI tools aren’t the ones accepting every suggestion. They’re the ones who can quickly evaluate suggestions, know what to ask for, and catch errors before they compound.

The Main Tools Right Now

GitHub Copilot — Deep VS Code integration, subscription model, trained specifically on code. The benchmark most others are compared against.

Cursor — An entire editor built around AI, with strong multi-file context handling. Many developers find it faster than Copilot for larger tasks.

Claude / ChatGPT — Better for longer conversations, architecture questions, explaining complex systems, or writing code that requires extended reasoning. Less useful as inline autocomplete.

Amazon Q — Copilot’s equivalent in the AWS ecosystem, with deeper integration into AWS services.

Codeium / Supermaven — Free alternatives to Copilot with comparable completion quality.

Getting Started

If you haven’t tried AI coding assistance yet, GitHub Copilot has a free tier that’s enough to form an opinion. Install the VS Code extension, open a project you know well, and watch how the suggestions compare to what you’d write.

The best exercises: let it generate boilerplate you’ve written before, then read the output critically. Use it to explain a confusing piece of code you’ve been avoiding. Ask it to write tests for a function you already wrote. Notice where it’s useful, where it’s wrong, and where it’s wasting your time.


AI coding assistants won’t replace developers — but developers who use them well are measurably faster on the tasks where they help. Knowing what they’re good at, what they get wrong, and how to review their output is becoming a core professional skill, not an optional extra.

M

Written by Marcus Thorne

Software analysis and cybersecurity tips

A former software engineer, Marcus transitioned into tech journalism to explain complex digital concepts in simple terms.

You Might Also Like