6 ms·
Oh please, not vim again. Now you are not even supposed to use the already ridiculous hjkl mappings. It's really amazing to me to see this sub-culture attach
by robomartin 14y ago
Oh please, not vim again. Now you are not even supposed to use the already ridiculous hjkl mappings. It's really amazing to me to see this sub-culture attach itself to an editor that was designed as it is BECAUSE THE AUTHORS DID NOT HAVE KEYBOARDS WITH MORE KEYS ON THEM!
"hjkl is faster than reaching for the cursor keys". Holy frigging crap! Really? You are so good as a developer that MILLISECONDS make a difference? It does not take you hours to come up with algorithms or program structures to solve problems. And, when you do, you write code at blinding speeds (using vim) with NO BUGS, therefore MILLISECONDS matter because you are not one of those programmers who will need to spend HOURS hunting down and fixing bugs. Oh, yes, and 100% of your time is spent coding. You don't lookup documentation and you don't do any file management at all. You are a damn coding machine who can actually measure productivity by the millisecond and who must absolutely use the shittiest possible UI in the context of modern hardware to shave milliseconds from your every keystroke. You never reach for your iPod to look for music or read through HN, Facebook or even your email throughout the day because that wastes minutes. You never take a break, shoot the shit or theorize and ponder with your coworkers because you measure your life by the MILLISECONDS of flight time difference between the hjkl keys and the up, down, left, right keys 12cm away.
Right. The reality is that this is just a "I belong to the club" delusion that has nothing whatsoever to do with being a good programmer, writing good, clean, usable, extensible, reusable, fast, efficient and bug-free code. It has nothing whatsoever to do with delivering a product anyone wants and doing that on time and on budget. It has nothing whatsoever to do with being an entrepreneur, building a company, paying the bills and delivering value to users and investors alike.
It has everything to do with being a complete child and refusing to understand that there are places where you could optimize your time and energy that represent, without exaggeration, PRODUCTIVITY GAINS IN THE ORDER OF MILLIONS TO BILLIONS OF TIMES GREATER than the time required to reach for arrow keys or, Darwin forgive, the MOUSE (yes, he used that word) a few hundred times per day.
Grow up!
- debt 14y agoWell now you're making me rethink everything.
- lynndylanhurley 14y agodude chill
- robomartin 14y agoChillin. Just went to fly my RC helicopter for an hour. Didn't crash it. It's a good day. Now I'll use vim to make-up the time. :)
- goldfeld 14y agoA lot of people who don't understand what vim is before criticizing it seem to miss the point that vim doesn't make you faster at writing code. Insert mode is a dumb text entry mode like any other, and Visual Studio and Textmate in fact have out of the box more tools for snippets and auto-completion than most vim users care to even supplement with plugins. Because the power is in editing text, not writing it. And oh, how convenient, programmers spend like 10% or less time writing and a whole lot more reviewing (moving around) and editing code.
- robomartin 14y agoI'll tell you when and why I use vim and how I can justify its useage: Linux servers. I use vim on my servers to edit everything. Why? Because I know it's there and I don't have to install anything. And, even though I think it's a horrible UI that could only be justified in an era with keyboards that barely had characters and numbers, I use it. A religious attachment to vim? No friggin way. No editor has ever caused one of my projects to come in late (or early). The factors that affect real projects are so far removed from the software one uses to edit code that it is incredible some people evangelize something like vim to such an extent. The other really funny thing is to see articles and blog posts describing how to add trees, tabs and all manner of other things to vim and how this makes it even cooler. Really funny.
- avenger123 14y agoI agree with the usefulness of Vim on Linux servers. I would say that everyone is different in how they approach their work and in the case of software development, the tools they use. I wouldn't consider it funny that someone would want to optimize a very important tool to make it more functional. The tools we use for software development are both a curse and a blessing. A curse that there is no ONE TRUE WAY of doing something and a blessing that we can build and mold the tools to accomplish what we need. I am not religious about Vim or any other text editor but I can definitely appreciate others wanting to optimize their usage. Personally, I find that once you have setup Vim the way you want, its pretty much on autopilot. I would say that if someone is a natural tinker, Vim is the best black hole one can get into as there can be no end to the tinkering.
- ken_railey 14y agoSo your point is that because you may take breaks during the day, you shouldn't bother taking the time to learn sharp, efficient tools? There are plenty of legitimate gripes to be made about vim, but you really should consider taking the time to learn a serious programmers editor like Vim or Emacs. That would at least help you avoid looking like a fool by ranting about things you clearly don't understand. You may even find (god forbid) that you enjoy it.
- robomartin 14y ago> That would at least help you avoid looking like a fool by ranting about things you clearly don't understand. Let's talk about being a fool and talking about things I don't understand. I have started (and self-funded) at more than three technology businesses in my life. I am in the process of starting two more. In all cases these businesses started in my garage (one actually in my closet, before I had a garage) and managed to grow to the point where I got them out of the garage and actually hired many people. Some of these businesses shipped product internationally, all over the world. All of these businesses were hardware and software businesses. Some succeeded and others failed. And, in every single case, different technologies and tools came into the fold. In no case whatsoever --not one-- across THIRTY YEARS of entrepreneurship did a fucking text editor have anything whatsoever to do with the success or failure of the enterprise or project. Across a wide range of languages and technologies: machine language (actually typed-in code with a hex keypad), assembler (various processors), Forth, C, APL, C++, Fortran, Visual Basic, Lisp, Python, PHP, JavaScript, Objective-C, Verilog, 8080, 8085, 80x86, PDP1104, 6502, MC68K, PowerPC, Xilinx FPGA's, PC, Mac, Linux, embedded, workstation and server software and a few other things I probably don't remember doing. Not once. Not ONE TIME. Have I experienced a situation where using something like vim would provide any advantage whatsoever. And, yes, I use vim on my Linux servers because it's there. I don't have to think about it. It's the tool that comes with the box and I use it. From there to actually CHOOSE to use vim everywhere for coding our projects and to go past that and evangelize vim? That would be insane. There far more moving parts and issues in a business or in any piece of software for a text editor to make any real difference whatsoever. You can go on believing it does. And that's fine. That's not going to make it any real than believing in the tooth fairy. Show me a real project and a real business that came in on-time, bug-free, profitably and ahead of schedule BECAUSE OF vim and I'll gladly eat my words. Because I actually happen to know what I am talking about I can say with absolute confidence that the whole thing is a big smelly pile of bullshit. If the authors had the tools, keyboards and peripherals we have today vim would have been completely and utterly different. Do you honestly believe that these guys CHOSE to have modes because of some divine revelation? No, they didn't have the friggin keys and needed to come-up with a solution. The same reason Wordstar had shit like Ctrl-K-X.
- macalicious 14y agoSeems to be a lot of anger in there. As for myself, I don't really care much about speed while coding, however, I do care much about being efficient at doing things. Why should I have to move my hands up to reach the arrow keys, if I can use the home row instead? I do think it is very tiresome to move my hands around (maybe because I'm lazy?). This of course applies to the mouse/trackpad as well. Again, you need to move your hand to away. Again. Not necessarily about speed, more about efficiency and convenience.
- robomartin 14y ago> Seems to be a lot of anger in there. Today. Sure. Imagine my surprise when I see yet another bullshit vim article on HN, this one now saying "don't use the hjkl" keys. When will the madness stop? Newbie programmers reading HN actually need to hear from someone who clearly sees that the emperor has no clothes. Some look at HN as the reference by which they ought to shape their learning and careers. There's a definite pro-vim bend here. And it's all bullshit. If your goal is to be an entrepreneur, focus on the stuff that actually matters and is many orders of magnitude more signifiant than a ridiculous text editor from an era when keyboards had letters, numbers and three or four extra buttons. If you want to be a fast data entry operator, definitely spend months getting good at vim. Better yet, buy one of those single-hand chord-based text entry keypads and modify vim to work with it. You'll be able to type faster and with only one hand. Not sure if the work will have any quality at all or if it will be bug free or if you will be building anything anyone wants or if it will be profitable, but it will be awesome to behold.
- jodrellblank 14y agoSingle handed chording is not for speed, it's much quicker to alternate fingers of each hand because you can be moving one into position while pressing another. Chording is also slowed down by having to clearly release all the keys between keypresses, where normal keyboards can have some overlap as long as the sequence is still clear. Also reducing 10 possible inputs down to 5. If you want to type significantly faster English text, stenography looks like the best approach by a long shot. Not so good for symbols though. / off topic.
- alpatters 14y agoYou're a professional programmer, you use a keyboard all day, so you touch type right? hjkl sits right on the home row, where your fingers sit. It is just a natural place to put movement keys. Nothing to do with the number of keys on the authors keyboard. Like you say when your jumping around a lot then it matters less. When you're typing a lot then it does matter to keep your fingers on the home row.
- robomartin 14y ago> You're a professional programmer, you use a keyboard all day, so you touch type right? hjkl sits right on the home row, where your fingers sit. It is just a natural place to put movement keys. Nothing to do with the number of keys on the authors keyboard. And my point is that it does not matter. Use the mouse. Use the arrow keys. Use the function keys. Use a GUI. Use multiple monitors. If we are talking about productivity and code quality, the editor is orders of magnitude less significant than a huge list of other things. It does not matter. Then we have someone now saying "don't use the hjkl" keys. Really? How far is the idiocy going to go? If I am building a business or a product the last thing on my mind is what text editor we will be using. It is so ridiculously insignificant in the grand scheme of things that seeing people focus on it is beyond comprehension.
- lutusp 14y ago> ... the editor is orders of magnitude less significant than a huge list of other things. It does not matter. The first point is true. The second point is false -- it does matter. Saying that X is less important than Y can't be used to argue that X doesn't matter at all. > If I am building a business or a product the last thing on my mind is what text editor we will be using. It is so ridiculously insignificant in the grand scheme of things that seeing people focus on it is beyond comprehension. That's true in general, but there's an exception -- if you can improve the efficiency of editing, you might make a basic change in people's thinking and become a millionaire as a side effect. Guess how I know this.
- robomartin 14y ago
- ImprovedSilence 14y agohahahahahah. I use vim. It probably takes me a good deal longer to get anything done in it. I do it cuz I like the challenge. And I am not particularly pressed for time. Also it's just faster when do you know what the eff you're doing ;)
- walkon 14y agoImagine if there was a way to edit text entirely through just mentally thinking what you wanted changed? No physical overhead whatsoever, but just having the text change as soon as you mentally think, "change this parameter name to ___" and it happens. Being proficient in a good editor, like vim, makes that slightly closer to reality than using traditional, non-modal editors. Even so, this slight difference can have the major effect of helping the editor "get out of the way" and just let you make the changes a bit more proficiently - essentially freeing your mind up a bit to think about what you are changing instead of how. Physical traveling to the cursor/arrow keys to move one character or row at a time is wasting your time and a bit of mental energy, since you can't quickly and efficiently get to where you want to edit immediately (e.g. your brain has to do more and wait longer in between thinking, "x should instead be y" and it actually being changed).
- robomartin 14y ago> this slight difference can have the major effect of helping the editor "get out of the way" and just let you make the changes a bit more proficiently I have never, in THIRTY years of designing hardware and writing software, been slowed down by a text editor of nearly any kind (other than the first time I used VI). And, yes, I can use vi and vim. And yes, I think it is total horse-shit. The things that have slowed me and others down, caused projects to fail, caused robots to crash and damage something or caused the success or failure of a business have been orders of magnitude removed from any advantage that could be had via a text editor, even if it was wired into my brain. It is OK to make oneself believe that this is really useful stuff. Some people believe in all kinds of invisible things. And, in that context, anyone going against those beliefs is a lunatic. I am, on more than one front. I prefer to focus on what is real and what is significant.
- walkon 14y agoYou are mostly missing my point, which has nothing to do with vim use magically making what you code perfect. Not sure why you are trying to say that is what we are positing. All I said was that it takes some of the mechanics of modifying text out of the way making editing a bit more efficient in that regard (once you become proficient). You can still efficiently code crap, of course. Who is saying otherwise?
- lightblade 14y agoI can assure you Vim is not making a MILLISECOND difference. Vim is making a 5 seconds difference on every edit. Each edit can be defined as commenting out blocks of code, insert/delete text, or moving blocks of code. If your IDE provides convenient key combo to do these tasks, then great, you have no reason to use Vim. But as soon as you reach for your mouse, you just wasted 1 seconds. Dragging your mouse to select the text you want to change takes another 5 to 10 seconds. > Oh, yes, and 100% of your time is spent coding. You don't lookup documentation and you don't do any file management at all. Documentation lookup is much faster through terminal :) Man page is easier to navigate than JavaDoc because of that no mouse needed. File management is easier and faster through terminal. Think about the process that you move/copy file in GUI. 1) You open one Window, then navigate through folder tree with mouse double clicks; 2) You issue a copy command to the file you want to copy/move; 3) You mouse click to destination folder then paste it. Terminal based file management is just `cp /source/folder/autocompleted/with/tab/key /destination/folder` I think the true argument here is not Vim or not Vim. It's about mouse or no mouse.
- robomartin 14y ago> Vim is making a 5 seconds difference on every edit. Please. I'm on the floor laughing. Five seconds. I'm not 12 years old any more. I learned to use a stop watch a long time ago. If you want to believe your own folklore that's fine with me. In any non-trivial software project far more time --ORDERS OF MAGNITUDE MORE TIME-- is spent (or wasted) on planning, executing and, yes, fixing bugs, on software. The speed of your text editor is a rounding error in the balance sheet.
- deleted 14y ago[deleted]
- actf 14y agoInteresting argument, and I agree with you that the milliseconds saved are obviously small compared to the time it takes to design an algorithm, but I will make the following argument: It isn't only about shaving milliseconds off your coding. I realize this is mostly anecdotal, but I find when I'm editing in vim or any good IDE, I can focus more on the algorithm and less on the act of typing, and a deeper focus on your program (i.e. data structures, control flow, etc) rather than on typing, does have an advantage. Holding down the left or right arrow key while waiting for the cursor to move to the end of a line, or reaching for the end key is distracting and interrupts concentration, even if it is brief. Waiting for a cursor to move puts a greater strain on working memory because it means maintaining state information, in memory, for a longer period of time. While these distractions are somewhat minor for a single line of code, they really add up when you're' coding for 8 or 10 hours a day. In fact, I find these distractions add up to the point where I need to be editing in Vim or a good IDE to get in a state of flow. Now, before someone calls me out on it, I'd also suggest that I don't believe using vim or an IDE increases the load on working short term memory. When you're initially starting out with a new tool, obviously it does increase the working load on memory, but once the key bindings are committed to muscle memory then, almost by definition, you're no relying on working memory.
- robomartin 14y agoOf course, I do understand what you are saying. Now, also consider that your experience might not be common. I am no stranger to 16 hour coding marathons. In fact, about 15 years ago I launched a company out of my garage. For the first nine months or so I nearly locked myself in the garage for 16 to 18 hours a day coding. The work required a combination of Verilog for the FPGA, C for the embedded processor and Visual C++ for Windows. Three different editor/IDE's: Xilinx ISE, Keil uVision and MS Visual Studio. Over the nearly nine months of intense 12+ hours of straight solid coding in that environment I could not give you one example of situation where having to reach for the "END" key, the mouse, the arrow keys or "Ctrl-F5" or whatever bothered me in any way imaginable. The IDE's and the text editors, for the most part, were relegated to background noise. The things that slowed me down, caused grief and broke my short or long term concentration and my ability to maintain state have never, in my thirty years of programming, had anything whatsoever to do with the editor and the keystrokes I might have to use running it. Anecdotally I will make a blanket statement and say that this is exactly the case for the vast majority of programmers. No, I don't have data other than to say that I have worked with lots of people over my career. Across platforms, languages, tool chains and editors I have never heard anyone complain about loosing state or concentration due to the editor. Until I started reading HN. Is there a type of personality, a type of programmer that can loose state from something as insignificant to some of us as reaching for the mouse or the arrow keys constantly? Maybe, I don't know. I have yet to meet someone like that in person. If the answer is "yes", I'll have to simply take your word for it. I don't know. It might be also important to consider for a moment that those who have NOT forced themselves to use vi/vim are perfectly comfortable with the keystrokes and commands typical modern editors use. If you stick to Windows and even Linux GUI the vast majority of the navigational commands are the same that you might find in MS Word, Excel, Outlook and your web browser. The "Ctrl-C", "Ctrl-V", "Ctrl-X", "Shift-[down arrow]", "Shift-[end]", "[home]", "[end]", "Ctrl-[left arrow]", "Ctrl-F", "Ctrl-H", "Ctrl-S", "F3", "Shift-F3", mouse scrolling modes and other commands are part and parcel of this "muscle memory" a lot of vim proponents mention. In other words, nobody thinks "oh crap, I have to reach for Ctrl-F again", it just happens. And, it happens with great uniformity across platforms, applications and tools. Various tools introduce a few (or a lot) of specialize commands, like "Ctrl-F5" for "compile and go" on an IDE, "Ctrl-B" to "build" or "F12" to launch your site on a browser on something like Dreamweaver. These are not and have not been problems for anyone with whom I have ever worked. Here's what I find interesting. I was using real terminals and 300 to 9600 BAUD teletypes over real leased lines talking to mainframes towards the very tail of that era in the 80's. I even had a little bit of experience using Tektronix storage tube terminals (one of the few ways you could render APL characters at the time). All of these had crippled keyboards with half the keys we have today. Editors at the time were weird and had shit user interfaced due to the limitations of the hardware. Every single one was different. Either you had modal editors or editors with weird Ctrl-<something>-<something> keystrokes. When CPM and S100 computers came along you could get WordStar and eight inch floppies. Ctrl-K-X brother! I even owned a real DEC VT-100 terminal. I think I can safely say that those of us who came up that route were GLAD to get rid of these shitty UI's and crappy contorted-command editors that were a pain in the ass to use and learn. As keyboards and peripherals evolved and we got things like "standard" keyboard with expanded key sets (Thanks, mostly to IBM and the PC revolution) things began to standardize around the newly available keyboards. No programmer in their right mind would write a text editor at the time and IGNORE all those extra keys. The only way you could even consider writing something like vi is if you didn't have any option but to write vi due to hardware limitations. And so, what I find very interesting is that here we are, so many years later with better hardware, software, multi-monitor GUI's and computers with gigabytes of memory and direct DVI connections to the monitors and we have a class of programmers that insists that --to be effective and to be considered a professional programmer-- you have to use a tool who's only reason for being designed as it was thirty years ago is that the writer had a keyboard with half the keys, over a 300 BAUD modem, a crippled terminal, limited memory, no graphics, 80 x 25 characters and no screen buffers. Please understand how someone like me could see this as being nothing less than ridiculous. Even vi's author relates the story of having gone down the path of adding windows to vi but loosing the code in a crash and never going back to re-creating it (the implication being that vi was already on a path to become a totally different product). Anyhow, at some level, of course, to each his/her own. My problem is with vim zealots who in places like HN tend to give newbies the idea that there are magical qualities attached to adopting the "cult of vim". From my perspective nothing could be farther from the truth. And, as I have stated, from a business perspective, there are far more important and significant levers and knobs in a business to focus on than which editor you are using.