The main tool of a programmer is the Integrated Development Environment (IDE). Most of the time, a programmer is typing code using a keyboard.
I’ve already talked about why a keyboard is better than a mouse. However, you still have to use the mouse to invoke commands from the main and/or context menu.
The good news is that almost all menu commands have keyboard shortcuts. By using these shortcuts, you can execute menu commands without taking your hands off the keyboard or wasting precious time moving your hand to the mouse and ensuring that the mouse cursor is in the right part of the screen.
But here’s the bad news: there are a lot of these keyboard shortcuts, and they can vary between different IDEs.
How can you remember them all?
First of all, you should have one primary IDE that you work with. That’s why I always say that the programming language and the development environment don’t matter. What matters is how well you can use that language and environment. This way, any deficiencies in the language or IDE can be compensated for by the time saved through better knowledge of your “home” language and IDE.
Secondly, you only need to remember these keyboard shortcuts once. In other words, put in the effort once, and then enjoy the convenience of using them.
The best time to memorize keyboard shortcuts is when you need to perform a specific menu command. Select that command with the mouse and see if there’s a keyboard shortcut available (usually displayed to the right of the command in the menu).
However, don’t execute the command using the mouse. Instead, go back to your code editor and use the keyboard shortcut to execute the command. This way, you’ll not only visually remember the shortcut but also build muscle memory. If you don’t remember it on the first try, try it a few more times.
You can even reinforce the memory by saying the keyboard shortcut out loud. Some say that this helps with memorization because it adds an auditory element.
While this might slow you down a bit initially, it pays off in the long run with increased productivity.