The best way to learn how to write code is to... write a lot of code.
A few tips:
- Use the keyboard instead of your mouse/trackpad whenever possible.
- If you use a menu item, notice the hotkey (if any) so that you can use the keyboard next time.
If you're using Atom, Sublime, or VS Code:
Shift-Cmd-P (macOS) or
Shift-Ctrl-P (Windows) to activate the command palette
Cmd-P (macOS) or
Ctrl-P (Windows) to instantly open any file in your project
- Learn how to assign a keyboard short to the Duplicate Line or Duplicate Selection command (I suggest
After editing code for a while, can you...
- Start a new file
- Set the type of file to "HTML" or "Ruby"
- Select a region of text using only the keyboard
- Indent several lines of text at once using only the keyboard
- Un-indent several lines of text at once using only the keyboard
- Delete an entire line using only the keyboard
- Duplicate a line using the keyboard