That's ridiculous. Good programmers work out how to type less using the power of their mind. If you can type exceedingly fast, where is the incentive to produce better more concise maintainable code?
Learning to type fast before programming could be a big mistake IMHO.
Also, if you love programming, you practice... and the more you practice, the faster you get.
Typing is just the current method most people use to pass data from ourselves to computers. Programming will continue to exist once we have moved on from using keyboards.
If you can type exceedingly fast, where is the incentive to produce better more concise maintainable code?
You don't strive for concise code because it takes less time to type. You strive for it because it's easier to read.
The reason you have to be able to type quickly is that, while your final result may be concise, you may have to type parts of your code several times as you revise it down to that final form. Then you have to type the documentation, the emails to the rest of the team, the blog posts describing your work. Then the specs will change, or your ambition will grow, and you will type some more.
Programming will continue to exist once we have moved on from using keyboards.
I don't see why this would happen. Except for those who are unfortunate enough to sustain a typing injury, keyboards are better than the alternatives. Have you ever tried dictating Perl code to someone? As if reading /^foo+([bB]a+r)$/ wasn't hard enough -- trying to pronounce it is like torture. Are you capable of writing 82 WPM longhand? I certainly can't. Maybe if my notepad had autocompletion, but even then I'm dubious. Keyboards have autocompletion, too, and they have it right now.
Maybe someday we'll perfect the mindreading interface which rearranges text based on pure thought, but until then I suspect that keyboards will always be the first choice. Which is not to say that I'd turn down a notepad that could flawlessly read my writing. The problem with typing 82 WPM is that it's hard to do it all day. I'd be willing to switch back and forth to longhand just for the ability to write digital text while I'm taking a break from the keyboard.
You can't foresee any time in the future of the universe when we will stop using keyboards to transfer data from ourselves to machines?
Before the advent of the typewriter, I'm sure there was a similar argument for Authors - that they must learn to write quickly and neatly with pens. Good advice in the day, but an Author is still an Author, whether they use a pen or a typewriter.
"The future of the universe"? Who can predict that? Let's stick with "in the working lifetime of anybody reading this".
And "transfer data from ourselves to machines" is far too general as well. We're talking about programming, right? In the future -- in the present, really -- we're all going to use cameras and mics and touchpads and accelerometers and (god help us) mobile-phone keyboards for most of our human-computer interaction... but for writing software? Am I going to write software by doing an interpretive dance?
(Actually, that would be kind of fun. And it might be great to have a system that can, say, watch a human move some stuff around on a monitor and then mimic the moves N times using a robot. But we're not going to write Javascript interpreters with dancing. Some tasks require precise specification.)
So, yeah. I don't see it. I'm still a believer in precisely formatted plain text, and keyboarding is a great way to create that. Although I'm really looking forward to using the table-sized multi-touch handwriting-aware Minority Report megadisplay of the future, I'm not confident that writing code is one of the things I'll do with it. Can anybody from (e.g.) the Media Lab, or another place where they have such displays today, point me to a substantial piece of software that they've written using handwriting recognition, or voice recognition, or intelligent circles-and-arrows recognition? That might help me to transcend my blind spot. But it seems like, when they sit down to code, the smart folks all use emacs or vi.
Obviously, just because I don't see it coming doesn't mean it won't happen. You're right: Most of the folks born before the typewriter became practical didn't foresee the typewriter. They just got really good at using pens.
So what about an adapting morphing keyboard that presents options applicable to what you're doing?
For example, you could start up an editor, be writing javascript, and the keyboard would know what is and isn't valid, and give you the options...
Does anyone remember the ZX Spectrum keyboard? "For" was on the F key, "Next" was on the N key - made for pretty fast typing once you got used to it.
I agree, formatted text seems the best method for programming, and keyboards are the best we have at the moment, but I'd expect there to be some surprises in our lifetime. I don't expect to be writing code using a keyboard in 50 years time.
"For" was on the F key, "Next" was on the N key - made for pretty fast typing once you got used to it.
Okay, I've been trying to control my inner lecturer but now I'm just going to come out and say it: You need to learn emacs. The features you're describing have been built into my text editor for years, and they could be yours today!
(Cue the dancing girls and the fabulous music!)
The emacs term for a feature that turns a key sequence like "f <TAB>" into "for" is snippets. Check out this screencast demo of the YASnippets package:
I don't really use snippets myself (although the screencast might inspire me to try again). I find that autocompleting "for" is not very interesting, because I can type it really fast. What I do use all the time is hippie-expand:
I have that bound to a special key of my own, so that I can continue to use TAB for other purposes like intelligent code indenting. With hippie-expand I rarely type the same symbol name twice. The first time it's "drupal_set_message", but after that it's just "dru" followed by one to five keypresses to scroll through the options.
The other thing I'm just bursting to say is: you need to learn to type. Touch typists do not care about key caps that change their labels. We don't look at the keys. I can't type 80 WPM while looking at the keys. I've met typists who type Dvorak on QWERTY keyboards, for whom looking at the keys would break their typing. My own keyboard has an "End" key that's actually Escape, an Escape key that's actually Caps Lock, a Page Down key that functions as Page Up if you hold down shift, Page Up and Home keys that are actually Option... (Hint: http://www.kinesis-ergo.com/advantage_pro.htm).
hehe even after advocating "macro"/"tab completion" etc type programming, personally I'm not sure I could do it. I remember doing it fine on the ZX Spectrum, but those were "learning to program" days. Now I want full power, and that means the computer listening to exactly what I type - If I type "f, tab" I want it to show "f, tab"... auto completion would completely get in my way and irritate the hell out of me.
I don't look at the keyboard either. I was meaning more that instead of a qwerty keyboard, the keyboard would change shape/configuration to show macros, which you could configure and remember when they appear etc - you would still not look at the keyboard, but it'd just make things a bit more obvious rather than have special emacs key sequences etc.
"Maybe someday we'll perfect the mindreading interface which rearranges text based on pure thought"
So, the post you reply to does foresee a future without keyboards.
What intermediate stage do you see between keyboards and mind reading? As pointed out, handwriting and speaking code have significant drawbacks over the keyboard.
Maybe some sort of OLED keyboard which predicts what you're going to write and presents the logical options for you in obvious places?
For example if you're writing java, there's only a small number of valid syntaxes you could start with, so the 'morphing keyboard' could just present those, then present the next options etc.
As you got more used to it, you'd know what it was going to 'morph' to, so would probably be able to go pretty fast.
I don't know what might work well though. I'm just saying the keyboard is not the ultimate input method, I'm sure we'll see a whole raft of changes before we get to mind reading.
Interestingly, one of the developers on the Lua mailing list uses Lua in part because he is functionally blind, and the pronunciation of Lua code is unusually human-friendly. This makes both voice synthesis and dictation easier. There have actually been changes to several Lua projects to make the code itself more accessible to the blind, instead of just the end application.
As a fast typist using emacs, code simply flows from my brain to the compiler. I think it, things compile, I see the results. My conscious brain is 100% focused on my code, it's almost like a direct brain <-> computer connection.
Lately I've suffered from RSI. The pain is no biggie, but it forces me to consciously focus on typing. When this occurs, I lose the (almost) direct direct brain <-> computer connection. The fact that 15% of my brain is focused on typing without pain lowers my productivity significantly.
Dude, take the pain seriously -- if you don't, you might find that connection totally severed! And I'm speaking from personal experience. If you think you have it bad now, try dictating your code using voice recognition. You don't want to end up there, trust me, so doing whatever is necessary right now is a good investment in future productivity.
Maybe I'm doing something wrong. The bottleneck for me has never been typing speed (Even when using idiotically verbose java), and I'm probably an average speed typist.
It's not a matter of speed being a bottleneck, it's a matter of context switching. Switching context makes me lose focus.
Fast, unconscious typing: Code -> program results -> code -> program results -> woohoo, it works!
Thinking about typing: Code -> typing -> program results -> code -> typing -> "Mmm, pad thai, so yummy." -> "Where was I?" -> code -> program results -> code -> typing -> "I don't know her name, but I think I'm in love with record store girl." -> "where was I?" -> "She has the nicest smile when I buy music she likes."
It's not ridiculous at all. You may spend very little time actually typing in code, but most developers spend a lot of time typing things like API documentation, design proposals, e-mails, IMs, etc. The slow typists tend to write inadequate documentation and not exchange enough written communications with their colleagues.
Keyboards will continue to be the primary means for entering code and English text for quite a few more years. So it's rather silly to put off learning touch typing now while waiting for practical speech recognition or some kind of BMI to show up.
Which wouldn't be a problem if you had infinite hours to do everything. If you are spending two hours a day doing that stuff instead of one hour because you type slow, that's one less hour that you could be coding, or learning, or whatever.
I disagree. Writing and coding are much the same. I interpret the replies to this as saying you should hurry through this stuff. Just shovel the crap out.
Well, if it's not worth writing with some care then it's not worth writing at all. If it's worth writing with care, then your typing speed is not going to be the relevant bottleneck, unless we're talking about a hunt and peck typist.
I take it as given that anything one writes, whether code or English, should be read and edited three times before moving on. 80 wpm vs 50 wpm ain't gonna matter if you're doing this.
> developers spend a lot of time typing things like API documentation, design proposals, e-mails, IMs, etc.
Here's what I've noticed about fast typists: They produce large volumes of hurried and poorly worded and edited crap. Yegge, my current boss, and one of my co-workers fit this mold. They type very fast, and I frequently have no idea what their writing is about, or am annoyed with the excess verbiage.
The best writing is re-writing. The best coding is refactoring. In both coding and writing the bottleneck is going through what you've written two or three times and making the necessary edits and stopping to think. First pass typing speed is absolutely not the bottleneck to producing anything of quality. If you want to churn out unreadable or unmaintainable crap, belting out functions at 90 wpm and then moving right on is a good way to go.
That's so very true. I can and do type quickly, but I usually find myself typing in small bursts of words and single lines of code (discrete thoughts), not bursts of sentences or methods. An involved one-paragraph email for me entails composition, proofreading, revision, proofreading, revision, and so on...typing doesn't take the majority of my time by any means. The same goes for the majority of my comments on websites such as this one.
It's not a matter of habit, I just always find ways to better express myself when I take my time and correct those "problem spots," be they in code, email, or other correspondence. It's not that I doubt my skill as a writer, but rather, I owe it to my reader to be thoughtful and patient, just as I hope they will upon receipt.
The only thing I need to prevent is overuse of "etc." It's a tempting habit and lazy, imprecise, etc. When one uses "etc," they leave it to the reader to complete their thought, which is weak and clumsy.
Also, if you love programming, you practice... and the more you practice, the faster you get.
Typing is just the current method most people use to pass data from ourselves to computers. Programming will continue to exist once we have moved on from using keyboards.