I was scrolling through r/PromptEngineering when a post title stopped me cold: “I asked ChatGPT to roast my code and I haven’t recovered emotionally.” Same energy as sending your resume to a friend who doesn’t sugarcoat things. You know it’s going to hurt, but you click anyway.
What followed was one of the funniest and most oddly practical prompt examples I’ve seen in a while. This Reddit user threw a simple persona prompt at ChatGPT and got back what amounts to a brutal but accurate code review dressed up as stand-up comedy.
🔥 The Prompt That Started It All
The prompt itself is dead simple:
“Roast this code like you’re a senior dev who’s had enough.”
That’s it. No complex system instructions, no multi-step chain of thought. Just a persona assignment with emotional context. And ChatGPT ran with it hard.
Here’s what came back:
- “This function is doing more jobs than a stressed parent on Christmas Eve. You’ve got error handling, business logic, database calls, AND logging all in one place. This isn’t a function, it’s a cry for help.”
- “You’re using a global variable here. In 2024. It’s like watching someone use a fax machine at a Tesla dealership.”
- “This comment says ‘temporary fix’ and the git blame shows it’s from 2021. We need to have a conversation about your definition of temporary.”
Every single roast pointed at a real code quality issue. Single responsibility violations, poor naming conventions, global state, stale tech debt. The original poster admitted the worst part was that everything ChatGPT said was correct.
🧠 Why This Actually Works
There’s a real insight buried under the humor here. When you ask an LLM to “find bugs” or “review this code,” you often get polite, generic feedback. The kind of review that says “consider refactoring” without telling you why your choices were questionable.
But when you tell the model to roast you? It drops the corporate politeness filter. The persona constraint pushes the model to be specific, pointed, and memorable. You’re more likely to actually fix a variable named “data2” after being publicly shamed about it than after reading “consider more descriptive variable names.”
This is a lightweight version of a well-known prompting technique: persona assignment changes output quality. A “senior dev who’s had enough” produces different analysis than a generic assistant.
🛠️ How to Try This Yourself
Here’s how to get similar results:
- Pick your model. The original poster used ChatGPT. One commenter suggested Claude might be even more relentless with honest critique.
- Paste your code. Functions, classes, entire files. The messier the code, the better the roast.
- Use the persona prompt. “Roast this code like you’re a senior dev who’s had enough” works great. You can also try variations like “Review this code as a brutally honest tech lead” or “Critique this like you’re rejecting a pull request you’ve seen three times already.”
- Take notes on the actual issues. Behind every joke is a legitimate code smell. Write down the real problems it identifies.
- Follow up. After the roast, ask: “Now fix the three worst issues you identified” to turn comedy into actionable refactoring.
💡 Tips and Variations
- Adjust the heat. “Roast gently” vs. “destroy this code” gives you a spectrum from constructive sarcasm to full demolition.
- Try self-roasting. One commenter had a great idea: ask the LLM to generate code, then roast its own output. It’s a surprisingly effective way to see where models cut corners.
- Use it for learning. Junior devs can paste tutorial code and ask for a roast to learn what “production ready” actually means.
- Layer it. Start with the roast for honest problem identification, then switch to a helpful mentor persona for the fixes.
🎯 The Elephant in the Room
The top comment, with 191 upvotes, called out that the post itself reads like it was written by ChatGPT. Fair point. The polished formatting and punchline structure do have that vibe. But honestly, whether the roast examples are real or slightly dramatized, the technique works. I’ve tried it myself and the results are genuinely useful and genuinely painful.
The original poster summed it up perfectly: “My self-esteem: 0. My code quality going forward: significantly better.”
Head over to r/PromptEngineering and check out the full thread. The comments section has some solid suggestions for pushing this technique even further. 🚀
Frequently Asked Questions
Q: Should I ask for a “roast” or constructive feedback when reviewing code?
Both work, but for different reasons. Roasts deliver brutally honest, memorable feedback that sticks with you (and hurts in the best way). Constructive feedback focuses on solutions and improvement paths. Some devs prefer the no-BS candor of roasts because they tolerate honesty better than flattery. If you want actionable improvements without the sass, ask the AI to “help me improve this code” instead—you’ll get solid suggestions minus the emotional sting.
Q: Does the LLM choice matter for code critique?
Definitely. Claude tends to be more relentless and technically thorough than ChatGPT, while ChatGPT can lean more conversational. If you want brutally honest feedback, Claude’s style might hit harder. Your prompt matters too—be specific about what critique style you want (roast mode vs. mentor mode) and you’ll get different results from the same code.
Q: Why does harsh feedback stick better than gentle suggestions?
Harsh feedback creates emotional impact that burns lessons into your memory. That vividly sarcastic comment (like the fax machine at a Tesla dealership) becomes unforgettable—you’ll hear that senior dev voice judging your code every time you write now. It’s harsh muscle memory development, and it works.
Q: What’s the actual problem with putting business logic, error handling, and database calls in one function?
Functions doing too many jobs violate the Single Responsibility Principle, making them harder to test, debug, maintain, and reuse. Breaking them into smaller, focused functions makes your code modular and easier to reason about. That’s why the critique hit—it was technically correct, not just sass.
I asked ChatGPT to roast my code and I haven’t recovered emotionally
by u/AdCold1610 in PromptEngineering