I have a confession: I talk to my future self through code comments more than I talk to most people in real life. And nowhere is this conversation more delicate, more fraught with good intentions and broken promises, than in humble TODO comment.
You know ones I'm talking about. Those little breadcrumbs we sprinkle throughout our code like digital Post-it notes, promising ourselves we'll come back to clean up that hack, optimize that function, or handle that edge case. Sometimes they're lifesavers. Other times, they're like finding a note from your past self that just says "fix this mess" with no context, no timeline, and frankly, no hope.
TODO Graveyard
Let me paint you a picture from my early programming days. I'd just finished implementing a feature that worked—mostly. There were a few rough edges, some performance concerns, and that nagging feeling that error handling could be more robust. But deadline pressure was mounting like a king tide, so I did what seemed reasonable at time:
// TODO: Fix this
function processUserData(data) {
// TODO: Add error handling
// TODO: Optimize this later
// TODO: Make this more readable
return data.map(item => {
// TODO: This is hacky, clean up
return doComplexThing(item);
});
}
Six months later, when I came back to this code (because of course it started causing production issues), I stared at these TODOs like archaeological artifacts from a lost civilization. Fix this? Fix what exactly? This is hacky? In what way? Optimize this later? Later became never, and never became technical debt that compounded like interest on a credit card I'd forgotten about.
That's when I realized that most TODO comments are like those coastal trail markers that have been weathered blank by salt air and time—they point in a direction, but you have no idea where they're supposed to lead you.
Sacred Art of Meaningful TODOs
Here's what I've learned about writing TODO comments that actually serve their purpose: they should be love letters to your future self, not cryptic puzzles. A good TODO comment answers three critical questions:
Three Sacred Questions
- What needs to be done? (Be specific)
- Why does it need to be done? (Provide context)
- When should it be done? (Set expectations)
Let me show you how that same function looks when I treat TODO comments as breadcrumbs for a fellow human (even if that human is future-me):
// TODO (v2.1): Add input validation for edge cases where data.items
// might be null or contain non-object values. Current implementation
// assumes clean data from trusted API, but we're adding user upload
// functionality that could introduce malformed data.
// Priority: High (before user upload feature launches)
// TODO (performance): Consider memoization for doComplexThing() calls
// Current benchmarks show 200ms avg processing time for 1000 items.
// Target: <50ms for same dataset. Profile suggests redundant calculations
// in transformation logic.
// Priority: Medium (optimize when we reach 10k+ daily users)
function processUserData(data) {
return data.map(item => {
// TODO (refactor): Extract this transformation logic into separate
// utility function for better testability and reuse across
// processUserData() and processAdminData() functions
// Priority: Low (technical debt, address during next refactor cycle)
return doComplexThing(item);
});
}
See difference? Each TODO comment tells a story. Future-me (or any other developer) can immediately understand not just what needs attention, but why it matters and when it should be prioritized. It's like leaving a detailed tide chart instead of just a note that says "watch out for water."
My Personal TODO Navigation System
Living with ADHD means my brain operates like a tide pool—lots of fascinating things happening simultaneously, but I need clear navigation markers to keep track of it all. Over years, I've developed a TODO comment system that works with my scattered thoughts rather than against them:
TODO Categories
- TODO (bug): Fixes needed for incorrect behavior
- TODO (performance): Optimization opportunities
- TODO (refactor): Code quality improvements
- TODO (feature): Future functionality additions
- TODO (security): Security-related improvements
- TODO (docs): Documentation needs
Priority Levels
- Critical: Blocks deployment/causes crashes
- High: Needed before next release
- Medium: Important but not urgent
- Low: Technical debt, nice-to-have
- Someday: Ideas worth capturing
But here's my secret weapon: I also include emotional context in my TODOs. As someone who codes with both logic and feeling, I've found that capturing emotional state behind a TODO comment makes all difference when I return to it later.
// TODO (refactor): This nested loop makes me anxious every time I see it.
// It works for our current dataset (< 100 items) but I know it'll bite us
// when we scale. I wrote this at 2 AM during crunch before demo day.
// Future-me: please forgive past-me and consider a hash map approach.
// Priority: Medium (before we hit 1000+ items per user)
When I come across a comment like this, I don't just understand technical debt—I understand human story behind it. I remember that this wasn't careless coding; it was survival coding under pressure. That context helps me approach refactor with empathy rather than frustration.
TODO Lifecycle: From Intention to Action
Here's something I wish someone had told me early in my career: TODO comments need maintenance just like rest of your code. They're not fire-and-forget messages; they're living documents that should evolve with your codebase.
Birth: Writing TODO
Capture what, why, and when with enough context for a stranger to understand.
Growth: Regular Review
During code reviews and refactoring sessions, revisit TODOs. Update priorities as project needs change.
Completion: Action or Retirement
Either implement change and remove TODO, or explicitly decide it's no longer needed and delete it.
Death: Zombie TODO Problem
TODOs that linger for months without action become noise. Set expiration dates and be ruthless about cleanup.
When TODOs Become Dangerous
Not every future intention deserves a TODO comment. Sometimes, our instinct to leave breadcrumbs actually creates more problems than it solves. Here's when I've learned to resist TODO temptation:
❌ Security Issues
// TODO: Add proper authentication later
app.get('/admin', (req, res) => {
// Anyone can access this for now
res.render('admin-panel');
});
Security vulnerabilities should never be "TODO later." They should be "TODO now" or "TODO never deploy."
❌ Critical Bug Workarounds
// TODO: Fix real cause of this crash
try {
riskyOperation();
} catch (e) {
// Swallow error to prevent crash
}
Band-aids on critical bugs don't get better with time—they get scarier.
❌ Vague Future Dreams
// TODO: Make this faster
// TODO: This could be better
// TODO: Refactor everything
If you can't articulate what "better" or "faster" means, TODO is just wishful thinking.
Instead of TODOs for these situations, I've learned to either fix issue immediately, create a proper ticket in our project management system, or accept that current implementation is good enough for now and remove mental noise entirely.
ADHD Programmer's TODO Strategy
Living with ADHD means my relationship with TODO comments is... complicated. My brain generates ideas faster than I can implement them, and I often find myself in hyperfocus sessions where I want to fix everything at once. TODO comments have become my external memory system, but they require special handling for a neurodivergent brain:
ADHD-Friendly TODO Practices
- Time-box TODO creation: I limit myself to 5 minutes thinking about any single TODO. If I can't write it clearly in that time, it goes into a separate "ideas to explore" document.
- Use TODO urgency as a hyperfocus trigger: When I'm in a scattered mental state, I scan for "High" priority TODOs that I can knock out quickly to build momentum.
- Emotional state tags: I include tags like [energized], [tired], or [deep-work] to help future-me pick TODOs that match my current mental energy.
- "parking lot" TODO: For rabbit-hole ideas that emerge during focused work, I write a quick TODO with enough context to park thought, then immediately return to my original task.
// TODO [energized] (refactor): Extract validation logic into reusable helper
// This is satisfying, methodical work - perfect for high-energy days
// Estimated time: 30-45 minutes
// Benefits: Reduces duplication in 3 other files, easier testing
// Context: Started this pattern in UserService, want to standardize
// TODO [tired] (docs): Add JSDoc comments to public methods
// Low cognitive load task, good for end-of-day work
// Just need to document happy path, edge cases already covered in tests
// TODO [rabbit-hole]: Research GraphQL subscription patterns for real-time updates
// This is interesting but not urgent - save for dedicated research time
// Triggered by: conversation with Sarah about WebSocket alternatives
key insight for me was realizing that TODO comments aren't just about capturing tasks—they're about working with my brain's natural patterns instead of against them. When I'm scattered, I need clear, small wins. When I'm hyperfocused, I need to capture my rabbit-hole ideas without losing my current thread.
Tools for TODO Success
Even best TODO comment system fails without proper tooling. Here are automation and tools I use to keep my TODO comments from becoming digital debris:
IDE Integration
- VS Code TODO Highlight extension for visual scanning
- Custom snippets for consistent TODO formatting
- File-level TODO summary in problems panel
- Regex search patterns for TODO audits
Automation & CI/CD
- Pre-commit hooks to check for "empty" TODOs
- Weekly automated TODO summary reports
- GitHub Actions to flag old TODOs (>6 months)
- Integration with project management tools
# Pre-commit hook example
#!/bin/sh
# Prevent commits with low-quality TODOs
git diff --cached --name-only | xargs grep -l "TODO:" | while read file; do
if grep -q "TODO: Fix\|TODO: Clean\|TODO: This" "$file"; then
echo "❌ Found vague TODO in $file"
echo "Please add specific context to TODO comments"
exit 1
fi
done
automation isn't about being rigid—it's about creating gentle guardrails that help me maintain quality without having to remember to do it manually. My ADHD brain loves having systems that work in background to catch things I might forget.
Finding Your TODO True North
After years of treating TODO comments as throwaway notes, I've come to see them as one of most intimate forms of communication in programming. They're conversations with future versions of ourselves and our teammates—little moments of vulnerability where we admit we don't have all answers right now, but we care enough to leave a map for later.
sacred art isn't in writing perfect TODOs (though helpful ones make a huge difference). It's in treating these comments as what they really are: acts of care for people who will maintain this code, including version of yourself who returns to it months later with no memory of why you made certain choices.
Ken's TODO Principles
- Write TODOs as love letters to future programmers
- Include what, why, and when for every comment
- Treat TODOs as living documents that need maintenance
- Delete TODOs that no longer serve a purpose
- Never TODO away security issues or critical bugs
- Use automation to prevent TODO rot
- Match TODOs to your brain's natural patterns and energy levels
Whether you're working solo on a side project or collaborating on a team codebase, remember that TODO comments are breadcrumbs in vast forest of software development. Make them clear enough, detailed enough, and caring enough that whoever follows trail—even if it's just you six months from now—can find their way to understanding.
Because at end of day, good code isn't just about solving problems efficiently. It's about solving them in a way that shows respect for humans who will inherit your solutions. And sometimes, that respect comes in form of a well-crafted TODO comment that turns confusion into clarity.