I Asked an AI to Roast My Code. It Found 14 Problems in 30 Seconds.
Code review is the highest-leverage activity a team can practice. It catches bugs before production, spreads knowledge, and enforces standards. It's also painfully slow: a single PR can take 30–60 minutes of focused attention, and when you have dozens of PRs flowing daily, review becomes the bottleneck.
So I tried the other extreme. I pasted my code into an AI that doesn't suggest politely — it roasts it. Line-by-line, unsparing, with line numbers and suggested refactors. The verdict came back in under a minute, and it found 14 issues I'd missed.
Here's what it taught me.
What an AI code roast actually is
An AI roast is a critique, not a linter. Linters check formatting rules you already know. An AI reviewer reads your code like a senior engineer on a bad day: it hunts for code smells, security anti-patterns, performance red flags, and style violations — then tells you exactly where they are and how to fix them.
It doesn't replace human judgment. It removes the rote, pattern-matching work that consumes 80% of a human review's time. That's the part nobody enjoys anyway.
The 5 code smells it caught instantly
Functions that are too long
Anything over ~50 lines signals the function is doing three jobs instead of one. The AI flagged mine and pointed at the exact extraction points.Excessive nesting
More than three levels of indentation deep means the control flow is tangled. Every extra level multiplies the number of paths a future maintainer has to hold in their head.Magic numbers and strings
if response.status == 429 and retries < 3:
What are 429 and 3? Nobody knows. Named constants are free — the AI doesn't need to read your intent, but your teammates do.Duplicated logic
Copy-pasted blocks that should have been extracted into a shared utility. The classic: the same validation snippet in three different handlers, already starting to drift apart.Mixed responsibilities
A function that fetches, validates, transforms, and logs — then also renders the error. Single-responsibility violations are the quiet killers of testability.
Why "harsh" feedback is better for you
There's a reason the tool calls itself a roast: it's easier to improve when the feedback is specific enough to hurt. Vague praise ("looks good!") tells you nothing. Specific criticism ("line 42: this loop re-queries the DB every iteration") tells you exactly what to change.
I wrote about why negative feedback outperforms compliments when you're trying to get better — the short version: specific criticism is actionable, general praise is not.
What it didn't catch (and why that matters)
The AI caught smells in seconds, but it couldn't tell me whether the feature made product sense or whether the architecture was right for the next two years. That's the human part of review — and it's exactly what the human reviewers should focus on once the rote work is automated.
AI review doesn't shrink your team's review culture. It frees your reviewers to actually review: design, trade-offs, and taste. The patterns can stay in the machine.
Try it
The tool I used is Roast & Review — you paste code (or a resume, a landing page, a pitch deck, a portfolio…) and get a brutal, specific critique in seconds.
Roast your code: https://roast-and-review.com/roast-my-code/
The rest of the toolset: https://roast-and-review.com
Top comments (0)