Back to all posts

Rubber Duck Debugger

7 min read
#astro #productivity #webdev #sideproject #debugging #fun
Rubber Duck Debugger

🦆 I Built a Rubber Duck to Fix My Brain (and My Bugs)

“Explain your code. Find your bugs. Save your sanity.”
👉 Live project: ducky.gt.tc


🧠 The Problem (aka: Me vs Focus)

I’ve been struggling with something every developer knows too well:

  • Opening 10 tabs
  • Starting 5 different tasks
  • Finishing... none

My brain?
💭 "Let’s fix that bug"
💭 "Wait, what if I redesign the UI?"
💭 "Actually… YouTube sounds nice."

So yeah… focus = gone.


🦆 The Idea: Rubber Duck Debugging (but ✨interactive✨)

You’ve probably heard of rubber duck debugging:

You explain your code to a duck, and somehow… you figure things out.

But I thought:

What if the duck actually responded?

Not with AI.
Not with magic.
Just enough personality to keep me engaged.


🚀 So I Built: Ducky

A tiny web app where:

  • You type your problem
  • The duck “responds”
  • You keep explaining
  • 💡 You figure it out yourself

🎯 Core Philosophy

No AI. No backend. No data leaving your browser.
Just you, your thoughts, and a slightly judgmental duck.

✨ Features (aka: The Duck Has Personality)

🎭 1. Multiple Personalities

Because debugging hits different moods:

Mode Vibe
😎 Chill Calm, curious, slightly mysterious
💀 Aggressive Roasts your code (and you)
🌟 Encouraging Your personal hype duck
type PersonalityType = 'chill' | 'aggressive' | 'encouraging';

🧩 2. Smart-ish Responses (No AI!)

The duck uses:

  • Keyword detection (error, bug, undefined)
  • Message length
  • Question detection
if (msgLower.includes("error")) return "errors are just spicy console logs.";

It’s dumb.
But somehow… it works.


🔊 3. Emotional Quack System™

Yes, seriously.

  • Aggressive mode → distorted, angry quacks
  • Encouraging mode → fast, happy quacks
  • Chill mode → normal vibes
source.playbackRate.value = 1.5; // happy duck

💡 If Web Audio fails → fallback audio kicks in.


💾 4. Local Storage = Memory

Your session persists:

localStorage.setItem('duck_session', JSON.stringify(messages));
  • Refresh? Still there.
  • Close tab? Still there.
  • Existential crisis? Duck remembers.

📤 5. Export Your Thoughts (.md!)

This might be my favorite feature.

You can export your debugging session as:

# 🦆 Rubber Duck Debugging Session

**You:** why is this undefined?
**🦆 Duck:** ah, the void...

👉 Instant dev journal.
👉 Or future embarrassment archive.


🎨 6. Smooth Animations (because why not)

Powered by GSAP:

  • Duck bounces when thinking 🦆
  • Messages slide in
  • UI feels alive
gsap.from(el, { y: 20, opacity: 0 });

🧼 7. Clean UI (Tailwind FTW)

  • Dark mode 🌙
  • Minimal distractions
  • Focus-first design

🤯 Unexpected Outcome

I didn’t just build a tool.

I accidentally built:

🧠 A thinking amplifier

Because when you’re forced to explain your problem:

  • You slow down
  • You notice gaps
  • You realize…
    “oh… wait… I’m the bug”

😂 Example Interaction

You: my API keeps returning null
Duck: nothingness. did you check if the API actually returned data?

And suddenly you're like:

“…oh. I didn’t.”


🛠 Tech Stack

  • ⚡ Astro
  • 🎨 Tailwind CSS
  • 🎬 GSAP
  • 🧠 Pure TypeScript logic
"dependencies": {
  "astro": "^6.x",
  "tailwindcss": "^4.x",
  "gsap": "^3.x"
}

🧪 What I Learned

  • You don’t need AI to build something useful
  • Simplicity > complexity
  • Personality makes tools fun
  • And most importantly…

🧠 Clarity comes from explaining, not thinking harder


🦆 Final Thoughts

This project started as:

“I can’t focus.”

It ended as:

“Let me explain this to my duck real quick.”


👉 Try It Yourself

🌐 Live: https://ducky.gt.tc


💬 If You Build Something Like This…

Tell me.

Or don’t.

Just… talk to the duck.


+ quack responsibly