This Rubber Duck Doesn't Debug — It Roasts

Published: (April 5, 2026 at 06:05 AM EDT)
3 min read
Source: Dev.to

Source: Dev.to

Overview

Rubber Roast — a VS Code extension that turns your rubber duck into a judgmental code critic. Inspired by CS50’s rubber‑duck debugging, this duck not only listens but also reads your code, finds 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:

  • Hard‑coded API key? “This credential has the security of a screen door on a submarine.”
  • Empty 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—and includes a duck emoji so you know exactly who’s judging you.

Two roast engines are 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.

Rubber Roast catches 7 types of code smells via built‑in regex (TODO/HACK, empty catch, commented‑out code, console.log spam, hard‑coded 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.

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 (no linter required)

SmellWhat it catches
TODO/HACK comments// TODO, // FIXME, // HACK, // WORKAROUND, etc.
Empty catch blockscatch(e) {} – swallowing errors silently
Commented‑out code3+ consecutive lines of commented code
Hard‑coded secretsAPI keys, tokens, and high‑entropy strings
Console spamExcessive console.log statements
Long functionsFunctions exceeding a configurable line count
Repeated magic stringsIdentical literal strings used in multiple places

Linter & language‑server diagnostics

Rubber Roast also surfaces issues reported by existing tools such as ESLint, TypeScript, Pyright, Ruff, rust‑analyzer, etc., classifying them into roastable categories (type errors, unused variables, deprecated APIs, lint violations, and more).

Technical Details

  • Implementation – TypeScript, zero runtime dependencies.
  • VS Code Extension API – inline text decorations, diagnostic listeners, commands, status bar integration.
  • 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 and maps their output to roastable categories.
  • VS Code Language Model API – optional AI‑powered roasts via Copilot with template fallback.
  • Shannon entropy detection – catches hard‑coded secrets that don’t match known prefixes.
  • Bundlingesbuild bundles everything into a single file.
  • Privacy – No external APIs, no telemetry; all processing runs locally.

Get Started

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

0 views
Back to Blog

Related posts

Read more »

418 Teapot in Your Terminal

Overview TeaTerminus418 is a web‑based terminal that hosts a sentient teapot enforcing the Hyper Text Coffee Pot Control Protocol HTCPCP/1.0 defined in RFC 232...