← All articles
Developers

Dictating Code Comments and Docs: A Developer's Guide

July 28, 2026·4 min read
Dictating Code Comments and Docs: A Developer's Guide

Ask most developers why their code is underdocumented and the answer is always time. There is never a good moment to write the comment. The function made sense when you wrote it. You will remember what it does. You will add the docs later.

Later never comes. Six months on, someone else opens the file or you do, and the context is gone.

Voice input does not magically create time, but it removes enough friction that documentation can happen in the moment, right when your understanding of the code is highest.

Why Typing Docs Feels Like a Tax

Writing documentation while coding means context-switching between two different kinds of thinking. You are moving from the precise, structured logic of code to natural language explanation, then back. Each switch costs mental energy.

Typing the documentation adds a mechanical layer on top of that cognitive switch. Your hands are still working. The keyboard is still there. The sensation of the task does not change much from writing the code itself, which makes documentation feel like more code, just slower and less satisfying.

Speaking is different enough that it registers as a mode change. You lean back, look at the function you just wrote, and talk about what it does. The physical posture shift is small but it signals to your brain that this is explanation, not construction.

A Practical Setup for Voice-Assisted Development

You are not going to dictate your code. That is not the goal. The goal is to dictate the prose parts of your work: comments, docstrings, README sections, commit messages, Slack explanations, and internal wikis.

Set up VoiceInk so the push-to-talk key is reachable without moving your hands far from the home row. The right Option key works well for this. Cursor in the comment block, press the key, talk, release. The transcription lands exactly where you need it.

For a docstring, you might say: "Takes a user ID and a timestamp. Returns the list of events associated with that user since the timestamp. Raises a ValueError if the user ID is not found in the database. Assumes timestamps are in UTC."

That is 40 words in about fifteen seconds. Typing it with full attention takes maybe 25 seconds. Typing it while your attention is half back on the code, which is the real scenario, takes longer and produces worse results.

Commit Messages and PR Descriptions

This is where voice input pays off immediately. Commit messages are short, need to be clear, and are consistently underwritten by most developers. The friction of typing "fix bug" when you know you should write something meaningful is real.

With voice, the bar is lower. You press a key and say: "Fixed the race condition in the session handler that was causing intermittent 401 errors when two requests came in simultaneously for the same token refresh." Done. That commit message will be genuinely useful in six months.

PR descriptions take longer to type and are even more neglected. Dictating a PR description while you still have the full context of the change, right after you push the branch, takes two minutes and saves your reviewer significant time.

Taking Notes During Debugging

One underused application is voice-captured notes during a debugging session. When you are tracing through a problem, your mental model of what is happening is constantly updating. Most developers hold this model in their heads and lose it when the session ends.

Dictating a running log as you work gives you a record. "Checked the middleware order, that is not it. The token is being generated correctly, I can see it in the logs. The issue seems to be in how it is being passed between the auth handler and the session store." That kind of narration costs you almost nothing and can shortcut a future debugging session considerably.

Documentation is a communication problem. Voice input makes the communication fast enough to actually do.

Stop typing. Start talking.

VoiceInk turns your voice into text in any app. Local, fast, private. Free to start.

Download VoiceInk Free