Dictating Code Comments Without Breaking Your Flow

Most developers write code comments the way they write everything else: slowly, reluctantly, after the fact. The code gets written. The comment gets a one-liner that half-explains what the function does. Documentation gets deferred to next sprint, which means never.
Voice dictation doesn't fix the motivation problem. But it does remove the friction that makes writing prose inside a coding session feel so disruptive.
The Friction Is Real
Switching from code to English mid-session has a cost. You leave the syntax mindset, pick up natural language, write something, and then have to shift back. The keyboard is the same, but the mental mode isn't.
Voice creates a cleaner separation. You keep your hands on the keyboard for code. When you need to write a comment block or a README section, you speak it. The physical distinction reinforces the mental one. Many developers who try this report that it actually feels less disruptive, not more.
What Works Well Out Loud
Function and method documentation is a natural fit. Instead of typing a JSDoc block character by character, you speak it: "This function takes a user ID and returns the most recent session object, or null if no session exists. Throws if the database connection is unavailable."
That sentence took about five seconds to say. It's a useful comment. Typing it would have taken longer and probably gotten trimmed.
README files are another strong use case. The structure of a README is mostly prose with some code samples. You can dictate the prose sections and type the code blocks, combining both modes naturally.
Commit messages also benefit. A well-written commit message explains why a change was made, not just what changed. Speaking that explanation out loud often produces a better message than typing, because you're narrating your reasoning rather than summarizing it.
Setting It Up Without Disrupting the Editor
The key is a dictation tool that works at the system level, placing text wherever your cursor sits. VoiceInk works this way: press a key, speak, and the transcription appears inside VS Code, Xcode, or whatever editor you're using. There's no separate window to manage.
This matters more than it might seem. If dictation requires you to leave the editor, copy text, and paste it back, the friction is almost as high as typing. System-level input removes that entirely.
A Practical Workflow
Write the code first. Then, before moving to the next function, pause and dictate the comment block. Speak naturally, as if you're explaining it to a teammate who just asked what the function does.
Don't edit while dictating. Say the whole thing, then do one pass to clean up any transcription errors or awkward phrasing. That pass takes 30 seconds. The result is a comment that actually communicates something.
For longer documentation, try dictating an outline first. Speak the section headings and one-sentence summaries. Then go back and fill each section. This keeps the structure visible before you commit to the details.
What Doesn't Work Well
Variable names, function signatures, and anything with specific syntax should stay on the keyboard. Saying "camel case get user session token" is slower than typing it and more prone to error.
The rule of thumb: if it's prose, speak it. If it's syntax, type it.
Documentation debt is one of the most common complaints in any engineering team. Part of that debt comes from how unpleasant it is to context-switch into writing. If speaking your comments feels faster and less disruptive than typing them, you might actually write them.
Stop typing. Start talking.
VoiceInk turns your voice into text in any app. Local, fast, private. Free to start.
Download VoiceInk Free