Ask HN: IDE versus Text Editor?
My question is this: if you invest the time in getting very proficient in a Text Editor like Emacs or vi, what type of return do you get? Please include an estimated number in your answer(ie. I am 10%, 50%, 500% more productive developing Python/Java/Ruby/other using Emacs versus IDLE/Eclipse/Arachno/other).
I continually go back and forth between using an IDE versus using Emacs/vi. I keep giving the latter two a few hours each here and there but haven't invested the time it takes to make it worthwhile. Most of what I write is Python, followed by PHP, JavaScript & SQL.
EDIT: Also if you've written your own editor/IDE, please mention that(it's one option I've been prototyping with).
33 comments
[ 4.0 ms ] story [ 102 ms ] threadI'm not a vim expert, I actually know the minimum you need to do work, and I've found it very good, but I hove almost no experience with other editors or IDEs. I do mostly python and I don't really need an IDE for that. Despite its learning curve, I've found vim to be really easy to use, once you get used to it, your muscle memory does all the work for you. Considering the time you work in an editor/IDE, i suggest just sticking to the one that makes your hands hurt the least.
i had to use ed during installation to change the fstab (from sd0a to wd0a) of a 2.5" hdd mounted on usb
important step coz o/w rebooting from sd0a 2.5" ide put me to single user w/ read-only fs (too late for ed)
Often, I don't have but a terminal, and there vim shines.
I wouldn't write my own editor until I had learned all three of those editors. After that... I still wouldn't write my own editor. ;) Spend your energy on a problem that urgently needs solving.
Now to your question: First, I can't answer it, because I'm not really a user of any IDE. Second, I think it is ill-posed. It's like asking which is more productive: using emacs, using Ruby, or using Excel. If you're an expert in one of these tools, you can use it to replace the others to some extent (I just encountered a programmer who was using Excel to compose hundreds of SQL queries. I have to admit that it works, although it would never occur to me to do this; I'd reach for emacs instead or, failing that, Ruby or Perl.) But, in general, these three tools are designed for different problems, and each tool has its sweet spot.
There are languages for which the vast majority of programmers use an IDE. (I'd probably use one if I had to do any Java programming; Mac development in Objective C might tempt me to use XCode to write code; I'm pretty sure .NET programmers use Microsoft tools.) But you become a different kind of programmer when you use something like emacs instead. For one thing, your text editor can be used to edit anything that is made of text: Python, PHP, Javascript, SQL, C, Ruby, Perl, Lisp, Haskell, Erlang, Java, shell scripts, config files, HTML, CSS, LaTeX, directory listings, version-control logs, long emails, documentation, outlines, to-do lists, blog entries, Wikipedia articles... ad infinitum. If you improve your emacs skills, your skill at editing all of these things increases. If a new language comes along, or a radical new way of using an old language, you needn't be one of those tiresome people who sits on the sidelines, complaining, because the New Thing lacks IDE support: You've got an editor that works fine with the New Thing, and which you already know how to use, and you can incrementally improve that editor by teaching it some New Thing macros, and before long someone (maybe you!) will write some emacs modes to support the New Thing.
Meanwhile, emacs skills do not become obsolete. The editor is quite possibly older than you, and will almost certainly live as long as you. It's cross-platform and open-source. Because it is not tightly tied to one language, platform, version-control system, workflow, or vendor, it has transcended and outlived all of these things.
Yes, I get that. Funny, I actually do use Excel a lot to edit a lot of these things and don't think I could improve my productivity in any of them more than 10 or 20%. My real question is how much it would help me in the language I spend 80% of my time in(Python now), versus an IDE that was built specifically to help people writing Python.
But you make a good case and I'll probably go harder into emacs(I do use vim a fair amount now, and will try TextMate when I get that mac.
Things that emacs can do for most of the languages in that list (after you install some appropriate emacs modules) that I doubt Excel can do very easily:
Syntax highlighting (the emacs term is "font-lock"). Auto-indentation based on language syntax. Auto-completion of symbols based on the contents of open files (if you've defined a constant "MECHFISH" in a file, and you type "MEC" in another file and press a keystroke, the system fills in "MECHFISH". Press the keystroke multiple times to scroll through multiple possibilities.) Snippets (type "func" and press Tab; your editor inserts the skeleton of a function definition for you). Integration with your version control system (git, in my case). Navigate from one of two dozen open files to another without moving your hands from the keyboard. Browse directory trees in panes, picking out files for editing -- or run a shell command across a bunch of selected files. Search-and-replace using regular expressions. Recursive grep through directory trees (I use emacs igrep-mode for this.)
This is by no means an exhaustive list. So suffice it to say that if you can't get more than a 10% "productivity" improvement by swapping emacs for Excel, you must be one hell of an Excel power user!
Incidentally, don't spend too much time bouncing from vim to emacs to TextMate. These editors take time to learn. Pick one and focus on it. Read some blogs and some wikis. Get really good at your editor of choice.
How is that even possible? I'm not trying to be snarky or anything, I seriously want to know what your workflow is. It never would have occurred to me to use Excel for editing SQL queries; and as for Lisp or config file or HTML... how?
That explains the funny smell.
If I had to choose between the 3 I'd go with Emacs and I don't know how much more productive but well in the range of "enough". We code everyday in mostly the same place so learn your tool and enjoy it.
With Python and Ruby, I find a text editor sufficient and usually I'm doing web work with those languages which is perfect for vim/emacs over SSH.
PHP tends to have a huge library of builtin functions and it uses positional arguments (you can't call a function with arguments out of order denoted by keyword like python). I've found an IDE to be helpful for PHP in the past. SQL isn't a big language. As such, I can't see an IDE helping. JavaScript, with libraries becoming the preferred way to code, doesn't seem like an IDE could do much unless it understood the library.
And JavaScript the library is key(jquery for me). Though a good syntax checker would be nice. I think I spend too much time debugging semicolons in JS.
I've seen people use Eclipse for Perl, which make very little sense to me. Sure, you can use it, but personally I'm at least 10x - 15x more productive if I use vi.
But for Java, Eclipse is awesome. The ability to find what methods are available and other great tools Eclipse provides blows a lot plugins/extensions out of the water.
There is no one editor to the rule them all... :)
do without mouse and hard-to-reach keys (F1-12, arrows, numpads)
i found ide is about using mouse and using those keys (like F5? to run) etc ... but i didn't use much ide shrug
in vim, you can take those keys plus backspace, alt and even esc (i map it to ^C because ^] hurts, not because of emacs) ... also xmodmap caps to ctrl
emacs still requires at least a meta key so that adds complexity. vim cheats by using modes :D
with fewer keys, the intensity = (strokes / #key) is high and that may lead to higher productivity
oh and of course, touch typing really helps especially the often untrained part like numbers and symbols.
i used 'typing tutor for mac' and trained streams of letters, numbers and symbols ... like 'aJ8@9)x|W,~2'
1. Project size. It's usually easier to get an IDE to build your project, parse any errors, and show the right lines of code in a debugger, than it is to get a good compile/fix/debug cycle setup in Emacs.
2. Language complexity. There's a lot of variance between languages on what your text editor will support in terms of parsing, symbolics browsing (e.g. a class browser, function popup, etc.), and what you need for that language.
Integration with Common Lisp (SBCL at least) and Python are both also excellent.
I can't speak about other languages/systems but all the ones I use extensively have really tight emacs integration. Perhaps Java integration is weak?
On C++, it's harder when you start using templates. Seems only systems with tightly-integrated compilers do a decent job here.