Typing Practice for Programmers
Programming is a unique field: if you&#x27;re doing it right, it should never be dull. Frustrating? Draining? Rage-inducing? Sometimes. But not mind-numbing. Why? Because we can build our own tools. If we find ourselves doing repetitive work, we can build a tool to automate that work. This automation is itself likely at least somewhat interesting. What isn&#x27;t repetitive and that can&#x27;t be automated should be interesting as well.<p>If you find yourself bottlenecked on typing while programming, it&#x27;s a signal that you should stop what you&#x27;re doing and write some automation or abstraction. Sometimes you can just structure a program so that it requires less typing --- almost always a good thing.<p>In the rare cases where you need to be verbose in source code, you can use build-time source code generation, or failing that, an editor snippet library. I like yasnippet for that purpose.<p>Back at Microsoft, NT kernel style requires a big doc-comment before each major function. (These comments are extremely helpful --- but that&#x27;s beside the point.) The doc comment&#x27;s style is a bit more complex than Javadoc; there are multiple sections (e.g., description, arguments) and specific indentation requirements within each section.<p>I found it very annoying to write and format these comments.  Instead of just cursing doc comment writing all day, I took a week and solved the problem. I taught Emacs to highlight and indent these comments. I taught M-q to reformat paragraphs exactly as needed. I added code to automatically generate a skeleton description from the function prototype. And after all that, I was never bothered by the doc comment stuff again.<p>(Incidentally, in a big monolithic IDE, I think the barrier to this kind of extension would have too high to bother with, and I&#x27;d have been left cursing this code.)