I built a tool that turns bugs into diary entries—and debugging it taught me more than the tool itself

Published: (March 3, 2026 at 08:38 AM EST)
5 min read
Source: Dev.to

Source: Dev.to

This is a submission for the Built with Google Gemini: Writing Challenge

What I Built with Google Gemini

Every developer has a ritual they’re quietly ashamed of: Google the error, copy the fix, paste it in, move on. No reflection. No understanding. Same mistake next week.

I built DebugDiary to break that cycle.

DebugDiary is a full‑stack web app where you:

  1. Paste your broken code.
  2. Describe what went wrong in plain English.
  3. Let Google Gemini generate a personal diary entry – a reflection, a mirror.

Each entry contains:

  • A poetic title (e.g., “The Async Blind Spot”, “When JavaScript Doesn’t Wait for You”)
  • The technical root cause, explained clearly
  • A deeper psychological lesson – why the mistake happens, not just what it is
  • A “Remember This” rule of thumb burned into an inky‑black card
  • Tags that categorise your error type over time

The dashboard then builds a personal map of your weaknesses – your most common bug categories, a streak of consecutive days logging bugs, and an animated breakdown of your error patterns. Over time, it stops being a debugger and becomes a journal of your growth as a developer.

Gemini plays the central role: every entry is generated by a carefully engineered prompt that tells it to respond not like Stack Overflow, but like a thoughtful senior developer who has seen your mistake a hundred times and wants you to actually learn from it. The response comes back as structured JSON – title, fix, rootCause, deeperLesson, patternWarning, tags, severity, mood – which the app maps directly into a beautiful, readable diary page.

Tech stack

  • Frontend: React + Vite
  • Backend: Node.js + Express
  • AI: Google Gemini API (gemini-2.5-flash)
  • Persistence: Local JSON file
  • Extras: Framer Motion animations, React Syntax Highlighter for code diffs

Demo

Demo URL:

Screenshot
[Image: DebugDiary dashboard]
[Image: Entry view]
[Image: Pattern analytics]

What I Learned

I learned more building DebugDiary in one evening than I expected — and most of it wasn’t what I planned to learn.

Technical takeaways

  • Prompt engineering: My first prompt was a wall of instructions that returned inconsistent, unparseable JSON. The breakthrough came when I stopped telling Gemini what to do and started showing it the exact output shape I needed, with no room for interpretation. Short, constrained prompts produced dramatically better structured output than longer, more descriptive ones.
  • Gemini ecosystem volatility: Within a single evening I hit 404s from deprecated model names (gemini-1.5-flash, gemini-2.0-flash, gemini-2.0-flash-001), SDK version mismatches routing to the wrong endpoint, and 429 rate‑limits on the free tier. I switched from the @google/generative-ai SDK to direct fetch calls, then back to the SDK once I identified the correct model string (gemini-2.5-flash) and endpoint (v1beta). The friction forced me to understand the Gemini API surface deeply rather than cargo‑cult a quickstart.

Soft‑skill insights

  • Scope discipline: My original plan included a full database, user authentication, sharing features, and a weekly email digest. What I shipped was a local JSON file and four clean pages – and it’s better for it. The constraints forced clarity; every design decision centered on the core loop: paste bug → get lesson → see pattern.
  • Irony of the tool: DebugDiary is meant to help you learn from mistakes. While building it, I made more mistakes per hour than I have in months. Every 404, malformed JSON, or SDK quirk would have been a perfect diary entry. The tool ate its own dog‑food before I even finished building it.

Google Gemini Feedback

What worked brilliantly: The quality of Gemini’s reflective writing genuinely surprised me. I expected dry, technical explanations. Instead, when prompted correctly, it produced entries that felt warm and human — the kind of feedback you’d get from a patient mentor rather than a linter. The “deeper lesson” section consistently hit a level of psychological insight I didn’t anticipate. Lines like “under time pressure, you revert to synchronous thinking” aren’t just accurate; they’re the kind of observation that makes the learning stick.

Quick Take

The Gemini 2.5‑Flash model is fast enough for interactive debugging sessions, but the onboarding experience and JSON output handling need work.


What Works Well

  • Speed – Diary‑style entries are generated in 3–5 seconds, keeping the debugging flow uninterrupted.
  • Output quality – When it works, Gemini produces nuanced, reflective text that feels ahead of most competing models for this use case.

Pain Points

  1. Model availability friction

    • New developers frequently hit 404 errors because many tutorials reference model names that are no longer accessible to fresh API accounts.
    • There is no up‑to‑date guide that tells newcomers “these are the models you can actually use right now.”
    • This onboarding friction contradicts the promised “magical” developer experience.
  2. Structured JSON reliability

    • Even with explicit instructions to return raw JSON, Gemini sometimes wraps the response in markdown code fences.
    • This broke my parser until I added a manual cleanup step.
    • A native structured‑output mode (pass a schema, receive guaranteed‑valid JSON) would eliminate this issue and make Gemini far more production‑ready.

Verdict

Despite the onboarding and JSON‑formatting hurdles, I would use Gemini again without hesitation. The model’s output quality is genuinely superior for reflective, nuanced text generation.

What would make it perfect?

  • A clear, up‑to‑date guide on which models are currently available for new accounts.
  • Built‑in, schema‑driven structured output that guarantees valid JSON.

Shortening the path from “I have an API key” to “I have working output” would turn an already strong offering into a truly frictionless experience.

0 views
Back to Blog

Related posts

Read more »

Google Gemini Writing Challenge

What I Built - Where Gemini fit in - Used Gemini’s multimodal capabilities to let users upload screenshots of notes, diagrams, or code snippets. - Gemini gener...