iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🧪

Beginners Should Keep a 'Bug Diary' Before Using AI: How I Halved My Debugging Time in 3 Weeks

に公開

Introduction

AI truly increases implementation speed. That is a fact.
However, beginners often repeat the same mistakes, which ultimately slows them down.
What worked best for me wasn't adding new tools, but keeping a "Bug Diary."

In this article, I will summarize the methods that actually worked for me over 3 weeks in a reproducible way.
The conclusion is simple: Before asking AI, record the pattern of your failure.

Conclusion

  • Keeping a bug diary reduces the recurrence rate of the same failures.
  • Making it a template that takes 3 minutes per entry ensures you keep doing it.
  • It also helps organize information before throwing it at the AI, increasing the quality of the answers.

Why do beginners encounter the same bugs?

The causes are generally three:

  • Not remembering what was fixed.
  • Not recording the conditions of the failure.
  • Not being able to explain "why it started working."

If you consult an AI in this state, it treats every request like the first time.
As a result, you end up having similar exchanges repeatedly.

Bug Diary Template (This is all you need)

At first, these 4 items are enough.

# YYYY-MM-DD / Bug Name

- Symptoms: What happened?
- Cause: Why did it happen?
- Fix: What did I change?
- Recurrence Prevention: What to check next time?

The point is not to write a long text.
Aim for "notes that will help the future me," not "perfect documentation."

Practical Example

# 2026-03-01 / Firestore reads spiked

- Symptoms: Reads increased to 15,000 per day
- Cause: onSnapshot was constantly fetching even in background tabs
- Fix: Added conditional branching to fetch only for the active tab
- Recurrence Prevention: Check useEffect dependency arrays and subscription targets before PR

With just this one entry, I prevented similar accidents twice.
Just visualizing that "I've done this before" makes decision-making faster.

How to use it with AI

The bug diary can be used directly as input for AI.

Symptoms: 500 error when saving
Candidate Cause: Potential expiration of authentication token
Fixes already tried: Added retry (no effect)
Recurrence Prevention condition: Make re-authentication flow mandatory on 401

Passing it in this form makes the AI's suggestions concrete.
Conversely, if you throw "it broke somehow" at it, you are more likely to get generic answers.

3-Week Transformation (Measured)

Comparing roughly before and after the introduction of the bug diary, the changes were as follows:

Metric Before After
Recurrence of same bugs 8 per week 3 per week
Recovery time per entry 42 min 21 min
Back-and-forth until identifying cause 4 times on average 2 times on average

Of course, there are differences depending on the project scale.
Still, the effect of reducing the "number of times you get stuck in the same place" was significant.

Failed Operations

I failed with these two things at the beginning:

  • Wrote too much detail and couldn't keep it up.
  • Recording locations were scattered, making it impossible to search.

So now, I stick to "one place," "4 items," and "within 3 minutes."
It works better if you decide on a design that you can sustain first.

Steps for beginners to start today

  • First, make one template.
  • Record only one bug from today.
  • If you encounter the same type tomorrow, update the recurrence prevention field.

That's enough.
Rather than aiming for perfection, stacking one entry a day is more effective.

Summary

Even in the AI era, it's humble record-keeping that stabilizes development.
A bug diary isn't flashy, but it reduces recurrences and speeds up decision-making.
It is especially valuable for beginners to create one early.
I hope you start with just one entry today.

References

GitHubで編集を提案

Discussion