Programming's Dirtiest Little Secret
steve-yegge.blogspot.com
steve-yegge.blogspot.com
I'm sure he had something else important to say.
Maybe?
"You'd be absolutely astonishedly flabbergasted at how many programmers don't know how to READ. I'm dead serious. You can learn to speed read even faster than you can learn to type, and yet there are tons of programmers out there who are unable to even skim this blog. They try, but unlike speed readers, these folks don't actually pick up the content."
Heck, I'm one of 'em!
I second (or third now!) that I don't like the meaningless words. Makes it much harder to type them I reckon, and some of the words seem to be real words, but with missing letters, so you find yourself typing the real word, which is wrong!!
Best $10 I ever spent.
Because I learned to type this way I have rather unconventional / poor form. My hands rarely center properly on the home row, I tend to use my middle fingers for the upper inside letters, and I don't always use the same fingers for the same keys (I type the first "e" in "letters" with my middle finger and the second with the proper finger).
One other positive side effect of that keyboard while I was exploring UNIX was that there was no value in looking at punctuation either, so I learned to touch type all punctuation, not just the secretary subset, at the same time.
When I switched dvorak I figured I might as well do it right. As a side effect, my hands no longer hurt like they did with qwerty...
I'm tempted to email him just to find out what Steve Yegge's idea of a "really short" email is.
Edit: why is learning to type a dirty little secret?
I'm skeptical, since far more development time is spent thinking about what to do than in banging out text to implement it.
And maybe some faster typists just emit more bad, buggy code.
If it's a "lines of code" contest, then sure, learn to type fast, but if it's about producing good concise code I don't think typing speed makes much difference. If you want to program enough, you'll naturally become fast enough.
In my experience, good, concise code is rarely written on the first pass. Also (and unfortunately), more often than not people who don't type well are unwilling to spend time on rewrites...
No, you just think faster than you can type - but liberal use of macros, snippets, syntax-directed editing, code completion, etc. can help.
I'm more like an oil-painter. I have to put something on canvas to think. Always typing small expressions into REPL to see where they take me. Writing down a function from top of my head and see if it looks right---I mean, not only logically, but also whether it feels natural and straightforward on screen. Emacs is an extension of my brain. If I have to type slowly, it really gets in my way. If some bad setting on driver or some slow connection to a remote machine puts a delay in the response of keypress, it drives me crazy. I couldn't stand if my own fingers are the cause of the delay.
(BTW, the original article claims "Slow-typist => Bad-programmer". Saying some fast-typist write bad code has nothing to do with the claim. You have to show a good programmer who types slow to refute it.)
This is interesting. What level of detail do they go into? Most people should be able to do this at a simple level. The fastest example is probably a wrapper function: you probably know 100% what you intend to type before hitting the first key.
If you are making a bigger function that has intermediate variables, naming the variables properly becomes an exercise in itself. When these programmers do a "code dump" from their brains to the keyboard, are all the variables named already? Do they use placeholder names then replace them? Do they first write the algorithmic parts then do the naming?
But hey, don't let that get in the way of smug superiority.
I bet you'd be faster if you didn't need to.
(At least, to the degree that keyboarding skills would make a measurable difference. I'm not arguing that it's ok to spend all week building a single function.)
Image if you had to stop and think to use the mouse.
Besides, I don't really think about kicking a soccer ball, but I certainly look at it when I do.
I really don't think it makes that much of a difference, as long as you're not hunt-and-peck.
Incidentally, my speed now is about 55 WPM because the T and M keys on my lapop are broken and often don't regiser. You can lose more with bad hardware than you gain wih good training.
This is especially true with Lisp - you compact it down like one of those trash compactors.
[folklore.org]
Interestingly, I can type the symbols on the numbers just fine. (hello "world"). $here @are &some #sigils!
But this isn't just about programmers, you can see it in the movements of any expert.
Systems administrators know how to move around directories with minimal keystrokes - the characters seem to just fly by the screen. I know I'm in the presence of a good one when this happens.
A former colleague of mine proved that he'd spent many years in the trenches as a consultant through his mind-blowing ability to do excel. Any shortcut, he knew. He could set up a pivot table, create a LUT, denormalize data, simulate a query, set up scrolling, and automate charts in, like, 4 minutes. I could do this, but I'd have to hunt around the help, and it would take me a long time.
Good tennis racket stringers chat with you while they instinctively weave the crosses through the mains with a slight waving pattern that reduces friction and extends the life of the string job. They use the clamps and tensioner without really looking at it. I have my own machine and I can string a racket fine, but it takes me an hour and requires my full, fumbling focus - I certainly can't multi-task.
When a Judo expert falls backwards he/she just sort of rolls through it. No thought is necessary.
It goes on and on. Programmers type fast without thinking about it. It's one of the things they are simply able to do as the result of programming. I'm not saying it's critical, but it would be really odd to get good at programming without making this skill inate.
By looking at the keyboard, you're relying on vision to direct motor actions and detect errors (fingers in wrong positions, etc.). This requires the involvement of association cortex in, I believe, the parietal lobe, to integrate vision, somatosensory (i.e, touch), proprioception (i.e, body position) stimuli. The end result is that typing speed is limited by the processing speed of the cortex.
On the contrary, pure touch typing does not involve vision. Somatosensation and proprioception can be integrated in the hindbrain and spinal cord, and so touch typing can be done almost exclusively there, with only goal-oriented, "type this word" input from the cortex. Vision comes in later to detect errors, but because it is not in the loop, touch typing is not limited by it.
I type by mainly using two fingers, with occasional pinkie and middle finger use. I also use my thumbs for the spacebar sometimes.
If you define "touch typing" as not having to look at the keyboard, then I guess I do touch type and I apologize to the author. I was mostly taking offense to the idea that there is only one correct way to type.
Primarily only using the index fingers, thumbs for shift keys, spaces and sometimes the other fingers will hit keys in the farthest reaches, depending on what the index fingers are doing.
It's kinda neat-- I discovered I type different words differently. For example, if I type "provide" my left hand index finger hits the "v", but in "forever", my right hand index finger does. Not a beat skipped-- they just do it.
I think typing with fewer fingers does put a maximum on my typing speed, but I'm perfectly comfortable with ~100 wpm.
This site says I type about 93wpm at top speed: http://www.typeonline.co.uk/typingspeed.php
I switched to the Dvorak keyboard layout about two years ago. Same speed, but it feels better -- much more time on the home row, for one thing. I think it's worth trying if you're interested, but it's your life. ABCD (http://www.gigliwood.com/abcd/abcd.html) was helpful (and funny). Just dive in, give it a month or so of normal typing. The first few days will be disorienting -- very old habits are being disrupted. (Also, you can switch back and forth once you're accustomed to it, but doing so initially will probably make learning much harder.)
It works quite well with Emacs, but hjkl navigation in vi becomes a bit awkward. (I tend to use Emacs on my own computers and vi on others' Qwerty-default systems, FWIW.)
Plus he's not talking about "average."
I think most "kids" today can type pretty well because it's essential for IM-ing. I know that's how I learned to type quickly. Older people might not do much real-time communication, so they might not know how slow their ad-hoc typing is.
The only time I've managed to make a significant boost was when I bought a Das Keyboard. Not having any labels on my keys means I have learned to absolutely never peak at the keyboard. It's improved my speed overall, but especially with the number row.
I have known a lot of programmers who don't type fast. I don't think it's a massive impediment, but I do think there's a strong correlation between bad programming and lack of typing ability.
I don't think any of the people I personally know and consider uber programmers type really badly. Certainly could be though and I just haven't noticed.
What an elective? Mine was compulsory complete with manual typewriters and battle-axe teacher. One thing I do miss about those old clunkers was the solid feel the keys had. You had to learn to position your index fingers at 'F' and 'J' remember where each key was positioned and hit hard. So letters like 'P' and 'q' required a greater force than say 'v' or 'n' (because my index fingers are stronger than pinkies). Keyboards these days have no resistance so typing fast leads to random hits.
What's the most solid keyboard you have used?
I haven't used it in years, since I now use laptops exclusively. I can't bear to get rid of it, though.
My last IBM model died. The Selectric model was good. Big & heavy I used these in undergrad for creating camera ready artwork. Are the laptop keyboards you use any good?
The old DEC VT220 dumb terminal had a nice feel, too, though nothing like the Northgate or Selectric.
My favorite keyboard of all time is: http://www.old-computers.com/museum/photos/Apple_IIgs_Keyboa...
Its keys are wonderfully weighted, tactile without being obnoxiously loud, but it's not really practical these days as it doesn't have F keys and the ins/del/home/end/pgup/pgdn set, and the arrows aren't in inverted-T form, which is annoying.
Otherwise I prefer laptop keyboards (50/50 between Dell's current-ish stuff and the traditional ThinkPad design). I'm more than happy to be more gentle in order to extend the life of my fingers and wrists.
I'm pretty tempted to look at Apple kb's next time my MS bendy board lucks out.
"... I prefer laptop keyboards (50/50 between Dell's current-ish stuff and the traditional ThinkPad design). ..."
What is about laptop kb's that's better?
This of course assumes that all else is equal (good ergonomic fit, sitting properly, etc. I am not a doctor or ergo councilor, so your mileage may vary.
http://pfuca-store.stores.yahoo.net/haphackeylit1.html
Previously they also carried a "professional" model which featured blank keys. Not only was it "l33t", but it was supposed to improve your speed by forcing you to learn to touch type which of course is required for late night hacking sessions in the dark.
Finally, there is the classic carpal tunnel inducing IBM keyboard:
That is pretty sad. While I can touch-type, typing accuracy at night decreases not because I can't find 'F' & 'H'. Must be murder with long passwords.
Regarding passwords, for the past 10 years I've chosen passwords based on "shape." It is a trick I learned from a sysadmin friend, and know more than a couple other sysadmin guys who do the same. It can suck when you switch to a keyboard on a mobile device and the keys aren't where you think they are going to be.
http://www.freetypinggame.net/ http://thepiratebay.org/torrent/3552142/Typing_of_the_Dead
All that being said, I think he could type even faster if he just bit the bullet and learned to touch type. This is why Steve is right. You might be a pretty fast typer already, but you can probably be a lot faster using all your fingers instead of just two.
I know, I can hear the complaints about the lack of good libraries...
Even when I was in high school (back pre 1992) we learned by having a tea-towel over our hands and having to type without looking.
You first try to implement your idea as quickly as possible, stopping to think only when necessary. The goal is to not spend too much time overthinking the implementation -- you want to find out if your idea is worth executing on.
If you decide that your idea isn't worth it, then you move on to your next one. Otherwise you take it slow, going back over your code and refactoring it. (I personally don't believe in "make one to throw away", but rather that it's possible to refactor an ugly design into a succinct one.) At this stage, you should meditate on the best way to accomplish your engineering goals. It will pay off in the long run to spend extra time here.
Then comes the final stage in your project's lifecycle: medium. The core structure of the design has solidified, and you need to add the flourishes that make software truly great. But you have to take your time to ensure that the codebase stays clean. At this point, the design of the various smaller subsystems should flow naturally from the architecture you decided on in the "slow" phase.
Repeat for each core feature.
I just recently started writing software >40 hours a week, and have been constantly torn between "getting things done" and "doing things right". The best way to program well might very well be a variation between the two modes.
1. Make it work. 2. Make it right. 3. Make it fast. 4. Make it small.
#1 first, then if you have the need, #2. If you have a need, #3. If you have the need, #4.
It's a lot easier to make it right once you've made it work.
1. Sometimes, making it work is enough. (one time code and such) There's no reason, other than for practice, to waste time designing such cases.
2. You may find out that you're solving the wrong problem, and it's much easier to justify throwing out code that you didn't labor over an extensible design, etc. It's much harder to throw away wrong code that you've put work into the internal design.
3. This doesn't mean that you don't design the outward facing interfaces correctly. Thus, you have a good set of unit tests already set up, and you can quickly tell if something is working as you refactor. You have a good baseline with which to compare.
When I'm writing Java code, I find that my typing speed is often a bottleneck. In Ocaml or Lisp, it never is.
—Philip Greenspun, http://blogs.law.harvard.edu/philg/2005/03/07/how-long-is-th...
If I understand you correctly, yes, typing "select ... from ... where id = ..." would get old very fast.
Of course, if you are constantly writing 8-way joins with fun things like group_concat in the select clause, I guess it would require a little more thought than typing. Also, I'd imagine the people that spend their days writing stored procedures, triggers, and the like spend more time thinking than typing, but I can't claim to be one of those people.
In Ruby, it seems I think and type in equal parts.
I could try to train myself to keep my feet in one spot. But I fear the ergonomic consequences. I have enough trouble with the need to keep my hands in the same spot for hours on end...
Maybe I need much bigger pedals. Or special shoes...
I ask because my sister had this neat idea for a hardware hack: a digital music stand. The idea being that page turns really suck when you play any instrument that takes two hands (we're both violinists), and if you could hook it up to a foot pedal, you could control the music without putting down your instrument. I also pointed out that a digital music stand would cost at least as much as a computer, but now that you can get laptops for $98, this may be doable...
Plus, think of all the people on YouTube that you see lean over to stop recording. If it doesn't already exist, software to control a webcam through a foot pedal would be a great boon to YouTubers everywhere. The porn industry would love it too - that bra unclasp is so much sexier when she's not blatantly fiddling with her webcam.
http://www.kinesis-ergo.com/foot.htm
There are a number of midi/usb pedalboards, but they have tons of pedals and are relatively expensive.
There are also a lot of DIY footswitch projects. Check this one out, it is for turning pages inside digital music stand software. :)
http://www.instructables.com/id/USB-Foot-Pedal/
Also, I used to be in orchestras. A Kindle for sheet music would be neat. Especially if it had built in metronome and tuner for practicing. Might take away some of the old-school ambiance though.
I can't wait to see how his argument holds up once we have brain to computer interfaces that allow us to skip typing altogether.
As he says in the article, the actual programming is not what requires much typing. It's communicating with others on IRC (or e-mail, whatever you kids use these days), typing documentation, writing blog posts, etc. that require typing skills.
I will agree with him on this. I don't type much when actually programming, but I do type a lot when talking with people on IRC (including co-workers, since we all work from home) and writing documentation. And writing HN comments :)
IRC, email, are secondary in importance.
Documentation and code comments should be concise.
"succinctness = power"
Does this sound familiar to anyone?