Hacker News new | ask | show | jobs
by samd 5043 days ago
I don't understand programmer's obsession with typing efficiency. We're not typists. Typing is a tiny fraction of the time I spend programming. Most of the time I'm thinking, or talking to another developer about a problem. I could have the fastest typing skills and most efficient editor and not even be marginally more productive.
6 comments

Obsessing over typing efficiency doesn't make much sense, but being able to reasonably quickly with a high level of accuracy type makes a huge difference. By being able to touch-type at ~30 words a minute (making a rough guess here, I have no data to back up where the speed actually lies) means that you can quickly and easily get the bit of typing necessary over with and get back to thinking, planning and studying for the next bit of typing that's necessary. As an anecdote, I type extremely fast, but type for probably 45 minutes of the day in 30 second to 1 minute bursts every so often. In that burst, I likely create or edit a couple of functions and put in the calls to it. And then go to working on the next piece. There's rare times where it'll be a concentrated stream of typing, but that's following a large period of scrawling in a notebook.

I cannot fathom how people can find the time to actually approach any particular problem at a reasonable depth if it will take them more time to type out the solution than reading and understanding the existing code and determining how to solve the problem. Sure there's code where there's boilerplate, or add a line to a bunch of files, or tons of ways that raw typing speed doesn't play much of a benefit, but when it comes time to type, having to move your hands and look to find the { is akin to a carpenter having to read every label to find the bottle of glue.

re. your rough guess: 30 wpm is actually kind of slow, according to Wikipedia the "average computer user" types at 33 wpm. I'd expect someone who spends most of his time at the computer to do quite a bit better even if they never learned to touch-type. I thought I'd time myself copying the first two paragraphs of http://en.wikipedia.org/wiki/Words_per_minute#Alphanumeric_e... (1024 characters at the standard 5 per word = 204.8 words) and got 70 wpm! I'm a bit surprised by that myself, TBH, since I don't "properly" touch-type either--I'd probably get a significant drop if I had to type more than that though, but as you say programming goes in bursts so that's not much of an issue here.

As far as you wondering what use typing speed is to a programmer:

1) if you can type faster, it takes less effort to fix cosmetic mistakes and you do so more often. you must have noticed as well when looking over the shoulder of a slow typer they seem to make more errors? or maybe it just seems more tedious because you're waiting on it. you must have also seen that a really skilled typist can make an error and have it corrected before you hardly notice it (which is because they feel their fingers slipped).

2) in a similar sense, if you type faster, it takes less effort to quickly try something out. just type it out, maybe not even immediately test it, because as you see it on the screen you can more easily reason about it and make corrections before you do. if you type slower, you're more likely to get stuck halfway writing a block of code because you're thinking "wait this isn't right" and start doing proto premature optimization (well, that's my problem, I start thinking about what is the best/most concise/pythonic/readable way to write this code halfway, before I even got the rough structure down. I find it's almost always better to first write down something that works).

3) if you type faster you spend less time writing comments on HN and can get back to programming sooner.

People who say typing is not their bottleneck are saying they are not I/O bound but CPU bound. Makes me think what other things you need to improve before you notice your typing can't keep up? But that's kind of backwards. You will never know until you can type fast and freely, liberating your brain to actually think about the problem and code and not finding keys on the keyboard. Besides not everything you do is original and new or inventive. Sometimes you are just doing crap that you know how to do already, and typing or not using smart editor is the bottleneck. But people who can't type usually don't know this. What you don't know can't hurt you, or it can perhaps?
I thought this was a given? I am absolutely CPU bound and I don't know a single developer who isn't. Do any of you actually code (efficiently) at your maximum typing speed?

At the risk of painting with a wide brush, I am currently under the impression that any developer who sits down and cranks out code non-stop at their maximum typing rate is either :

a) cranking out a complete mess that will require extensive refactoring down the road

b) the protagonist of "Hackers" or "Swordfish"

For what it's worth, I am a reasonably fast typist (~115 wpm, qwerty) and can't even imagine myself ever coding as fast as I can type. I wouldn't mind for this to be the case, though :)

115 wpm?! o_O

Well then. Time for me to get busy on one of those touch-type-training applications, that's nearly 2x what I just did.

Indeed at that speed you're sufficiently CPU bound to make that claim.

But can you crack a 2048 bit RSA code in your head within a minute while .. you know? Plus, in the later scene when he was doing the real job, he wasn't just typing at 115wpm, he was simultaneously dancing around at at least 145bpm. So there's always room for improvement.

Us 115wpm qwerty guys aren't "reasonably fast" - we're way up there - and to be sure, the only reason I have to improve my speed is because it's a sort of hobby.... it won't help me code better. Being able to type with my left hand faster than my friends can type with both is always fun - as is constructing passwords and other shortcuts that can be done with a single hand in the blink of an eye... but that's all just fun and games.
You don't always bang out code at your max typing speed. But you do have bursts of fast code writing at times, which is extremely useful.

Also, I live in the shell and typing 200 char long one liners to do something useful and if you are a fast typist very quick too. It's great for generating on the fly reports, searches etc. This is the kind of thing that would take a slow typist a lot of time. Most of slow typists I know don't bother with these things because it takes too long. As a consequence they also get rusty with their shell foo, or never get good at it to begin with.

It may be true that we spend most of our time thinking or communicating, but doing anything creative is all about the flow. Slow typing interrupts thinking and it takes time for our brain to re-construct the "blueprint" after this interruption. For a programmer, typing is a more frequent activity than say, drinking coffee. I don't think anyone can work productively if we need to sip some coffee every 10 seconds.

I need to improve my typing speed and reduce the interruption as much as possible.

I used to think so too.But learning touch typing has made me to better document my code. I no longer fret about writing API documentation, I almost add API documentation most of the methods I write.

The blog post[1] Steve Yegge was the one that triggered me to consider touch typing seriously.

1. http://steve-yegge.blogspot.in/2008/09/programmings-dirtiest...

I completely agree. I have noticed, programmers who can't touch type write very few comments and very little documentation. Communicating with them via email sucks because they can never explain themselves properly. Just like typing is only a part of what you do when programming, programming is also only a part of what a good programmer does. Programming any sizable application is a very collaborative process, and that necessitates lots of documentation and communication, which are both very typing intensive. I hate working with developers that can't touch type, they just don't function well from a team perspective.
I'm pretty fast typist - about 50 WPM in those crazy JavaScript regexp exercises. I used to think my typing speed is just a perk, but everything changed, when I became proficient in TDD and refactoring.

Previously I've thought a lot about architecture, code, algorithms, etc. And then typed that in ~1 hour per day. However when I started doing real TDD with running tests every few dozen seconds, everything changed. Now I actualy code almost all the day - play with ideas, throw them away, implement in a multiple ways, refactor a lot. And that is a blessing when you may implement your ideas as fast as you may, so that instead of analyzing the solution, you verify it.

Other reason is I've changed my approach to application architecture. Previously I've used the standard PHP/Ruby/JS frameworks and fit my code into predefined places, generated scaffolds, etc. However then I started applying DDD, PoEAA and similar ideas. All the advanced design principles require a lot of boilerplate code - a lot of mappers, DTO transformers, domain classes, view models, etc. So I actually need to type ~3 times more code than before.

And then I've started using VIM. You better not make typos when using VIM - crazy staff happens and it breaks the flow.

I agree that we're not typist in the sense that basketball players are not dribblers.
You think typing skills are as essential to being a productive, and by productive I mean creating wealth and value, not lines of code, a productive developer as dribbling is to being a good basketball player?
A programmer, by practicing his trade diligently, will in high likelihood grow in his typing proficiency and become faster, especially if he is spending much of his time developing. Also, writing specs and comments take a lot of text as well.
Time is money.
Yes, but adding code creates negative value.