9 Tips for Becoming More Efficient When you Use your Computer

Publié dans Coder stories

10 déc. 2019

8min

9 Tips for Becoming More Efficient When you Use your Computer
auteur.e
Paul-Xavier Ceccaldi

Front-end developer @ WTTJ

Are you tired of minimizing and maximizing windows? Weary of switching between the apps you use most? Do you love keyboard shortcuts? And the feeling of power you get when you use your computer in the most efficient way? Then this article is definitely for you! Here we outline the ways you can improve your efficiency and productivity while working on your computer.

Why I wanted to write this paper

My name is Paul-Xavier (alias Pix) and I have been a front-end developer since 2010. I spend most of my time in my terminal emulator kitty over an SSH connection to an Amazon EC2 instance running Ubuntu, inside which I run tmux sessions for each project I work on.

I like to be efficient when it comes to using a computer—in every area of my life, really—so I wanted to share some tips with you based on my personal experience. I’m a macOS user, so most of my advice will obviously be macOS oriented, but even if you use a different operating system, some points should still be useful.

What you can gain from my tips

To use a simple example, let’s assume you’re on Google Chrome and want to open a new window, reach google.com, and then close this new window. Breaking down what you need to do to achieve this reveals the following steps:

The “normal” way

  • quit keyboard
  • take mouse and target the menu Folder
  • click on it
  • target the New Window action
  • click on it
  • reach for keyboard
  • type google.com
  • hit enter
  • quit keyboard
  • take mouse and target the close tab/window button
  • click on it

Video

The “shortcut” way

  • hit cmd + N
  • type google.com
  • hit enter
  • hit cmd + W

Video

It’s immediately obvious that the “shortcut way” has much fewer steps to action what you want to do. The “normal way” involves lots more steps because of the mouse use.

The screencast of the “normal” way takes 5.05 seconds, while the “shortcut” only takes 3.07. On a 5.05-second action, you gain 5.05/3.07 = 1.64495114, so the “normal” way is approximately 64% slower than the “shortcut”.

We’re not saying that you’ll be working 64% less at the end of the day, but this example is a good illustration of how it’s possible to reduce the actions needed to complete something, thus speeding up the result.

Tip 1: Stop using your mouse

Generally speaking, using your mouse is inefficient. Not leaving your keyboard is the key to efficiency and is a rule to keep in mind. Text editors such as Vim or Emacs have taken this point and run with it—they allow you to carry out whatever action you want a text editor to do without going near your mouse.

There is a downside, though: You’ll have to learn new shortcuts and ways to do things, or, put more simply, you’ll have to leave your comfort zone for a while to reap the rewards. But don’t worry, you can take it step by step to get there!

Trying to stop relying on your mouse (as much as possible) means using more and more keyboard shortcuts, which will lead to muscle memory taking over. This will reduce your cognitive load and help you to focus on your actual task.

Tip 2: Start using hotkeys to launch/focus the apps you use most

After I realized I was overusing the cmd + tab shortcut to switch between my opened apps, I started to look for a better method to find a specific app straight away. If you always know which app you want to use, creating a shortcut to launch the one of your choice directly is surely more efficient. Cue the productivity app Alfred, which helps you to create a set of hotkeys for the apps you use most frequently (N.B. This requires you to pay for a Powerpack). You can also choose to go with other tools like BetterTouchTool or Keyboard Maestro.

If you use a window manager such as awesome, i3, or dwm on your Linux distribution, you’ll have already optimized this.

image

Tip 3: Optimize the available space on your screen and external monitor

You may already use a tiling window manager, but if not and if, like me, you can’t stand having parts of your screen not being used, then this should be of interest. For me, having a fullscreen app always makes the experience immersive and helps me to focus better on what I’m doing. Sometimes I use screen halves to interact between two apps—on macOS I use a window managing control app called Spectacle, which provides you with (customizable) shortcuts for resizing/managing your windows in an efficient way, or for moving a window to your external monitor.

MacOS users might also be using Mission Control here, but I dislike the type of animations that make you go fullscreen or require you to swipe between work spaces, and have never figured out how to disable them. That being said, Mission Control can also help you to master the available space on your screen if you use its fullscreen mode, window halves, or virtual spaces, and customizable shortcuts are available (Settings —> Keyboard —> Shortcuts —> Mission Control).

Some additional tips:

  • Hide your dock if you want your fullscreen apps to take all of your available screen space:
    defaults write com.apple.dock autohide -bool true

  • If you choose to do this, I recommend removing the annoying autohide delay:
    defaults write com.apple.dock autohide-delay -float 0

  • And, of course, remove the delay to show the dock when you hit the corner:
    defaults write com.apple.dock autohide-time-modifier -float 0
    (You will need to restart your macOS for this to work.)

Tip 4: Reduce key repeat delay and the delay before key repetition

Since you’re trying to use your keyboard more often, it makes sense to optimize its configuration in your OS. For macOS users, just use the system preferences/keyboard panel.

You can even use faster values than the one macOS provides, as below:
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10

Tip 5: Learn all common shortcuts

This Wikipedia page about keyboard shortcuts is really helpful when you’re wanting to learn and discover new shortcuts. Here are a couple that I really enjoy using now that I’ve become so keyboard-centric.

In your terminal (some shortcuts are really Fish friendly, too) try the below:

Ctrl + h: The same as backspace. For when you think your backspace key is too far away.
Ctrl + j: The same as enter. For when you think your enter key is too far away.
Ctrl + p: The same as up arrow. For when you think your navigation arrows are too far away.
Ctrl + n: The same as down arrow, but for lazy people.
Ctrl + f: The same as tab—to complete a suggestion, for instance. (This is mostly for Fish users, but it also works on Chrome, Firefox, and Safari.)

In Vim:

Ctrl + c or Ctrl + [: The same as escape. For those times when your escape key is too far away.
h / j / k / l: Respectively, the same as the left / down / up / right arrows in normal mode.

In macOS:

Cmd + ` : gives focus to the next window (of the same application). I use this all the time to switch between Chrome on my external monitor and Chrome’s externalized inspector window on my computer screen. I also use it to switch between two vertically split windows of macOS’s Finder.

Some additional tips:

  • If, also like me, you are not a caps lock key user, you can rebind it to a key you use more often, such as ctrl. It is really easy to change on macOS with the modifier keys button in the keyboard preferences pane. It is a huge key and very accessible with your left pinky. It will allow you to reach more ctrl + [key combinations] due to its position on the keyboard.
  • On macOS, set the “Full access keyboard” option to all controls in the keyboard preference/shortcuts preference pane. You will be able to use tab to navigate through windows and dialogs controls and validate them with space or enter.

Tip 6: Learn to type without watching your keyboard

You’re probably very aware of how important it is to be able to type without taking your eyes off the screen. Also, it can be truly enjoyable to watch what you’re writing appear on the screen almost without any effort, with your muscle memory doing all the work for you.

I have been able to touch type for a long time, but in a really non-academic way that was forcing me to reset my fingers’ positions every so often because I was losing the home row. I recently forced myself to type correctly, using all my fingers and placing each one of them in the correct place on the keyboard. I actually rediscovered the purpose of the ergos on the f and j keys—better late than never, right?!

You can read more about it in this great article and train yourself using online tools such as The Typing Cat or 10 Fast Fingers.

Tip 7: Use a terminal multiplexer

Using a terminal multiplexer such as tmux to introduce the notion of persistency to your terminal-usage habits is a good option. Basically, tmux allows you to (re)attach to a session that retains what you started processing when the session started, meaning that if your terminal freezes, you can just kill it and launch another one and then reattach to the tmux session where all your processes are still running. It will also improve your experience when working remotely with colleagues because it allows multiple users to attach to your tmux session over an SSH connection.

Tip 8: Start using a terminal editor such as Vim/Neovim, Emacs, or Spacemacs

Back in 2010, my editor was TextMate. Then I started using Vim because I was impressed by how fast some of my vimist colleagues were at coding. The learning curve was hard at first, but thanks to all the Post-it notes I used to help me remember the (main) basic commands, I soon found my feet. It’s really interesting to use text editors like this to see how comfortable it is to always have your hands on your keyboard.

Also, since you’re probably a heavy terminal user, these editors will allow you to do all your work in the terminal and stay (mainly) focused on this single app while working. Plus, if you like pairing with your favorite colleague when working on tricky code, mastering a terminal editor will allow you to have some awesome pairing sessions over a simple SSH connection. It gets even better on top of tmux.

Tip 9: Consider using a better keyboard layout

At my first job, I was presented with a Mac that had a keyboard with a Qwerty layout. At first, I wanted to change, but I kept seeing articles and posts that said it was a better layout than Azerty (yes, I’m French) when it comes to web development because the brackets, quotes, columns, pipe, slashes, and so on, are closer to each other.

Even if this was the first change I had to make, I wouldn’t advise changing your layout for Qwerty (or Bépo, Dvorak, Colemak, or whatever) as the first thing to do to improve your efficiency. It will actually take you a long time to get comfortable with your new layout compared with the pretty small efficiency gain it offers.

However, since you’re going to use your keyboard for the rest of your life and it is surely the tool you use most every day, being comfortable when you’re typing and choosing a layout that fits your needs is probably a good investment of your time.

Conclusion

Each of the steps mentioned require you to get used to a new way of doing things and will take a certain amount of time to get comfortable with, depending on the task you choose to improve. Once you’ve achieved this, though, your productivity will increase, as will your personal satisfaction with mastering an everyday tool.

If a particular tip mentioned here has aroused your curiosity, do try it out—the time you “lose” getting used to a new way of working will prove to have been spent profitably within a short amount of time. I’m speaking from experience and definitely can’t return to how I worked before.

This article is part of Behind the Code, the media for developers, by developers. Discover more articles and videos by visiting Behind the Code!

Want to contribute? Get published!

Follow us on Twitter to stay tuned!

Illustration by Blok

Les thématiques abordées