One of the first programming management books I was encouraged to read was Peopleware – Productive Projects and Teams. It was a great read and I try to re-read it every once in a while.
One of the topics covered is actually a term that comes from psychology – flow. Flow carries the idea of being completely mentally immersed in a task.
There are a lot of things that can break us out of flow or prevent us from ever entering that state that are out of our control. But I want to focus on something that is completely within our control and that could be interrupting our flow hundreds of times per day.
Reaching for the mouse (trackpad, touchpad, etc.) is a very natural instinct for many of us. But removing one of our hands from the keyboard actually can disrupt our thinking and hamper productivity – albeit not to the extent of many of the other distractions we contend with. Modern IDEs are so feature rich, that if you are deeply involved in a development task, know your requirements and have a well-thought out design that meets those requirements, you can perform much of the development without having your fingers leave your keyboard and maintain your blissful state of flow.
Most of us would agree that using the mouse to perform frequent operations like copy/cut/paste/save/undo/redo is unnecessary. But we can go much further in our effort to keep our minds focused and increase our productivity.
I won’t bother outlining what the shortcuts are since every IDE has its own set of built-in keyboard shortcuts, most allow for customization of these and some languages may have some shortcut concepts that don’t apply elsewhere. What I will do is outline some of the shortcuts that you should know for your IDE and, in brief, how they will benefit you.
I work in Java most often day-to-day, so some of these may apply more strictly to Java developers.
Refactor – rename / move
Don’t hesitate to rename variables, files or move them if it’s in your best interest to do so.
Generate entire code files, variables, implementation shells.
Get to that code or resource file by name.
Open the item your cursor is on.
Find all code uses of the item your cursor is on.
Display class hierarchy of selected item.
Indent / Outdent
Keep that code looking beautiful.
Comment / Toggle Comment
Quickly and easily handle code blocks to comments.
Cleanup / Format
More code beautification. Can even be used to resolve code problems.
Java import of a specific class.
Quickly relaunch last launched or the code that’s open in your editor.
Set/Toggle Breakpoint – Step Into / Step Out / Step Over / Run to Line / Resume
Quick Fix / Quick Assist / Suggest
Super powerful! Code problem? Your IDE might know how to fix it! Also, save on pointless typing with assist/suggest features.
Need to perform another similar operation to an existing block of code? Line duplication without copy/paste!
Repetitive typing tasks simplified.
These are just some of my favourites. There are dozens, even hundreds more available. Interested in more information?
IDEA Keyboard Shortcuts
Eclipse Keyboard Shortcuts
Have a favourite that I haven’t listed? Leave a comment and let us know!