Saturday, March 10, 2007

programming with a mouse considered harmful

I had a hard time deciding if the title should be "programming with a mouse considered harmful" or "real programmers don't use a mouse"; but I think you get the idea

I'm mentoring a guy right now, and he started using the mouse to move around in the code, I told him

"don't use the mouse, that's a bad practice"

It doesn't matter how many years you have been programming, if you use the mouse, you are implicitly slow, you can do things at least twice as fast using only the keyboard.

leave the mouse for things that you don't usually do, but for everything that you are doing in code there absolutely no reason to use the mouse; if you are new to programming it should be a lot easier to learn to use all the shortcuts, if you have been programming for a while is definitely harder (and you probably think you're better off without them at this point) but you would definitely increase your programming speed

I am known for being pretty fast (and they say I'm cocky for that matter), but one of the main reasons I'm fast is because I learn to use the shortcuts, I had a hard time switching from Delphi IDE to VS, but I did it without remapping the keyboard to use "Delphi IDE style", I think it's a bad idea to remap the keyboard to your specific style, specially is you do some type of pair programming (you are doing paired programming, right?)

you don't have to learn all of the shortcuts available, just the ones for all the little tasks that you do commonly when programming

use the keyboard, program faster


Steven said...

And don't forget RSI. Also a good reason to stay away from the mouse.

Brook Monroe said...

No, I don't do pair(ed) programming, because it's a rare company that can afford to put two developers on a single programming task. Ideals go by the wayside when the rubber meets the road of stockholders and earnings projections.

Can we grow up now, please?

Brad said...
This comment has been removed by the author.
Brad said...

Concerning RSI, I thought I had it awhile back and switched to the dvorak key layout. Faster with much less finger/hand movement.

Took me about 3 weeks to be acceptably fast. You can use your existing keyboard.

B. Waite said...

I can appreciate that some keyboard shortcuts are much faster than using their mouse equivalent...

...but that doesn't make the entire coding process twice as fast. It only saves you time on specific operations.

I suspect that using a keyboard and mouse might "cost" the average coder five, maybe ten minutes a day. Is that harmful?

I've wasted more time composing this response than that.

BlackTigerX said...

"I suspect that using a keyboard and mouse might "cost" the average coder five, maybe ten minutes a day. Is that harmful?"

coding is much more than actually writing the code, it's switching from design to code, opening dialogs, switching programs, opening new programs, opening folders, etc

harmful is a "bit" extreme word to use, but I do know that the difference between a keyboard junkie and a regular (mouse) user is huge, I'm talking from my experience that's what I have seen

Anonymous said...

there's a 'hidden' cost while using mouse

it's a context switching

it simply breaks your concentration

worst case it can kick you out of zone (flow state)

BlackTigerX said...

yup, context switching; I have worked for a number of years on data entry systems, the cost becomes very visible at that point

grahamsw said...

I'm all for keyboard only (my first Windows computer didn't have a mouse - I learned all the keyboard equivalents, which has been invaluable) but if you're coding at a high enough level of abstraction you really ought to be spending more time thinking than typing.