Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This question already has an answer here:

I took a test recently and found that I could touch type comfortably at around 100 wpm... and if given some sort of autocorrect/intellisense then that would be even faster (who knows maybe 150 wpm?)...

I definitely do not program anywhere near that speed... This led me to wonder how exactly does one become faster at programming? Once I look at a problem and design the algorithm to solve it (the problem is solved... I know what i'm going after give or take some debug runs) why does it take so much longer for me to actually type up the program? What I found was that in general when I'm coding, until I am done typing a word... even if it is just the letter a or number 1, I cannot simultaneously think and type. What that means is that I can come up with stuff as I'm typing but I don't have the ability to look ahead. Its either one or the other... For example in writing this, I might have a feel for where this goes, but until my fingers hit the keyboard, I don't really know what I'm going to say next.

How do I change this? How do I get the ability to think ahead while typing so that I can take advantage of my typing speed?

Also just in general how does one become a faster problem solver? I know the usual list of practice (which I have no problem with) but is there any particular excercise one should emphasize to train their mind? For example is playing various logic games (sudoku etc...) carry much help in improving your sense of logic in other areas of programming?

Sorry its a bunch of questions at once but they are all sort of related...

P.S. Is it possible to use a stenograph to program? I've heard that users of stenographs can achieve blistering speeds like 200 - 300 wpm. Assuming I can somehow think faster... that would be pretty cool.

Obviously fast programming != good programming. But if your always training to become a better programmer, it doesn't hurt to be able to do it fast.

share|improve this question
49  
So much of what I do is thinking about how to solve a problem and how to design the code, that typing speed is never a bottleneck. –  Oded Jun 14 '13 at 13:36
2  
Duplicate of How important is the ability to touch-type? –  Dan Pichelman Jun 14 '13 at 13:38
6  
@DanPichelman Not a dupe, he's asking how to do it not how important it is. –  Dynamic Jun 14 '13 at 13:43
5  
we discussed it several times, look around for dupe threads. typing speed is mostly irrelevant wrt programming speed, and no one besides Chuck Norris will hell out working code at 100 wpm –  Balog Pal Jun 14 '13 at 13:43
8  
I type approximately 100wpm, but that's only relevant when I'm transposing direct text. Even typing this comment I'm going much slower because I have to let my thoughts formulate before they can move through my fingers. Coding is even slower than that. Even with a terrific road map of code ready to go it's never going to be that fast. I'd say if you're coding at 100wpm then you're doing something terribly terribly wrong. –  Joel Etherton Jun 14 '13 at 13:56
show 11 more comments

marked as duplicate by Dan Pichelman, gnat, Justin Cave, Jalayn, MichaelT Jun 14 '13 at 23:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5 Answers

up vote 3 down vote accepted

Some very pessimistic answers here. I can speak from personal experience that it is absolutely possible to touch-type programming. But that's not really the issue, right? I mean you're REALLY asking "how can I be a more productive programmer?" Let's take a look at some of the factors:

  1. How verbose the language is. I'm a java programmer and I can easily type at maximum speed doing things like making getter and setter methods on a POJO. But some languages don't even require the creation of these boilerplate methods. And Eclipse has tools for autogenerating these. In Python you can accomplish in a single line which takes Java ten lines. So typing slowly in Python is just as efficient at typing quickly in Java?

  2. How well you planned ahead. If you start working on something with vague intentions, you will be spending more time thinking instead of writing. If you have a good understanding of what code is already existing and you know exactly how to approach your solution, then you can expect to get things done more quickly. BUT you're still spending extra time planning ahead. So is the total amount of time spent equal? Different people work better with different styles. Some people prefer to jump straight into the fire and fight their way through.

  3. How distracted or focused you are. Some people think it's a good idea to listen to music to tone out their environment. Some people like peace and quiet, and some people actually enjoy a noisy environment. I personally think that meditation is THE KEY to getting good focus. Most people don't realize how little control they have over their mind. Twenty minutes of meditation every day can make an incredible difference in your clarity of mind, translating to hightened productivity.

  4. How healthy you are. The health of your brain is directly related to the health of your body. Avoid smoking, consuming alcohol or caffeine, eating heavy or unhealthy food, taking unnecessary medications, etc. Get the right amount of sleep each night, which is different for every person. You'll be amazed at the difference this makes.

  5. How much stress you're under, how long you've been working, how many babies are crying in the background, etc, etc, etc... There are too many factors to list here. It's worth mentioning again that meditation can help with these things. Your mind is a beast and if you don't tame it then it controls you, instead of you controlling it.

Happy coding!

share|improve this answer
add comment

You're never going to be able to solve new problems as fast as you can type. Just accept that. It might work for simple problems you've already done 1000 times.

But there is still value in typing skills. Muscle memory typing allows you to keep your mind in the problem, not on the keyboard. Your mind stays in the zone and the keyboard is just a natural extension. It's not about speed, it's about fluidity. If you can effortlessly type your thoughts, your mind can stay in a deep thinking zone while you try things out.

I dedicated some time to learn all special characters and numbers by heart. It's worth it.

share|improve this answer
    
I think it's more about training your brain a specific kind of multitasking. Typing is just a mechanical skill. Programming is a reasoning skill. If you can train your brain to do the two at once, then you may increase your coding speed. Practicing music helps this quite a bit. –  MetaFight Jun 14 '13 at 15:50
2  
I see the point about music. But playing music is a mechanical skill too. You are "executing" pre-made music like a mindless computer program, not creating it. In fact there are programs which literally read and play music in an automated thoughtless fashion. Programming is like composing music, not playing it. Free-styling may be the closest thing but even then your mind will unconsciously fall back on known musical patterns. –  mike30 Jun 14 '13 at 16:32
2  
I have to disagree. The closest software analogue to Musical Composition, in my mind, is Software Design. There's is a lot of on-the-fly work in musical performance. Mainly, conveying your musical interpretation of the piece. –  MetaFight Jun 14 '13 at 16:35
    
There may be a bug in stack-exchange. It posts my comment before I'm finished typing it! I saw your reply immediately after I submitted my comment. –  mike30 Jun 14 '13 at 16:38
    
@mike30 In comments, hitting "enter" is a submit. I made the same mistake quite often early on. –  Izkata Jun 14 '13 at 18:12
add comment

It's just a limitation of the human brain. If people could think creatively as fast as they can type, they could crank out an average novel in two work days. The main benefit of fast, reflexive typing for a programmer is that it gives you more time to think, and shorter interruptions.

As far as practicing your ability to think ahead while you type, it might be beneficial to take up a musical instrument. Music has strict real-time deadlines for every note, and it's impossible to play correctly without reading at least one note ahead, or more, depending on how complex the music and the instrument is.

Aside from that, all you can really do is practice.

share|improve this answer
    
This is exactly what I was going to add! Thanks for beating me to the punch :) Practicing a musical instrument helps you train the brain to perform a pseudo-automated task (mechanically operating your instrument) while simultaneously reading ahead, remember performance notes, and applying on-the-fly reasoning (for example, you may have accidentally played the previous passage louder than expected... so you may want to make the next passage's performance slightly louder or softer so that the overall musical idea still makes sense). It's a wonderful mental exercise. (see continuation) –  MetaFight Jun 14 '13 at 15:47
    
I've always thought musicians would make great software developers and scientists for these reasons. Their brain is especially well trained at multitasking. –  MetaFight Jun 14 '13 at 15:48
add comment

Practice

  • If you want to improve your coding speed, code more often. Give yourself a small problem and see how fast you can code it. Project Euler has some short problems that would be good to check out. Don't you know your ABC's?
  • If you want to improve your problem-solving speed, solve more problems. Again, give yourself a problem and see how fast you can figure it out. The catch? Don't code it. Don't worry about syntax or anything like that. Just write out some ideas and try to figure out how to solve it as fast as you can.

This isn't something that is done easily or quickly. Becoming a good, fast programmer takes years of experience and as Mike30 said, you probably will never be able to type as fast as you think. Although, you can get pretty close, so whip out your favorite text editor and start programming.

share|improve this answer
5  
I agree with your answer, but with the caveat that "being a good, fast programmer" is about solving problems fast, not typing fast. Typing is simply not the bottleneck for anything but the most trivial problems. –  Andres F. Jun 14 '13 at 13:44
    
@AndresF. You're correct, but the two are somewhat related (if you can solve the problem quicker you can start typing quicker). –  Dynamic Jun 14 '13 at 13:45
1  
@AndresF. solve problem quicker start typing sooner –  Pieter B Jun 14 '13 at 13:54
add comment

Bottom Line - You Can't So Don't Try

Syntax is not the same as "The lazy black dog jumped over the fence chasing a brown fox". You are comparing apples and oranges. Programming doesn't take place at the keyboard. Programming takes place at whiteboards, in discussions around the table, on napkins over lunch with a friend.

Most of the time you will spend as a programmer will be modifying code that has already been written and needs to have it's functionality extended. Typing speed is not a factor with regard to this type of work.

INHO, you'd be better off and more valuable as an employee if you spent your time learning how to translate "geek speak" to non geeks.

For example: How would you describe a database to a non technical person?

Answer:
(seloh eibbuc otni ffuts tup uoy stel taht loot a si esabatad A)

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.