Free — no signup required

Where AI Excels and Where It Fails

2 min read

Knowing the Boundaries Makes You More Effective

AI coding assistants are not uniformly good at everything. Understanding where they excel and where they fail helps you use them strategically rather than reflexively.

Where AI is genuinely excellent:

  • Boilerplate and scaffolding: Generating the skeleton of a REST API, a Dockerfile, a CI pipeline config, or a test file. These follow well-known patterns that are heavily represented in training data.
  • Regex and string manipulation: Writing regular expressions is notoriously tedious. AI handles this well and can explain what the pattern matches.
  • Unit test generation: Given a function, AI can generate a comprehensive set of test cases including edge cases you might not have thought of.
  • Language translation: Converting a Python function to Go, or a Bash script to Python. AI handles syntax translation reliably.
  • Documentation: Writing docstrings, README sections, and inline comments for existing code.
  • Explaining unfamiliar code: Paste a complex function and ask "explain this line by line." This is one of the highest-value uses for onboarding to a new codebase.

Where AI frequently fails:

  • Novel algorithms: If the correct solution requires genuine algorithmic insight that is not well-represented in training data, AI will produce a plausible-looking but incorrect solution. It will not tell you it is guessing.
  • System-specific context: AI does not know your internal APIs, your database schema, your team's conventions, or your production constraints unless you tell it. It will invent plausible-sounding function names and table names that do not exist.
  • Long-range consistency: In a large codebase, AI may generate code that is locally correct but inconsistent with patterns established elsewhere — different error handling styles, different naming conventions, different abstraction levels.
  • Security-sensitive code: Cryptography, authentication, and authorization logic require precision that AI frequently gets wrong in subtle ways. Always have a security-focused human review this code.
  • Cutting-edge library versions: AI training data has a knowledge cutoff. If you are using a library version released after the cutoff, the AI may generate code for an older API that no longer works.

Key Point: The failure mode to fear most is not AI producing obviously wrong code — that is easy to catch. The failure mode to fear is AI producing subtly wrong code that passes a casual review: a security vulnerability hidden in otherwise clean code, a race condition in concurrent logic, or a function that works for all test cases but fails in production under load. This is why code review skills and deep engineering fundamentals remain essential.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free