DEV Community

Einorde
Einorde

Posted on

This Rubber Duck Doesn't Debug — It Roasts

April Fools Challenge Submission ☕️🤡

This Rubber Duck Doesn't Debug — It Roasts

This is a submission for the DEV April Fools Challenge

Rubber Roast Logo

What I Built

Rubber Roast — a VS Code extension that turns your rubber duck into a judgmental code critic.

We're all vibe coding now. You prompt, the AI writes, you hit accept, and ship. But AI-generated code still leaves behind catch(e) {}, hardcoded secrets, 80-line functions, and enough console.log statements to fill a novel. And when you're vibing, you're not reading every line.

So I built a duck that does.

Inspired by CS50's rubber duck debugging — except this duck doesn't just listen. It reads your code, finds the smells, and roasts you for them.

Every time you save a file, Rubber Roast scans for code smells and drops sarcastic inline annotations right next to the offending lines:

  • Hardcoded an API key? "This credential has the security of a screen door on a submarine."
  • Left a catch(e) {}? "Pokemon exception handling: gotta catch 'em all... and ignore 'em all."
  • 47 console.log statements? "This is not a program, it's a console.log delivery system."
  • TODO comment from 3 years ago? "This TODO has been through 47 sprints and 3 project managers."

Each roast is color-coded by severity — green for mild, yellow for medium, pink for spicy — with a duck emoji so you know exactly who's judging you.

Two roast engines included:

  • Template mode (free) — hundreds of savage one-liners, zero API calls
  • LM mode — uses VS Code's Language Model API so your AI copilot can roast you too

It catches 7 types of code smells via built-in regex (TODO/HACK, empty catch, commented-out code, console.log spam, hardcoded secrets, long functions, repeated magic strings) — plus everything your linters and language servers already flag (type errors, unused variables, deprecated APIs, lint violations, and more).

Behind the jokes, it's a real code smell detector. You just happen to learn about your mistakes while laughing at them.

Demo

Rubber Roast in action

Try it yourself: Rubber Roast on VS Code Marketplace

Code

Rubber Roast

Your rubber duck finally has opinions — detect code smells, get roasted with sarcastic inline annotations.

Inspired by CS50's rubber duck debugging, but this duck fights back.

Rubber Roast in action

Features

  • Inline roast comments — sarcastic one-liners appear as italic annotations next to problematic lines, color-coded by severity (mild/medium/spicy)
  • Two roast engines — free template-based roasts or AI-generated roasts via the VS Code Language Model API (requires Copilot or similar)
  • Auto-roast — triggers on file save, file switch, and diagnostic updates

What Gets Roasted

Rubber Roast detects code smells from two sources:

Built-in regex rules — these work out of the box, no linter required:

Smell What it catches
TODO/HACK comments // TODO, // FIXME, // HACK, // WORKAROUND, etc.
Empty catch blocks catch(e) {} — swallowing errors silently
Commented-out code 3+ consecutive lines of commented code
Hardcoded secrets API keys, tokens, and high-entropy strings in

How I Built It

  • TypeScript — the entire extension, zero runtime dependencies
  • VS Code Extension API — inline text decorations, diagnostic listeners, commands, status bar
  • Regex-based scanner — custom pattern matching with line classification (code vs comment vs string) to avoid false positives
  • Diagnostic scanner — hooks into existing language servers (ESLint, TypeScript, Pyright, Ruff, rust-analyzer, etc.) and classifies their output into roastable categories
  • VS Code Language Model API — optional AI-powered roasts via Copilot with template fallback
  • Shannon entropy detection — for catching hardcoded secrets that don't match known prefixes
  • esbuild — bundling everything into a single file

No external APIs. No telemetry. Just pure, locally-executed judgment.

Prize Category

Open to any category the judges see fit — this duck doesn't pick favorites, it just roasts everyone equally.

Top comments (0)