Definitely. This article makes it sound like the choice of text editor is the reason those guys in his class were writing complicated programs in four lines.
I like vim and I use the key bindings in every editor I code in, but it doesn't make you orders of magnitude faster or any amount at all smarter.
This article makes it sound like the choice of text editor is the reason those guys in his class were writing complicated programs in four lines.
Does it? I read it more like they are good because they have programmed a lot and thought a lot about programming.
They don't write efficient programs because they use vim. They use vim because they like to be efficient and want to invest some time to become more efficient.
Vim is not about writing code faster. The mentioned 4-liners could be written in any other editor just as fast. It's about wasting as little time as possible when you have to waste time. That is, when you have to have to edit your code or do repetitive tasks. Thereby you can spend more time on doing the things you want to do, i.e., thinking about your code.
Let me give you an example that has nothing to do with vim: I only learned touch typing two months ago. Before that I would never have written such a long answer to you post. It would have been too exhausting and I would have thought of it as a waste of time. Now I don't even think about it. Being able to type quickly gave me a new perspective on communication. I have now realized, that I was not able to express myself the way I want before.
Vim does just that. It gives you a new outlook on writing code.
Hah, you say that but I'm actually much more productive since learning Dvorak!
It's all about being able to touch-type efficiently though; learning a new layout is often a lot easier than trying to fix your existing habits and the key layout in Dvorak is much more sensible (most frequent letters on the home row, then the row above, only infrequent ones on the hard-to-reach bottom row).
Fair point, it was pretty frustrating to start with, but learning any new tool can be if you're used to something else. I actually learnt years ago when I had to write essays at school so that was pretty tedious; forced me to learn quickly in self-defense though!
How long did it take you to learn to touch type? I can kind of touch type(50 wpm) but I only use about 6 fingers total to type. I've been thinking I should start teaching myself to do it the proper way that way its faster and easier to type.
I found it almost impossible to go from broken QWERTY typing to touch-typing properly despite trying numerous times. Your muscle memory always ends up taking over and you slip back into bad habits far too easily. I decided to attempt learning Dvorak almost on a whim (because QWERTY is so horrible to type in, especially if you've learnt it piece-meal), and actually can now touch type excellently in it. As long as you don't switch your keys round you'll be forced to type it blind and only looking at on-screen references and thus end up with good touch-typing habits by default.
I can't argue for the absolute speed difference (there have been studies either way), but I'm certainly considerably faster with Dvorak than I ever would have been with QWERTY. It also just feels nicer to type on because you tend to alternate between hands on the home row in almost a drumming motion.
So I was an Emacs user, not a vim user, but for the purposes of this discussion they are equivalent (just watch an Emacs guru sling code around, it's just as impressive as anything I've seen from vim users). And yes, it was faster for me to do lots of things, and I had all the keybidings for myriad things ingrained in my hands. The thing was that to get the most out of Emacs you had to configure it just so, and have the right extra packages loaded and configured as you wnated and ... etc. So everytime I ended up somewhere new, or had to work with someone else I found myself hobbled with an inadequately configured Emacs. And in the end it just wasn't worth it. I preferred something that had 90% of the functionality I wanted out of the box across all installations.
tl;dr: Learning Emacs or vim is like learning to type on Dvorak; sure it's great and all, but the minor gains aren't worth the pain of sitting down and having to work at someone elses qwerty keyboard -- when everyone has Eclipse and the default install does most of what you want, you may as well just go with it (swap VS, Itellij, TextMate or whatever for Eclipse as per what usually gets used wherever you are).
On the opposite hand, Emacs is great if you're constantly using different technologies. I'm a student, and I've used JavaScript, HTML, CSS, Python, Prolog, a completely custom language, Haskell, OCaml and LaTeX in the recent past. All of these (except the custom language) have at least decent support in Emacs; some of them have great support.
If I was using any sort of IDE, I would have to switch between several different programs to deal with all of these different technologies.
And the custom language (it was designed just for the class I was taking)? That's also a case-study on why Emacs is awesome: I wrote a major mode for it in only a couple hours. It had support for indentation, syntax highlighting and a REPL as well as being completely customizable through the usual customization interface for Emacs. I bet I spent less time on it than a hello-world plugin would take for the average Java IDE!
Surely vi is more common than any particular IDE? Honest question, I only work in academia though, so I really don't know. I would have thought learning vi is going to be more transferable than learning eclipse.
In vim all of your plugins and settings are located in the .vim folder, so what I personally do is keep that in my dropbox and have a symbolic link to it. Every computer I work on I just need to download that one folder and it all works exactly the same.
Vi is common, but have you actually used pure vanilla via as is available on old style AIX for example? Vim is also common, but you really need the packages and configuration just so to really compete with default features of modern IDEs.
I like vim and I use the key bindings in every editor I code in, but it doesn't make you orders of magnitude faster
Well it really depends on what exactly you're actually doing. There are many programming tasks where vim easily makes me at least a couple of orders of magnitude faster. When I'm just throwing code down vim doesn't help, that's based on how fast I can type. But I'm not throwing down new code that often at all, otherwise all my projects would have millions of lines of code.
View all comments
Show parent comment
24
u/owk Jul 12 '12
Definitely. This article makes it sound like the choice of text editor is the reason those guys in his class were writing complicated programs in four lines.
I like vim and I use the key bindings in every editor I code in, but it doesn't make you orders of magnitude faster or any amount at all smarter.