Voice for Code Comments

Dictate meaningful code comments that explain the why, not the what. Add context to complex logic without breaking your coding flow.

The Problem

Code comments are either absent, stating the obvious ('increment counter'), or outdated. Writing good comments that explain reasoning and context requires switching from coding mode to writing mode, which breaks flow. Most developers skip them entirely, leaving future readers (including themselves) to decipher intent from code alone.

The Solution

Ummless lets you speak your reasoning while looking at the code, without leaving your editor. The Quick Cleanup preset trims your spoken explanation into a concise, clear comment that captures the why behind complex logic, tradeoffs, and non-obvious decisions.

Workflow

  1. Write the code

    Implement the complex or non-obvious logic that needs a comment.

  2. Open Ummless

    Press Cmd+Shift+Space and select "Quick Cleanup" for concise output.

  3. Explain your reasoning

    Talk through why the code works this way, what alternatives you considered, or what edge case this handles. Focus on intent, not mechanics.

  4. Paste the comment

    Copy the refined explanation and add it as a comment above the relevant code block.

Before & After

Raw Transcript

So the reason we're using a WeakMap here instead of a regular Map is that uh we're caching computed styles for DOM elements and if we used a regular Map the elements would never be garbage collected even after they're removed from the DOM. The WeakMap lets the GC clean them up automatically which prevents memory leaks in long-running single-page apps.

Refined Output

// Use WeakMap for the computed style cache so that DOM elements can be // garbage collected when removed from the DOM. A regular Map would hold // strong references, causing memory leaks in long-running SPAs.

Suggested Presets

Quick Cleanup

Frequently Asked Questions

How do I avoid comments that just restate the code?

Focus on speaking about why you made a choice, not what the code does. Explain tradeoffs, edge cases, or business context. The preset will clean it up into a concise comment.

Should I use this for JSDoc-style documentation?

For function-level JSDoc comments, the Technical Documentation preset produces better structured output with parameter descriptions and return values. Quick Cleanup is ideal for inline explanatory comments.

What about TODO comments?

Dictate TODOs naturally: 'We need to come back and add retry logic here because the API is flaky.' The preset will produce a clean TODO comment with context.

Ready to try it?

Download Ummless and start using voice for your workflow.

Related Content