Ask HN: why not just use Eclipse?
24 comments
Some IDEs are great. Some text editors are also great.
Maybe vim can be made to do it (ctags or whatever they are called?),
Don't use ctags. Use cscope. And stop being such a pansy about configuring your tools. If you consider yourself a professional, it is worth learning.
Basically, there's no right answer to the question, but there are wrong reasons to choose. If you want to go with IDEs because you don't want to think too hard about your tools, I would say that's a bad reason. Your IDE skills are going to suck if you go in with that attitude. A better reason might be: you want to work with your code at a higher level than mere bytes in a buffer. I know guys who can make Eclipse or IntelliJ do insanely perverted things to their Java code, automatically. Good for them!
I prefer vim because I generally work in scripting languages where a refactoring IDE doesn't help much. I like the fact that my editing session can live in a screen, which can be resumed from anywhere in the world. vim+screen is the most rock-solid dev environment you can get. And since vim is so ensconced in the unix way of small tools combined, there are few features of IDEs that I can't at least emulate.
Meanwhile, my TextMate-using colleague accidentally searched for the letter 'v' in our entire codebase, and his laptop locked up for 10 minutes. The best part is that he did it AGAIN by accident a few minutes later.
Maybe vim can be made to do it (ctags or whatever they are called?),
Don't use ctags. Use cscope. And stop being such a pansy about configuring your tools. If you consider yourself a professional, it is worth learning.
Basically, there's no right answer to the question, but there are wrong reasons to choose. If you want to go with IDEs because you don't want to think too hard about your tools, I would say that's a bad reason. Your IDE skills are going to suck if you go in with that attitude. A better reason might be: you want to work with your code at a higher level than mere bytes in a buffer. I know guys who can make Eclipse or IntelliJ do insanely perverted things to their Java code, automatically. Good for them!
I prefer vim because I generally work in scripting languages where a refactoring IDE doesn't help much. I like the fact that my editing session can live in a screen, which can be resumed from anywhere in the world. vim+screen is the most rock-solid dev environment you can get. And since vim is so ensconced in the unix way of small tools combined, there are few features of IDEs that I can't at least emulate.
Meanwhile, my TextMate-using colleague accidentally searched for the letter 'v' in our entire codebase, and his laptop locked up for 10 minutes. The best part is that he did it AGAIN by accident a few minutes later.
ActiveState Komodo does it for me. Linux, Solaris, Windows and Mac.
I generally avoid IDE's fulle stop - and I find eclipse to be a complete pain to work with :(
I work in Python, PHP, C++, Perl and Html (if that last one counts ;)) so I find that a text editor (NP++ - win32 only sadly - is my current fav) and a LAMP/Py server setup work well.
It costs more in setup time but I find it makes working faster in the long run :D
(although I know for RoR/Rails it would be a bit more difficult to take this approach)
I work in Python, PHP, C++, Perl and Html (if that last one counts ;)) so I find that a text editor (NP++ - win32 only sadly - is my current fav) and a LAMP/Py server setup work well.
It costs more in setup time but I find it makes working faster in the long run :D
(although I know for RoR/Rails it would be a bit more difficult to take this approach)
But what is the pain with Eclipse? My reason for avoiding it was to get out of the mindset that all coding is complicated and can only be accomplished with the aid of an IDE. Certainly true for Java development, which would be impossible to handle without code completion, code generators and special navigation tools for the massive amount of files required.
However, some things an IDE offer are simply nice and useful, what is the point in not using them? Maybe IDEs really are a step in the evolution of software development?
However, some things an IDE offer are simply nice and useful, what is the point in not using them? Maybe IDEs really are a step in the evolution of software development?
Well (as an example) using the PHP module importing or creating a project was a complete pain (it's not simple or logical to me).
I also found it slow (expecially to close down).
I just had a lot of pain with it (quite a while ago now - hence not really rememebering the specific issues :) sorry).
I like the concept of IDE's - but I've never seen one that works really well. Eclipse always just felt bloated to me :(
As for advanced features you mentioned: a lot of text editors (I dont know about for Java but certainly for the languages i use) have code completion (which IMO would be the most important of the 3 things you mention).
I also found it slow (expecially to close down).
I just had a lot of pain with it (quite a while ago now - hence not really rememebering the specific issues :) sorry).
I like the concept of IDE's - but I've never seen one that works really well. Eclipse always just felt bloated to me :(
As for advanced features you mentioned: a lot of text editors (I dont know about for Java but certainly for the languages i use) have code completion (which IMO would be the most important of the 3 things you mention).
Wow. It's amazing to find people who still write code in a text editor. It really says something about the sad state of IDEs for most languages.
I understand that many people from the PHP, Ruby, Python, and to a certain extent, Java communities may have never seen a really good IDE such as VS.NET in action, and are therefore simply ignorant. I would guess that Eclipse has a lot to do with it too, since so many people use it as their definition of a benchmark IDE, even when it's at least one generation behind the state of the art.
At the end of the day, code is not text. It has complex relationships that can be exploited to aid your productivity. A good IDE that's continually compiling in the background is truly an amazing thing to behold.
I understand that many people from the PHP, Ruby, Python, and to a certain extent, Java communities may have never seen a really good IDE such as VS.NET in action, and are therefore simply ignorant. I would guess that Eclipse has a lot to do with it too, since so many people use it as their definition of a benchmark IDE, even when it's at least one generation behind the state of the art.
At the end of the day, code is not text. It has complex relationships that can be exploited to aid your productivity. A good IDE that's continually compiling in the background is truly an amazing thing to behold.
> Wow. It's amazing to find people who still write code in a text editor.
Umm... Why? Personally, I find it amazing how much some developers rely so much on IDEs and are unable to write even the most trivial programs in a text editor. An IDE can be a crutch that will slow you down in the long run. Sure, they're great for verbose languages like Java and C#, but they have very little to offer when developing in some of the other languages you mentioned.
Umm... Why? Personally, I find it amazing how much some developers rely so much on IDEs and are unable to write even the most trivial programs in a text editor. An IDE can be a crutch that will slow you down in the long run. Sure, they're great for verbose languages like Java and C#, but they have very little to offer when developing in some of the other languages you mentioned.
Do you honestly have the entire class library for your language memorized? And all the member names of all your classes? And all the public interfaces of all the 3rd party libraries installed on your machine? And the entire Windows API?
Do you never deal with long member names that would benefit from a quick ctrl+space?
Are you really that quick at opening code files and scrolling down by hand to method definitions?
Do you genuinely prefer to use command-line tools to search your codebase? And replace? And if so, how do you safely rename variables, methods and member names?
I don't think that language choice has all that much to do with it. I'm currently working on a medium sized Python project, and spend maybe an hour a day cursing Eclipse for not knowing the contents of my own classes, let alone the Python and Django libraries. Honestly, I don't feel sped up!
Do you never deal with long member names that would benefit from a quick ctrl+space?
Are you really that quick at opening code files and scrolling down by hand to method definitions?
Do you genuinely prefer to use command-line tools to search your codebase? And replace? And if so, how do you safely rename variables, methods and member names?
I don't think that language choice has all that much to do with it. I'm currently working on a medium sized Python project, and spend maybe an hour a day cursing Eclipse for not knowing the contents of my own classes, let alone the Python and Django libraries. Honestly, I don't feel sped up!
...And the entire Windows API?
Quite simply, you've shown why some of us prefer to work with compact frameworks in the online space.
The normal web stack, as a vocabulary, is really only a few thousand "words" in size: HTTP verbs, HTML tags, CSS selectors, JavaScript/jQuery/etc. API, and your choice of agile web framework interfaces (perhaps with a little SQL mixed in for good measure).
Once you're relatively literate in the weird pidgin that is the modern web stack, it's pretty easy to rely on the auto-complete engine already wired into your head.
If your class member names are too long, or your method defs are buried inside some 10Kloc monster source file, perhaps you should consider some light refactoring to clean things up. Similarly, if you find yourself heavily relying on search-and-replace outside of single files, you may may have a bit of a coupling problem in your system.
Quite simply, you've shown why some of us prefer to work with compact frameworks in the online space.
The normal web stack, as a vocabulary, is really only a few thousand "words" in size: HTTP verbs, HTML tags, CSS selectors, JavaScript/jQuery/etc. API, and your choice of agile web framework interfaces (perhaps with a little SQL mixed in for good measure).
Once you're relatively literate in the weird pidgin that is the modern web stack, it's pretty easy to rely on the auto-complete engine already wired into your head.
If your class member names are too long, or your method defs are buried inside some 10Kloc monster source file, perhaps you should consider some light refactoring to clean things up. Similarly, if you find yourself heavily relying on search-and-replace outside of single files, you may may have a bit of a coupling problem in your system.
As a vimmer who has used Visual Studio in the past:
- Auto-complete can done in emacs and vim, too. There's an older vi-style completion which just completes from existing tokens in the current file (Ctrl-P) and a newer "omni-complete" (Ctrl-X-O) which is a bit smarter. For better poking around, keep an IPython session running.
- Don't scroll by hand in vim. There are keybindings for all kinds of jumping around and finding the declaration or definition you need.
- Search and replace: I'm surprised you would doubt this. Vim itself is a search/replace/insert filter; there's no dialog you bring up; full regular-expression navigation and substitution is always active. That's why a couple of keystrokes is usually faster than reaching for the mouse, for vim and emacs users.
- Command line: Yes! Search, replace, sort, find a declaration, pull up the documentation for a function, run a documentation generator, interact with the version control system -- most of it's build into the editor, and for what isn't built in, the editor gives easy access to the system shell. It's perfectly reasonable to build and edit your code with vim in one window, perhaps split into a few buffers, while playing with the resulting program in a terminal window next to it. For an interpreted language like Python, you don't even need to restart the interpreter, just reload the modules after they change. Thanks to this design, all of this works just as well over an ssh or telnet session.
Vim/vi is built for Unix; on Windows, without Cygwin, it's fairly crippled compared to a system that's fully integrated with the operating system. Unix was made to be programmable, and the shell gives significant help for inspecting the system and connecting different programs together. So a text editor that gives direct access to all of these capabilities and builds on top of them is very powerful -- assuming you already know how to use the shell effectively. For VS, it's the other way: VS makes Windows programming reasonable, while doing the same things without the IDE's substantial help (perhaps the way it is in Eclipse) is brutal.
- Auto-complete can done in emacs and vim, too. There's an older vi-style completion which just completes from existing tokens in the current file (Ctrl-P) and a newer "omni-complete" (Ctrl-X-O) which is a bit smarter. For better poking around, keep an IPython session running.
- Don't scroll by hand in vim. There are keybindings for all kinds of jumping around and finding the declaration or definition you need.
- Search and replace: I'm surprised you would doubt this. Vim itself is a search/replace/insert filter; there's no dialog you bring up; full regular-expression navigation and substitution is always active. That's why a couple of keystrokes is usually faster than reaching for the mouse, for vim and emacs users.
- Command line: Yes! Search, replace, sort, find a declaration, pull up the documentation for a function, run a documentation generator, interact with the version control system -- most of it's build into the editor, and for what isn't built in, the editor gives easy access to the system shell. It's perfectly reasonable to build and edit your code with vim in one window, perhaps split into a few buffers, while playing with the resulting program in a terminal window next to it. For an interpreted language like Python, you don't even need to restart the interpreter, just reload the modules after they change. Thanks to this design, all of this works just as well over an ssh or telnet session.
Vim/vi is built for Unix; on Windows, without Cygwin, it's fairly crippled compared to a system that's fully integrated with the operating system. Unix was made to be programmable, and the shell gives significant help for inspecting the system and connecting different programs together. So a text editor that gives direct access to all of these capabilities and builds on top of them is very powerful -- assuming you already know how to use the shell effectively. For VS, it's the other way: VS makes Windows programming reasonable, while doing the same things without the IDE's substantial help (perhaps the way it is in Eclipse) is brutal.
Of course I don't memorize everything. I do memorize the things I use most often so that code completion is hardly necessary. This takes much longer to do when you have a crutch to lean on. I typically have my code on one monitor and documentation on another when dealing with something unfamiliar.
I definitely agree with you on the Eclipse issue, though. It's just a bad IDE and people just keep using it. It's sort of like the IE of IDEs.
I definitely agree with you on the Eclipse issue, though. It's just a bad IDE and people just keep using it. It's sort of like the IE of IDEs.
How would they slow you down?
Even with less verbose languages, after a while there will be a fair amount of functions, objects (maybe), modules... Why would an IDE not be useful in navigating those?
I recently had a 500 lines Javascript program and some navigation features would have really helped (and 500 lines is not much).
Even with less verbose languages, after a while there will be a fair amount of functions, objects (maybe), modules... Why would an IDE not be useful in navigating those?
I recently had a 500 lines Javascript program and some navigation features would have really helped (and 500 lines is not much).
Even just typing can be slower in an IDE as it looks for ways to complete the code for you. Compiling in the background and code analysis takes a toll too. I also find the little completion popups distracting at times. Same thing with code folding. I guess it's just a personal preference. I know all those things can be adjusted or turned off, but at that point I might as well use just use the best text editor available. When I'm using Java I consider an IDE almost necessary and I use IntelliJ, but for pretty much everything else I prefer Emacs or EditPadPro.
Developing with a text editor is definitely slower at first as you commit things to memory that an IDE may take care of, but in the long run I think it pays off since you're not bound to a particular tool. I've seen enough developers that can do next to nothing without an IDE. I don't want to be one of them.
Developing with a text editor is definitely slower at first as you commit things to memory that an IDE may take care of, but in the long run I think it pays off since you're not bound to a particular tool. I've seen enough developers that can do next to nothing without an IDE. I don't want to be one of them.
Hm, I never had speed issues with Eclipse. I tried Netbeans recently because it supposedly has good Rails integration. For some reason I found it unusable - now that you mention it, I think Netbeans was indeed going a bit overboard with helpers, background compilation and stuff. But as I said, I never felt such pains with Eclipse. Working on a 1,2GhZ mobile CPU, so not the fastest computer, either.
So what you mention can indeed be an issue, but hardly a reason to dismiss IDEs in general.
So what you mention can indeed be an issue, but hardly a reason to dismiss IDEs in general.
Don't get me wrong- this isn't a blanket dismissal of IDEs. I was just responding to someone who was amazed that there are still people that write code in text editors. I believe in using the right tool for the job and there are cases that call for a text editor as well as cases that call for an IDE.
I actually happen to use an IDE on a Java project every day at work. I think Java can be a difficult language to work with otherwise. It's verbose so you end up with an enormous amount of code and there's a very slow feedback cycle. These are areas where an IDE can really help.
I rarely find myself wanting an IDE when I'm coding in Perl, Python, Javascript or pretty much everything else I use. Then again, maybe it's because I haven't seen an IDE with much to offer other than code completion when working with these languages. I have almost zero need or want for code completion. For me, some of the best an IDE has to offer is the ability to find things quickly and refactoring. Many of them don't do a particularly good job at this with languages other than Java.
I actually happen to use an IDE on a Java project every day at work. I think Java can be a difficult language to work with otherwise. It's verbose so you end up with an enormous amount of code and there's a very slow feedback cycle. These are areas where an IDE can really help.
I rarely find myself wanting an IDE when I'm coding in Perl, Python, Javascript or pretty much everything else I use. Then again, maybe it's because I haven't seen an IDE with much to offer other than code completion when working with these languages. I have almost zero need or want for code completion. For me, some of the best an IDE has to offer is the ability to find things quickly and refactoring. Many of them don't do a particularly good job at this with languages other than Java.
True, not much on offer as IDEs for other languages. At least Eclipse gives a code outline for JavaScript, though.
> It really says something about the sad state of IDEs for most languages.
I haven't seen any IDE that has a text editor that's anywhere near the likes of Emacs or Vim. I'm sure people wouldn't mind some of the functionality of an IDE, but rate having a good text editor a more important feature.
I haven't seen any IDE that has a text editor that's anywhere near the likes of Emacs or Vim. I'm sure people wouldn't mind some of the functionality of an IDE, but rate having a good text editor a more important feature.
Try watching a skilled emacs or vi user who never moves their hands off the keyboard. Once you are skilled enough, the mouse-based IDEs just don't offer enough support for editing text.
I like Vim, so I use Netbeans with the jVi plugin when I need an IDE.
I would use Eclipse because of its more extensive language support, but there are no decent plugins that offer vi style navigation AND code-completion.
I really can't stand using an IDE, but I understand why others would. There is just too much going on and it just seems to get in my way. Give me a decent text editor and a couple terminals and I'm ready to go.
You can get decent file navigation in Emacs by using Nav (Google for emacs nav), but it won't help with other Eclipse features that Emacs doesn't have.
About refactoring of scripting languages, Python has Rope, with bindings for Vim and Emacs. It's not a comprehensive or bug-free solution, but it's a start and has at least one solid developer. I submitted a report for a tough Rope bug and one of the Rope developers fixed it in a few days.
About refactoring of scripting languages, Python has Rope, with bindings for Vim and Emacs. It's not a comprehensive or bug-free solution, but it's a start and has at least one solid developer. I submitted a report for a tough Rope bug and one of the Rope developers fixed it in a few days.
IMHO nothing comes close to IntelliJ. Whether it be Java, Grails, or Rails. It's a pleasure to use. I did a stint of using Textmate (which is a brilliant texteditor), but just lacks the refactoring tools that IntelliJ provides.
I'm told NetBeans has considerably better JRuby support and integration than Eclipse.
I've tried Netbeans recently and couldn't stand it. Don't remember why, but another comment here makes me think that NetBeans was maybe really doing too much code completion, helper popups and what not.
Also I think it only did "menu entry for generator script", just like the Eclipse plugin. Maybe it was better at code completion, but I would really like some helper for the generator scripts, because I don't know the command line options by heart (and don't want to memorize them, either).
Also I think it only did "menu entry for generator script", just like the Eclipse plugin. Maybe it was better at code completion, but I would really like some helper for the generator scripts, because I don't know the command line options by heart (and don't want to memorize them, either).
For example, the Rails plugins for Eclipse I have seen were really crap. Basically, they provided a dropdown menu for the rails generator scripts - big deal. I would like to create something that is a little bit more context sensitive, for example it could at least offer command line completion for the rails generator scripts (so if one generates a migration, you don't have to look up the column types in a book).
I have now tried vim for a while, but find that I only use the basic functionality because I am too lazy to look up how things work all the time. Right now I lost patience when I couldn't edit two files in two windows, and I simply switched to gedit for the time being. I have been an Emacs user for years, but also never really liked it - mostly because of the way it handles multiple windows and buffers.
I would consider switching to gedit, it seems nice and easily scriptable (Python), but I don't like that it is not cross platform (I presume it isn't). If I invest in learning a dev environment, I would like to have it available on Unix, Windows and OS X.
Ultimately, I wonder if Eclipse is really so bad? Why waste time configuring those "basic" editors to feature something remotely offering the tools of eclipse? By this I mean among other things integration into versioning tools (subclipse - haven't looked into git yet), bug trackers (Mylin - trac), and also structural navigation of code. For example I was working on a javascript game and really would have liked to be able to jump to functions by clicking on them, and Eclipse provides that. Maybe vim can be made to do it (ctags or whatever they are called?), but to get it to do it would be a major effort involving hours of googling for tutorials. And most likely, it would still not be as nice...
What are your thoughts? What would you recommend?