
Ask HN: IDE versus Text Editor? - breck
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).<p>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 &#38; SQL.<p>EDIT: Also if you've written your own editor/IDE, please mention that(it's one option I've been prototyping with).
======
mdasen
It depends on the language. With Java, I get a huge return because the IDE can
take care of so many mundane things like getters and setters. Java also
sometimes has odd names used in its standard library (for example, you use
queue.offer() and queue.poll() to add and remove things rather than something
like 'enqueue' and 'dequeue' or the standard push/pop. An IDE prevents me from
having to deal with looking it up constantly.

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.

~~~
bdotdub
I agree too. It really comes down to what helps you the most and what the best
tool for the job is for you.

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... :)

------
mechanical_fish
First: If you think you want to write your own editor, you've answered your
own question. You need to learn emacs, vi, or TextMate immediately, because
these are editors that make it very easy to change their behavior by writing
your own custom extensions.

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.

~~~
breck
>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,

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.

~~~
Niten
> Funny, I actually do use Excel a lot to edit a lot of these things

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?

~~~
breck
A lot of what I do is taking data from one source(ie an HTML table) and
throwing it into a database. Sometimes cutting/pasting into excel, then
quickly formatting it, is easier than writing a regex to get it done.

------
tsally
The bottom line is that you need to work with something that you can extend.
To suggest that the IDE/Editor designer is going to be able to anticipate all
of your needs is silly. Instead, learn something like Emacs which you can
extend with Emacs Lisp. Heck, Eclipse is fine if you take the time to learn
how to write Eclipse plugins. Eventually you will reach a point where you
start running into unique situations for which you require a unique solution.
Being able to code your own is the only way to go.

------
pavelludiq
Vim for the win!

I'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.

------
donw
I'll put in another vote for Vim, but I'm biased, as I'm a systems guy by
trade. Losing my skills with vim would be death, because it's often the only
working editor on a truly hosed machine.

~~~
Niten
Nope, that would be ed :) I had to use ed to rescue an OpenBSD VPN endpoint a
year or so ago.

~~~
donw
Point. I've had to use ed as well, but generally speaking, in all but the most
dire of circumstances, vi will run -- I think on Solaris that vi is still
statically linked. Even so, ed works very simmilarly to vi (including
movement, search, save, and so on), so it's a lot easier to fix something with
ed if you're a vi user. :)

------
keefe
I used to develop in emacs/jbuilder now I am fully in eclipse. I miss multiple
copy buffers and good keyboard shortcuts. To me, the value added by the IDE -
autocomplete, extra method, generate getters and setters, find references
completely, utterly and totally blow text editors out of the water. I wouldn't
waste my time reinventing the wheel on a new text editor. If I were super
motivated, I'd write eclipse plugins to do whatever I needed. However, I work
on an eclipse RCP based project to pay the bills so I already had the learning
curve financed by my job. That being said, I find vanilla eclipse sufficient
for most of my needs.

------
urlwolf
I use vim and do R, ruby, and python mostly. Still, recently I've spent more
time with IDEs and now I can appreciate them. Netbeans is a very good RoR IDE.
I'd prefer it over Vim. for Python, the IDE that I like (and current favorite)
is IDEA. Basically it's a matter of how big your project is; with 10s of
thousands lines of code, I prefer an IDE, and also when you are learning the
language or reading someone else's code.

Often, I don't have but a terminal, and there vim shines.

------
travisjeffery
I always bounce around between Emacs, Vim and TextMate I've tried IDEs but
their typically not native code, have shitty keybindings, are slow as dog crap
and need to be custmized with entire plugins rather a few lines of elisp,
python or whatever.

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.

------
lallysingh
Two main issues come to mind:

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.

~~~
mdakin
emacs's integration with C/C++'s compile/build/debug cycle is insanely good.
M-x compile and M-x gdb work perfectly.

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?

~~~
lallysingh
Compared to how well you're coddled in something like Netbeans/eclipse, it's
tough to be satisfied in Emacs. They'll search the entire classpath (not just
the classes you've written) and find every match that could be usable in the
given situation (according to your import declarations), using your project
definition for class file resolution.

On C++, it's harder when you start using templates. Seems only systems with
tightly-integrated compilers do a decent job here.

------
TheBosch
I know I'm on the outside with this, but I don't even think I'd want to
program without an IDE anymore. Not only do they save time, but I find they
also save MISTAKES which one of the most valuable things out there. For
example, how many times have you had that one variable or reserved word
misspelled by one character and it took you how long to find it?

------
jason
I use IDE's that have vi keyboard mappings so I get the best of both worlds.
Visual Studio and Eclipse both have vi plugins.

~~~
bdr
Same here. I highly recommend WingIDE for Python development. The vim mode is
pretty complete and they have been responsive to any bugs I report.

------
gcv
If you are interested in text editors, you should read The Craft of Text
Editing (available at <http://www.finseth.com/craft/>). In spite of its Emacs-
centric seeming subtitle, it discusses a lot of the basics of representing
text and implementing an editor.

~~~
lallysingh
Interesting read, but I _have_ to quote this part:

    
    
      2.4.4 Fancy Modems
    
      High-speed modems (9600 bps and higher) are starting to become quite common.

~~~
llimllib
someday... that 14.4 US Robotics modem will be _mine_!

------
hs
to increase productivity, you may need to 'do without'

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'

~~~
keefe
You can setup keyboard shortcuts to be whatever you want in eclipse.

------
st3fan
I am 10x more productive developing Java using IntelliJ IDEA versus anything
else :-)

~~~
breck
its funny how this is the only response that included a hard number estimate.
i take that to mean the improvement from a text editor versus an ide is not an
order of magnitude.

------
mdakin
emacs's "keyboard macros" feature is something I've not seen in any IDE and
when you master it and start getting creative with it you can save insane
amounts of time. Basically any time you need to make a bunch of changes of the
same pattern to a file you can teach emacs how to make the change and then
tell emacs to make the change X more times to the file. When you are
accustomed to this feature and you need it and it's not there it's INSANELY
frustrating! But then you remember you can just start up emacs so it's not
really a big deal at all. :)

~~~
kaens
I could have sworn that most "programming" editors support macros, just not to
the extent that emacs does.

