Writing Coding Characters
Introduction to Coding Characters
In our previous lessons, we mastered the number row and basic symbols like the exclamation point and parentheses. While those are important for general typing, the characters we will cover today are the true building blocks of programming.
These symbols, such as brackets, braces, and quotes, are used to organize data and give instructions to computers or AI models. Because most of these keys are located on the far right side of the keyboard or in the top-left corner, they require specific finger movements to type quickly without looking down. In this lesson, we will focus on the right-pinky reach and the placement of encasing characters.
Grouping with Brackets and Braces
When you write code or design a database, you often need to group items together. This is done using Square Brackets [] and Curly Braces {}. On a standard keyboard, these keys are located to the right of the letter P.
- Square Brackets
[]: These are used forlistsorarrays. You press the key directly to type them. - Curly Braces
{}: These are used forobjectsorblocks of code. You must hold the Shift key while pressing the bracket keys to type these.
Both sets of keys are controlled by your right pinky. You should practice reaching from the home row to these keys and immediately returning your pinky to the Semicolon (;) key.
In the first example, the square brackets group three numbers into a single list. In the second example, the curly braces wrap around a piece of data to show it is a single object. Mastering these reaches is essential for defining data structures in the CodeSignal IDE.
Quoting with Quotes and Backticks
To tell a computer that you are typing text (often called a string) instead of a command, you must wrap the text in quotes.
- Single Quotes
'and Double Quotes": These are located on the same key, just to the right of theSemicolon (;)key. Yourright pinkyhandles this reach. Use the quote key alone for asingle quote, and holdShiftfor adouble quote. - Backticks
`: This key is usually located in the top-left corner of the keyboard, just below the Esc key and to the left of the 1 key. You will likely use your left pinky to reach up for this one.
In these examples, the different types of quotes define how the text is handled. Single quotes and double quotes are the most common in database work, while backticks are frequently used in modern programming and when talking to LLMs.
Structuring with Colons, Semicolons, and Slashes
The final set of characters helps you separate ideas and define paths.
- Semicolon
;: This key is already under yourright pinkyon thehome row. It is used to end a line of code. - Colon
:: This is theshiftedversion of the semicolon. It is used to assign values or create lists. - Forward Slash
/: Located on the bottom row next to the rightShiftkey. It is used forweb addressesanddivision. - Backslash
\: Usually found above the Enter key. It is often used forfile pathson certain computers.
| Character | Name | Finger Used |
|---|---|---|
; | Semicolon | Right Pinky (Home Row) |
: | Colon | Right Pinky + Left Shift |
/ | Forward Slash | Right Pinky |
\ | Backslash | Right Pinky (Reach up) |
In the first line, the forward slashes are part of a web address. In the second line, the colon separates a setting from its value, and the semicolon marks the end of that specific instruction.
Summary and Next Steps
In this lesson, we focused on the characters that give code its structure. You practiced the locations for:
BracketsandBraces[] {}for grouping data.QuotesandBackticks' " ```` for defining text.Colons,Semicolons, andSlashes: ; / \for organizing lines and paths.
Most of these keys rely heavily on your right pinky. It is important to keep your other fingers anchored on the home row so you don't lose your place while reaching for these symbols.
Now, it is time to put these reaches into practice. In the following exercises, you will type code snippets in the CodeSignal IDE. Focus on accuracy first; speed will naturally follow as your muscle memory improves!
