Ask HN: Does touch typing make you a better programmer?
Hi folks! I've been trying to learn how to properly touch type and move away from my 'own system'. However I have been wondering if typing slowly actually helps organize your thoughts better when coding?
18 comments
[ 3.8 ms ] story [ 58.6 ms ] threadOn a more personal note, 90% of the lines I type are not ones I need time to think deeply about, so the faster I can pump those out, the better. It's why I've shifted from visual typing to touch typing, and why I optimize for ever faster keyboards once they start feeling too slow for me.
Touch typing means your fingers are trained to know where the keys are. You can type without having to look at the keyboard.
Touch typing doesn't necessarily have to be fast typing. You can touch type slow or fast.
Bottom line, anything which removes barriers to doing your job is better. the less you have to think about it, the better. Hitting the wrong keys is a bit of a distraction and having to look at the keyboard could be a small break in concentration. This is especially the case when it gets to the point of being annoying.
Sometimes people prefer writing with pen and paper because the physicality of it, the slower pace of writing and not being able to delete your mistakes makes you think a bit more about what you are about to write and what you have already written.
It would be interesting to write out a program with pen and paper and have that immediately be translated into digital. Maybe an E-ink editor. ;)
I competed in the BCS programming competition years ago, when the rules allowed one computer for a team of four. We found the optimal division of labour was one person developing at the keyboard, one person pair programming with them, and two "researchers" working on the next problems. If the person at the keyboard got "stuck", they were to print the program off and let someone else start typing. It was basically a superscalar pipeline of humans with a single "issue unit": the keyboard.
Some people build time into their working day for "reflection" and "supervision". They think back over how stuff went this day, week, month; and they get advice from a colleague about how they're doing - especially around how they could have tackled the tricky bits.
So maybe slower typing would allow programmers some reflection time.
But from what I've read programmers dislike interruptions to their typing rhythm - mouse based editing instead of keyboard shortcuts or programming languages that involve having to hold shift to get a character (too many braces?).
I think touch typing gives you the advantage of having less to focus on - some people can type at 120 wpm and hold a conversation.
IDEs can help in ways that aren't available to people touchtyping natural language. For example, Eclipse can pile up matching brackets to the right of the cursor as you add opening brackets. Many IDEs can autocomplete identifiers and keywords.
My highest ever "productivity" was around 500 LOC in a day, whereas some of my most useful work was entirely away from the keyboard. I know someone who prides himself on having removed thousands of lines of code from an open source project (something similar is going on in the OpenSSL audit).
If you're a fast typist, you'll probably fall into a pattern of alternating thought and action. It's worth quite a lot of time thinking rather than acting, to prevent committing a bad piece of code that will plague you forever.
- "If you spend more time hammering out code, then in order to keep up, you need to spend less time doing something else."
- non-touch typists have less impact on text-based forums (like this one)
- "non-typist code is... minimalist. They don't go the extra mile to comment things"
I spent 10 years in industry before I decided to learn to touch type. I noticed how fast some of my colleagues could chat and code and I was embarrassed. Then I read Steve's article. It was tough at first but I can't tell you how much it's helped my productivity.
Also, remap CapsLock to Ctrl on your keyboard. It makes coding a dream. And if you use Vim or a Vim-mode in your IDE, remap the sequence 'jk' to Esc. I never leave the home row anymore. See http://learnvimscriptthehardway.stevelosh.com/chapters/10.ht...
Wow, thanks so much for this
To be an outstanding developer, you should be skilled all along the continuum. Those who are slow tactically will only every be able to read books about strategic designs etc, which is good but will limit their skills. I'm reminded of a developer I once knew who thought he had all the answers architecturally, but was such a slow typer and didn't know how to use tools available to modify code that he'd never actually implemented any if the things he dreamed of, and who is going to trust someone with no experience? Also his ideas definitely had a "here's a big picture design, you guys figure out how to implement it" view to them, which meant they usually were not really a good idea.
As such, I think it is important to learn; fast typing (touch typing), fast editing (Vim, regex scripts, and all available refactoring tools), fast local coding (TDD, proper use of functions as an abstraction, and good naming), good module sizing (either namespaces or objects), then good module separation through services or message passing. I had to learn all of these in the last six years. I think every one was valuable. I had to learn to touch type after 22 years not being able to, but it has helped immensely in being able to fluidly get thoughts to editor.
I started practicing typing because I tend to type with 2 or 3 fingers per hand and was experiencing RSI symptoms. My hands feel a lot better when I type properly.
There is a great article about this on Coding Horror: http://blog.codinghorror.com/we-are-typists-first-programmer...
I've enjoyed typing.io for learning as well as typing of the dead.
Can you type "The quick brown fox jumps over the lazy dog?" with your eyes closed? If so, you're probably in good shape.*
*Does not apply on touch screens. Ain't nobody got time for that!
[1] The Joy of Typing - https://medium.com/message/the-joy-of-typing-fd8d091ab8ef