C++ typing practice
C++ typing practice drills the characters that make the language dense: the semicolon closing
almost every statement, braces around every block, :: between a namespace and what
it holds, angle brackets in templates, and the & and * of
references and pointers. Most of them are shifted keys reached by the little fingers.
Just start typing. Errors are marked and cannot be backspaced — accuracy first.
The semicolon is the one symbol already under a home finger
Start with the good news, because there is exactly one piece of it. The semicolon sits on the right little finger's home key. It requires no reach, no Shift and no hand movement at all, and it is the character C++ asks for more often than any other punctuation mark, since nearly every statement, every member declaration and every class definition ends in one.
Self-taught typists still glance down for it, because punctuation is the part of the keyboard almost nobody learned by feel. If you touch type the letters but hunt for the semicolon, you are looking away from the screen once per line, which is the single cheapest habit to fix in the entire language. It is the same finger already resting on the key.
Braces are the hardest reach on the board, and every block needs two
The opening brace is Shift plus the left square bracket: the right little finger travelling up and outward past the top row, to a key that is already at the outer edge of the board, while the left hand holds Shift. The closing brace is one key further out again. This portfolio's own lesson path flags the up-and-out little finger reach as one of the two hardest movements in touch typing, and C++ wants a matched pair of them around every function body, every class, every namespace, every loop and every conditional.
Because the reach is long, the whole hand tends to travel with it, and that is where the real cost appears. The brace itself lands fine; the next three characters are typed from a hand that no longer has its fingers over the home row. Watch for errors clustering immediately after an opening brace rather than on it, which is the signature of a hand that moved when only a finger should have.
The scope operator is a doubled little finger press with no anchor
:: is the colon typed twice, so it is Shift held while the right little finger
strikes its home key in quick succession. Then consider what real C++ does with it.
std::vector<std::string>::iterator asks for that pattern three separate
times inside one type name, and std::cout appears in essentially every program a
learner writes.
What makes it awkward is that the left hand is doing nothing but holding Shift while the right little finger works alone, so there is no alternation to fall back on. Typing is fastest when hands alternate; a doubled press on the weakest finger of one hand is the opposite of that. It is slow for real biomechanical reasons, and the fix is rhythm rather than force.
Templates turn the comma and the period into brackets
The angle brackets are Shift plus comma and Shift plus period, which puts them on the left middle and left ring fingers on the bottom row. So a template instantiation hands the work back and forth in a way nothing in prose does: right little finger for the scope operator, left hand down to the bottom row for the opening bracket, letters, then the left hand again for the closing one.
Nested templates make it worse in a way that is famous for a reason. Two closing brackets in a
row used to need a space between them, because the compiler read >> as the
shift operator; C++11 fixed the parsing, and the doubled left-ring press is still a genuinely
awkward thing to type. Anyone who works with standard library containers types this pattern
dozens of times a day.
References and pointers live on the shifted number row
The ampersand is Shift plus 7 and the asterisk is Shift plus 8: two adjacent reaches up onto
the number row with the right hand, both shifted, on a row most typists only ever visit for
digits. A line as short as int* p = &x; asks for the shifted 8, an unshifted
equals, the shifted 7 and finally the home-row semicolon, in four different hand states inside
twelve characters.
Add the arrow. Member access through a pointer, p->value, is an unshifted
hyphen from the right little finger followed immediately by a shifted period from the left
ring finger, and comments open with a doubled slash from the right little finger on the bottom
row. None of these pairs occur in English, so there is no transferable habit for any of them.
Why the little fingers fail first here
In prose, the right little finger types roughly p, the semicolon, the apostrophe
and Shift, and it does so rarely. In C++ that same finger is responsible for the semicolon,
both square brackets, both braces, the colon, the double quote, the hyphen, the slash and the
Shift key. The load is not spread across the hand; it is concentrated on the weakest, slowest
and least independent digit you have.
The symptoms are recognisable once you know to look for them. Braces coming out as square brackets, because the Shift arrived late. Semicolons landing on the letter beside them. A quote appearing where a semicolon belonged. All three are the same underlying fault: the finger is reaching from a hand that has drifted, so every target is a little off. Strength is not the fix and never has been. Keeping the other three fingers on their home keys while the little one reaches is the fix, and it is trainable in a couple of weeks.
How to practise this
Work in short sessions and treat accuracy as the score. Type each snippet exactly as it is written, braces on the lines where they are, and resist reformatting it in your head toward whatever brace style you prefer, since the point is the keystrokes rather than the style. When a specific character keeps breaking a line, slow the entire snippet down until it stops rather than speeding up around it.
Do the alphabet first if you have not. Symbol drills on an unreliable letter map teach you very little, because you cannot tell which half went wrong; the full method is in the guide to learning touch typing. The other two language tracks are Python typing practice, which is colons, underscores and indentation, and HTML typing practice, which is angle brackets and quoted attributes in a rhythm of its own.
Frequently asked questions
Why is C++ so much slower to type than English, even for fast typists?
Because the symbol density is roughly an order of magnitude higher and the symbols sit on the keys prose never uses. English is almost entirely lower-case letters on the home and top rows, with a comma or a full stop every few words. A line of C++ can be a third punctuation, most of it shifted, and nearly all of it reached by the little fingers. Your words-per-minute figure was measured on the easy half of the keyboard.
Does typing speed matter for C++ development?
Less than the internet implies and more than nothing. The thinking dominates when you are designing anything, so raw speed buys you very little there. What accuracy buys you is fewer trips through the compiler for a missing brace or a stray semicolon, and less friction in the parts of the job that are pure transcription: build files, header guards, forward declarations, a quick test harness, anything typed into a terminal.
Should I practise with my editor auto-closing braces and brackets?
Practise here with it off, and leave it on where you work. Auto-close is worth having, but it means your hands may never have learned the closing brace at all, and the moment you are editing a snippet in a code review, a chat message, a commit message or a build script on a remote box, the editor is not there to finish the pair for you.
Which C++ characters come up most often?
The semicolon, because nearly every statement ends with one, and then the brace pair, because every function, class, namespace, loop and conditional body is wrapped in them. After those come the parentheses, the scope operator, the angle brackets of any template, and the double slash that starts a comment. That short list covers the overwhelming majority of the punctuation in a normal translation unit.
Do these drills help with C, Java, C# or Rust?
A great deal of it transfers. The brace-and-semicolon rhythm is shared by the whole C family, and the angle brackets of a template read almost identically to generics elsewhere. The scope operator is narrower, being mostly a C++ and Rust thing, and pointer and reference syntax is C and C++ specific. If you write Java or C# day to day, most of this drill is still the right drill.
Would a different keyboard layout make C++ easier to type?
Layouts designed with programming in mind do exist, and some move the brackets somewhere kinder. The honest answer is that switching costs you weeks of fluency in exchange for a benefit nobody has demonstrated convincingly, and you will still meet standard layouts on other machines. Drilling the reaches you already have is the cheaper trade.