Practice
Code typing practice
Typing code is not like typing prose: there are brackets, quotes, symbols and new lines everywhere. Pick a language and type a short snippet from start to finish.
Click here and start typing
How it works
Each snippet is a few lines of ordinary code. Press Enter where you see the return arrow. When you do, the indentation on the next line is filled in for you, so you only type the characters themselves, the way a code editor would let you.
Programmers spend a surprising amount of time on punctuation: curly braces, square brackets, quotes, semicolons and operators. Practising those keys in real code is a quicker way to make them automatic than any list of random symbols.
There is no timer here; the test ends when you finish the snippet and your speed is worked out from that. Accuracy counts the same as anywhere else, and a wrong character stays wrong until you backspace and fix it.
Tips
- Press Enter at every return arrow; indentation is added for you.
- Learn the position of ( ) [ ] { } < > on your keyboard; they are a long reach for most people.
- Type slowly at first. A single wrong quote is easy to miss.
- Try different languages. SQL and CSS use lots of punctuation, Python uses a lot of whitespace.
Read the guideHow to type faster: habits that actually work6 min read
Common questions
Do I need to type the indentation?
No. After you press Enter, the spaces at the start of the next line are added for you. In real life, your editor does the same.
Why does code feel so slow compared with words?
Because symbols are rarer than letters, so your fingers have had less practice. A code speed of half your word speed is perfectly normal at the start.
Are these real programs?
They are short, simple examples written for practice, not copied from anywhere. They are close to what you would meet on day one of learning each language.
Does this teach me to program?
No, it only practises typing. It will help you type code faster once you have something to say.
You might also like
- Touch Typing LessonsSeven short lessons from the home row up, with an on-screen keyboard that lights the next key.
- WPM CalculatorWork out your gross and net words per minute from how much you typed, how long it took and how many mistakes.
- Keyboard TesterPress any key to see it light up, with its name and code. Find dead keys and check a new keyboard.
Want a quick speed check? Take the typing test, or read what a good typing speed is.