Be more productive - throw away your mouse
August 22nd, 2007The mouse, or two dimensional motion pointing device, is undoubtedly useful, especially when you’re new to computers. It lets you open windows, click around, and explore. However the more time you spend using a computer, and the more proficient you become, the more the mouse becomes a hindrance to how fast you can work.
In a simplistic sense, using the keyboard the majority of the time saves your elbow. Regular switching between the keyboard and the mouse will give you repetitive strain injury, I know because I get a dull ache in my right elbow and wrist when I’m doing it too much. Usually mice are not the best shape either, it rotates your wrist about 135 degrees wise to your elbow: put your hand on your mouse and have a look.
The real advantage from using the keyboard, is that it allows you to work much faster. If you know the keyboard shortcuts for the five top actions you usually use the mouse for, I think you’ll be surprised at how much faster you can work. For example, in your code editor, useful keyboard commands to know could be: switch between files, compile and run the code, auto-complete, copy an entire line, and code reformat.
I also find that using the keyboard more helps my concentration, switching to the mouse repetitively is distracting and annoying after a while. Whilst being more proficient using the keyboard lets me focus entirely on the task at hand.
Applications
Most programmes with a graphical user interface, like a set of windows, are designed to be used with a mouse and you can’t really get by without one. However there are set of programs designed to used completely with the keyboard, and are very powerful, for the reasons I’ve outlined above.
The command line
In my opinion, if you’re a bioinformatician you need to know how to use command line. Powerful and versatile, this is the program I use most. Just about anything you do with your mouse, you can do a whole lot faster with the command line. Manipulating files, changing directories, and selectively performing actions based file type, the list is long. Getting used to the command line has a learning curve but the investment is very worthwhile, the returns in the speed at which you perform actions will mean you never look back. If you’re using Linux, you’re probably already familiar with using the console, on a Mac you’ll need to look in /Applications/Utilities for terminal. Windows Vista users have something similar in Command Shell, or if you’re an XP user I recommend downloading cygwin, which provides similar functionality. There’s an introduction to using the command line at lifehacker
Vi
If you’ve ever given vi a try, you probably think that it makes no sense to anyone except Unix Administrators, and it’s true that the learning curve for this program is steep. Called vi or Vim, this program is an entirely keyboard operated text editor, run from the command line. As with the command line, I would say that the investment is entirely worth it, once you understand how to use vi, you’ll have an extremely useful tool at your disposal. What makes vi special for me is that all text editing actions can performed by chaining a series of single character commands together. For example typing “/vi” will take me to the next instance of the characters ‘vi’, then typing “2dw” will delete the next two words. Reading this, you might make it sound a bit of novelty, but imagine all the times you have to click around in Word, instead replaced with a few simple commands run from the keyboard. With the exception of Java, I do all my text editing in vi, this includes this blog post. vi doesn’t have a spell checker, but I use the handy Aspell program, which you might have guessed is also entirely keyboard operated. To get started with vi, have a look around on the web, or try the included tutorial by typing “vimtutor” at the command line.
Summary
So my message for this post is simple, keyboard good, mouse bad. Try to use the keyboard as much as possible, find the common keyboard shortcuts for your favourite programs, and use the command line. Hopefully you’ll see the rewards in how you work.
Creative Commons
The photo used in this post is taken from slieschke on flickr and used under a creative commons licence.

August 22nd, 2007 at 8:57 pm
Really insightful, I would just like to add 2 points:
Most laptop keyboards are bad for wrists and the keys are smallish… This is not an advantage on the part of the rodent, but something to account for if using laptops (for instance, it might be a good idea to have a keyboard and a monitor to plug in the laptop at the workplace/home/wherever you work with your laptop the most)…
The second point is more cynical: Most people will look at vi/command lines/keyboard usage in general and see something hard to use with no real return. The idea of a steep learning curve with long term gains is not adjusted to the current (short term) way of looking at things. Of course, if people were to think a few minutes on the amount of time that they spend writing at the keyboard, they might notice that just 1% time saved editing would mean really a lot in the long run…
August 23rd, 2007 at 12:15 am
Nice post. I’m always amazed at the number of people who seem entirely unaware that keyboard shortcuts even exist. It seems that when some users click on menus, their attention is focused on the main topic (Copy) and they just fail to notice the “Ctrl-C” next to it. In fact, many people just don’t seem to notice 90% of what’s on their screen. There must be all sorts of psychology and usability studies of this topic.
You haven’t quite talked me into trying vi though; I’m in the emacs camp
August 23rd, 2007 at 3:43 pm
Mike, I just love %s///g . Very useful in dos2unix junk removal of ^Ms.
I hope Neil has not initiated the holy war [ http://www.linux.com/articles/19661 ]!
August 23rd, 2007 at 4:22 pm
Keyboard is much faster and better for your wrist. So this nice post could also be cateforised under health. On Mac I use Quicksilver. It is amazing what you can do with this program. One of my favorites is adding things to my ToDo list with a couple of keystrokes.
According to their website:
A unified, extensible interface for working with applications, contacts, music, and other data.
It is at: http://quicksilver.blacktree.com/
Some useful information can be found at:
http://www.lifehacker.com/search/quicksilver/
Regards Dr Shock
August 23rd, 2007 at 4:39 pm
Me again, with quicksilver you don’t even need a terminal, it is a program running in the background waiting for your keystrokes. It’s only for Macs, there are some alternatives for windows.
See: http://www.lifeclever.com/scott-hanselman-10-quicksilver-alternatives-for-windows/
August 28th, 2007 at 2:10 pm
Hi Everyone, thank you for your responses
@Tiago. Yes I agree that laptop keyboards can also give you aches and pains. I think though that some of this can be alleviated by raising the keyboard at the back, for example putting a book under it? Perhaps the best solution would be to get a wireless keyboard that you can connect to the laptop whenever you have a flat surface.
@Neil and Animesh. Emacs or Vi. I prefer vi, but that is just personal choice, I would recommend that people spend a week using each one then perhaps make decision? But Vi is very daunting, especially the crazy stuff that goes on when you’re in the wrong mode.
@Dr Shock. Yes, quicksilver, I used this for a while. However I started to use it less and less as I was doing more things in terminal. But there are certainly a lot of useful things, my favorite was binding iTunes start, stop, back, forward to the first F keys. So I didn’t have to reach for the mouse every time someone talking to me.
October 11th, 2008 at 5:40 pm
Visual Editor was,is and will be the Most Powerfull Tool available to Open Source Community.However i lament to see its limited access by majority of people accross the world…
#vi filename ( Infact can work without the Extension )….
…..Practical Extraction and relational Language (PERL) float with Vi editor…
It’s benifits are unaccountable….its varies from user to an another user…
October 12th, 2008 at 3:58 pm
@Nitin
Thatnks for your comment. Visual Editor is good too. I also used to use Eclipse quite a lot when I used Java.
November 12th, 2008 at 10:04 pm
h8gg9amt5silu21z