10 ms·
I've never understood the sentiment that using a mouse is bad. I see blog posts all the time about how a programmer's job is more thinking than writing code and
by WesleyJohnson 10y ago
I've never understood the sentiment that using a mouse is bad. I see blog posts all the time about how a programmer's job is more thinking than writing code and/or writing good programs is also about taking out just as much code as you put in. So if writing programs is a deliberate and methodical process that - I'd argue it's also slow. Why then is there antithesis that mice slow you down and you need keyboard shortcuts to be faster and more productive?
Maybe I'm just an old-schooler?
- janekm 10y agoThe discipline of thinking before typing is one that requires experience. I suspect that many young developers are stuck with not knowing what to type, and try to find solutions to their apparent lack of productivity (a guilt-free way of procrastinating). I jest, mostly ;)
- ChronosKey 10y agoI think the idea is that there are times when using the keyboard is faster than using the mouse, whether it's using a certain editor or knowing the program's keyboard shortcuts. There's also the time taken to switch between using the keyboard and the mouse. It's kind of a micro-optimization.
- m-j-fox 10y agoExactly. I used to be one of these hardcore guys typing fast and never taking my hands off the keyboard; then I got RSI and learned to appreciate value slow methodical approaches.
- 2muchcoffeeman 10y agoThis is one of the reasons I started learning vim bindings. I can hunt and peck and still be relatively efficient at editing. So I can move my hands from the keyboard.
- ryandrake 10y agoInteresting, I find I can type all day and not feel a thing in my wrists or hands, but just 15-30 minutes of continuous mouse usage, and I'm reaching for the pain medication. To me, staying able to use a computer without the mouse is about both speed and comfort.
- neivin 10y agoThis is a common problem in people who play computer games, especially those that are mouse heavy. The solution is pretty simple actually. Simply lower your mouse sensitivity. Now you use your mouse by moving your entire arm instead of your wrist. Watch how this guy uses his mouse: https://www.youtube.com/watch?v=X89152oocsA https://www.youtube.com/watch?v=X89152oocsA Of course they do it to aim better, but it also puts less strain on your wrist and hand
- jasonkostempski 10y agoIn other words, you got old and slow. Happens to us all :)
- blunte 10y agoAn old-schooler would be the one asking, "why do I need a mouse?" Anyway, it sounds like you're asking, "Why are keyboard shortcuts faster than moving a mouse to a location and then clicking [and potentially having to move to another location, such as the menu that just dropped down, and clicking again]?" Does this really need an answer?
- ryandrake 10y agoYou forgot even more inefficiency: Lifting your hand off the keyboard and moving it to the mouse, [insert your above steps], then moving back to the home row.
- blunte 10y agoI didn't forget. I just didn't feel like enumerating what I think are obvious and commonly accepted facts :). It really comes down to thought->muscle memory of keyboard shortcuts, especially those which don't require moving hands away from the home keys, vs the activity of reaching over, taking the mouse, driving it to a certain location on the screen, and then clicking. It should be obvious which will be faster.
- pix64 10y agoIs scrolling through source code really faster line by line?
- ryandrake 10y ago80j Just scrolled down 80 lines
- noctuid 10y agoThat's what you do with a mouse though. With a keyboard, you can move by semantic units (like a paragraph or function), use fuzzy search to jump to a specific function, etc.
- blunte 10y agoThere are so many keyboard options for moving through source which you don't have with a mouse... - Page up/down (and especially with home row shortcuts like in Emacs and Vi) - Brace match jumps - n line jumps up or down in Vim - top/mid/bottom of view jumps - page shifts up and down without moving the cursor - top/bottom of file jumps - jump directly to a line in a file ... and more Seriously, put an Emacs or Vi power user next to a guy with an IDE and a mouse, and it's no contest.
- un-devmox 10y agoErgonomically, IMO, using a mouse or track pad is much worse than typing. That said, I am a very deliberate and methodical developer.
- Mithaldu 10y agoPersonally i see it mostly as self-validation. I'm in an odd position in that i learned computing with an Amiga, meaning a computer that has a mouse, but was also still unadvanced enough to require lots of keyboard interaction. Nowadays i find that which i use depends a lot on the current context. Exploring things and browsing documentation particularly is done almost entirely with mouse and mouse gestures. Editing text is very keyboard-centric and the mouse only gets to act occasionally. There's a balance there and it goes beyond even the task you're engaged in. I often find myself annoyed at the very same piece of software for providing too few keyboard shortcuts, or providing too few mouse interactions, depending on whether i'm working on something to the side, have one of my hands occupied, or just plain are having pain in one of my joints on that day. People who proclaim one or the other as the alpha and omega seem to me stuck in a mindset that's strictly binary and refuses to see shades. (Granted, i am speaking with decades of entrainment. I can absolutely see how for a sysadmin in their 40s there may be little sense in trying to get comfortable with a mouse.)
- deleted 10y ago[deleted]
- yissir 10y agoI'm a keyboard-only developer with a very high key rate, but I don't write an above-average amount of code. My keystrokes are used on a bunch of custom shortcuts that I use to quickly navigate and read code.
- jmjanzen 10y agoI think I can speak from a position of genuine dislike of mouse usage. I enjoy it for certain things, like perusing the web, or clicking through tickets while sipping on a morning coffee. The mouse is a great invention, and I would never want to get rid of it completely. That said (subjectivity ahead), the mouse becomes annoying only when I'm done thinking, and it's time for doing. Imagine you've got your window manager set up just so, terminal multiplexer sessions all pointed in the right places; and finally, a problem -- and clear solution -- in mind. All that's left is implementation. You start typing your solution, switching windows to compile or refresh a webpage every now and then. Things are coming together. As you proceed this way, a stroke of brilliance hits you, and you add an extra flourish that resolves an entire class of problems. Welcome to the "Flow State." Finally, you realize you'll be needing a file from your Teamviewer session with another computer. You foreground that process, and navigate to the remote computer's file manager. So far, you haven't even had to traverse farther than three keys from the homerow. Unfortunately, to transfer a file over Teamviewer, you'll need to use the mouse. You'll have to click three times to get to the file sharing widget, and use the mouse even more to get your remote/local directories lined up, another click elsewhere to initiate the transfer... close the little confirmation popup that's now obscuring your screen. It's not the end of the world, of course, but your dance has been interrupted. I'm not sure you'll relate to anything I've stated above, and I'm by no means advocating "going mouseless" as objectively superior to your own preferred flow. Whatever works for you, works for you. I am hoping that my reply might help you get in the head of a keyboard jockey. By the way, this reply was written with a rather fluffy cat sitting on my mousepad. So I'm not the only one to be inconvenienced when I have to switch to a mouse. Needless to say, George is a huge fan of vim. :)
- thameera 10y agoNot just you, keeping yourself in the flow is why many professionals prefer the keyboard to mouse. Note the word 'professionals', in contrast to a regular computer user browsing Facebook whose curiosity makes him want to easily click on anything that comes to the sight. I might be a professional when I'm in the zone at the office, but will become a regular user browsing out of curiosity at night. tldr: the efficiency of the keyboard is contextual.
- 10y ago
- btschaegg 10y agoFunny thing, for me, this is exactly the reason why the mouse is annoying. I use Vim-bindings pretty much anywhere privately (to the point of using qutebrowser and an awesomerc file that allows me to switch workspaces using hjkl), but am forced to use VisualStudio at work. VsVim makes VS barely usable for me, but it still has so many usecases that are mouse-mandatory that I'm constantly cringing. When programming is mostly thinking, I want to spend my time doing that and not slowly pushing a pointer along on the screen. The whole dialog-based systems basically constantly interrupt my thinking flow, and context switches aren't free :-)
- noctuid 10y agoIt's not just that using the mouse is slow. The mouse is also dumb. By that I mean that you can't tell it to take intelligent actions like jump to/select/delete a particular semantic unit (e.g. a sentence). Using the keyboard allows for more intelligent actions and for composition of actions with (optionally) mnemonic keybindings. The mouse is far less precise and requires some UI for pretty much anything. Besides, even if I'm thinking more than I'm coding that doesn't mean I'm okay with the coding part being slow.
- afterburner 10y agoJust highlight the sentence really quickly. Do it enough and you get good at it. Just like with keyboard shortcuts.......
- mst 10y agoI forget which program it is, but I've seen at least one document editor where one click places the cursor where you clicked, a second selects the sentence it's within, and a third expands the selection to the whole paragraph. Combine that and modifier keys, and it's completely possible to have the mouse involved in intelligent actions, just not nearly as widely implemented as one might hope.
- lfowles 10y agoHow about firefox? I double click to select a word and triple click to select a paragraph.
- johnfn 10y agoI don't understand this viewpoint. The faster you finish the mechanical process of typing code, the faster you can get back to deliberation.
- bbarn 10y agoI'm of a similar opinion. I grew up watching my mother have surgery on both of her wrists for what used to be called carpal-tunnel syndrome and now is just called repetitive strain injury. I've spent probably triple the time by 38 years old that she had in front of a computer, full time developing software, on a standard, non ergo keyboard which is nearly the same (even has clicky button switches!) as the one from her era. But I've got a mouse too. I use it all the time. It breaks up the repetitive in RSI. I think this is a good thing. We're not all trying to break the record in Mavis Beacon anymore. Most developers agree productivity is not measured in lines of code and yet some seem to still insist that a few seconds at most to move their hands and use the mouse is hurting them somehow.
- btschaegg 10y agoI don't think you can actually understand the issue if you haven't experienced it; that's just the way our brain works. I was extremely skeptical of Vim-bindings too, for example, and only learned them once I needed a powerful editor that compiles for ARM CPUs. While I don't use Vim anymore (mostly) I'd never want to go back in terms of the modal editing. Imagine yourself working as a photographer using non-digital cameras. While you know exactly what you want a picture to look like, you can't tell how it actually looks without some major work (i.e. process your film). So, you have to a) take many pictures of the same motive and b) try again later if you're not statisfied. Of course, you can get very proficent using analog cameras (a trained eye could e.g. certainly tell the proper aperture adjustments for a scene), but you'll have to train that rather inefficently, too. And sure, digital cameras have their drawbacks, but they have a very net positive effect on most photographer's work, that's why you almost find no one using the old methods anymore. Now, you - as the "analogist" don't recognize all the factors that slow you down in your work. It has been that way for decades, right? It must be the proper way to do things. Now imagine I'm coming along, being used to use digital cameras and forced to use analog ones in your working environment. Can you imagine the frustration I'm going through? I just want to make a picture of what I need and tell if it worked, if my last two seconds of activity will do. But the old thing has no screen I can use to see if the picture was to bright, to dark or even blurred. That's what the mouse-based workflow feels like after a while: It's unnecessairily slowing you down, constantly standing in your way. No matter if it's not the activity you spend most of your time with - it prevents you from going back to your real work as soon as possible. And if you're used to do the same things without it, you'll very likely get frustrated some time. Edit: I just realized another good metaphor would be to compare old FORTRAN punch cards (punching them out, giving them to an operator and waiting until the next day for the results) vs. debugging a modern C# application. That'sessentially what you're doing with proper hotkeys: Tightening your feedback loop.
- throwaway91111 10y agoI agree to some point; I don't think keyboard shortcuts are worth learning. Unless it's part of your "inner loop" of productivity; investing there yields high yields in terms of translating thoughts to actions.
- chipotle_coyote 10y agoI suspect a lot more of it is perception than people imagine: keeping your hands on the keyboard all the time seems like it intuitively must be faster. Early research in human-computer interfaces suggests that this isn't actually the case, though. From 1989: "We've done a cool $50 million of R&D on the Apple Human Interface. We discovered, among other things, two pertinent facts: (1) Test subjects consistently report that keyboarding is faster than mousing. (2) The stopwatch consistently proves mousing is faster than keyboarding." http://www.asktog.com/TOI/toi06KeyboardVMouse1.html http://www.asktog.com/TOI/toi06KeyboardVMouse1.html It's very easy on HN to find the pro-keyboard arguments. The pro-mouse argument is, more or less, that the context switch that really costs you time isn't the one involving the mouse, but the one involving remembering and/or finding the keyboard shortcut or function key. Vim and Emacs style movement commands are faster than the mouse in certain contexts, but I'm dubious that's universally true. "I want to jump to line 123" is easy, but what about "I want to move the cursor to the open brace character right there"? No matter how much of a seasoned pro you may be, you're going to have to think for a moment about how to do to that: "let me count the '{' characters between the current point and where I want it to be. Three, so '3/{<cr>'." The mouse may make you move your hand, but it doesn't make you have to stop and count. (It's also worth remembering that while mouse selection may not be as rich as "select within brackets" type commands, nearly all editors do have basic semantic mouse selection: double-click and drag to select by word, triple-click and drag to select by line. This can be a lot faster than you might think.)
- lathiat 10y agoThe MacBook Pro setup is faster again because I can use the mouse with my thumb without getting off the keyboard (and the trackpad works very well). Even with the trackpad I use on my desktop I have to move my hands backs and forward.
- microcolonel 10y agoHave you ever tried a trackpoint? It seems like it'd be right up your alley.
- 10y ago
- hugodahl 10y agoFor me, the difference between keyboard shortcuts, and command line interface for that matter is that the same operation can be done semi-autonomously with the emphasis being on the variation (filename, path, flags, etc.) for the task at hand (no pun intended?). Performing the same operation with the mouse, there must be proper "setup" (get windows visible, or at least open to Alt/Cmd+Tab between them), and deliberate, visually tracked, hand/eye coordinated operations to perform the same operation. For example, I can very quickly run a "full build" by pressing Shift+F6 and simultaneously turn my attention to the build output. Doing the same with the mouse, I would need to move the mouse pointer to the "Build" menu, after possibly spending a few seconds awkwardly looking for the pointer across multiple screens which vary in resolution/scale, click, move again down to the "Rebuild Solution" and click. Then at some later point in time, possibly have to reach out and move the mouse for the sole reason of getting the pointer out of the way of my field of view. True anecdote: more than once, doing the operation the "GUI" way in the past, while trying to find the right windows, has truly derailed my train of thought as to what my next operation was to be. Also, I may just be an old-schooler as well, cutting my teeth on command line OSes and network environments (Netware v3.11 anyone?)
- koube 10y agoTo have some perspective from the other side, every time I try to use the keyboard I am immensely slowed because a large part of my brainpower goes towards remembering anti-intuitive keyboard commands. It reminds me of my short attempt to switch to a Dvorak keyboard layout. The responses to your query make me think keyboard-only is rice.
- Ace17 10y ago> I see blog posts all the time about how a programmer's job is more thinking than writing code and/or writing good programs is also about taking out just as much code as you put in. It becomes a lot more debatable when you're modifying existing code (rather than writing new code). There are actually lots of cases when the thinking takes a small fraction of the typing, e.g "this block should be extracted as a separate method", "this class needs to be renamed", "this interface should be split" ... or, even more obvious "this file needs to be properly indented". We have automatic tools for some of these operations, precisely because doing them manually might spend a ridiculous amount of programming time.
- corecoder 10y agoOne important thing about keyboard is that it is a mostly uninterrupted buffered stream: with some notable exceptions, you can usually keep typing whether the previous command is done executing or not. You can type ahead several long running commands (in a shell, in an editor, for instance) and then let go. Or, you can click, wait, click, wait, click and then finally switch to something else. Is it a big deal? I suppose it depends on how much you think in terms of whole sequences of commands.
- tempodox 10y agoThere is no mouse in vim. You're a new-schooler.
- atnnn 10y agoUsing a mouse is distracting. It steals our focus away. Programming can seem like a slow process because the bulk of the process happens in our minds. Keeping our focus on our precious mental models makes us more productive. Keyboard shortcuts become mechanical. When we're in the middle of editing code, whether we type "F8" "C-c C-l" or ":make", we can keep your focus where it belongs. But if we use a mouse to click on the "Build" button instead, we lose part of our focus looking for and aiming at the button. Menus and file explorers are especially bad at this: when opening a menu item or looking for a nested file, every single subfolder or submenu steals more of our focus away. I know a few programmers who never use auto-completion for file names or methods. It surprised me and frustrated me a lot at first. Typing long file names without tab completion can be so. much. slower. But then I realised we can be much more efficient that way! Auto-completion interrupts our focus. We need to take in new information and make decisions. It's all about eliminating the step where we ask ourself "Why did I open this file?" or "What goes next?". It is easier to think about what arguments we want to pass to a method when we're not focused on selecting that method from a drop-down list. That is also why precise touch-typing is so important. We don't want to focus on either the pointer or the keyboard, we want to focus on our code. The mouse itself isn't the problem, in fact some editors such as ACME or Blender make very good use of the mouse. The problem is inefficient UI design that interrupts our concentration.
- netzone 10y agoSee, for me it's the complete opposite, typing words unrelated to the actual code makes me lose part of my focus, whereas navigating the mouse or a dropdown list isn't requiring me to "create" words or strings in my mind. Maybe that's just because I haven't gone through the learning curve, but I suspect the difference would be negligible. [Edit] That's only for keybindings that force me to input string though, I vigorously use keybindings.
- gkya 10y agoThe mouse is good for browsing and uncommon actions through drop down menus. There are about 30-40 keybindings I use in emacs, which are the most primitive or the most frequented commands. The rest I find through the drop down menu.
- tscs37 10y agoI think it's one of these dogma that just get around by word-of-mouth. Personally, I need the slight downtime of using a mouse when compiling a program, a short moment to pause and clear my head. Without a mouse I'd probably be less productive.