Ask HN: I'm done with the IDE. What's a good alternative?
To me, the modern IDE has become so bloated these days I dread to even think about firing one open and letting it consume a horrendous amount of resources.
So what's the alternative? People have spoken about Vim and Emacs and all the others, but I'm not very well versed in either. I've been using Vim for quite a while to write simple scripts so I'm used to the commonly used keyboard commands, but I'm still a bit confused about how people use their preferred editor as a full blown development environment. Vim to me seems like an ever expanding series of configuration files and keyboard tricks to get something remotely powerful.
What I'm asking is, what is the alternative to the modern IDE? How have people managed without one? Or do we just have to except the fact that the IDE is something we can never get away from?
122 comments
[ 3.5 ms ] story [ 190 ms ] threadThat said, certain types of work for customers is most easily done in an IDE, for example .NET or Win32 stuff (Visual Studio), iOS programming (XCode) and Nintendo game consoles (CodeWarrior), so I use those where appropriate.
It's probably not an optimal approach and it certainly earns me zero respect from my peers using vim or emacs (or eclipse...). Considering how varied my work tends to be, relying on a cluster of totally independent tools actually works pretty well.
[1] I do use vim for shell scripts and configuration files. iravpPdwq!/?: are the only commands I know, however.
So use a text editor (any one) and then compile your code, commit it to the repository, etc etc from the command line. Or using other tools.
Or, realize that IDEs are designed to combine all that together and you'd rather have it do the work instead.
Personally, when coding languages that don't need to be compiled, I use Vim/GVim/MacVim (depending on what system I'm on) and the command line for everything. For languages that need to be compiled, it's just easier to use the IDE.
While I mostly agree that this is true, the best IDEs allow you to get your thoughts on the screen much quicker. This goes beyond allowing you to type faster.
When I'm writing code, I find that a lot of times, my mental "stack" can grow deep, especially when you try to write code with smaller methods. I start to write method A, which has a section I extract into method B, which has logic in method C, but slightly different. So I start refactoring method C, etc.
A good IDE allows me to accomplish all these much faster, including updating all reference to the refactored method C, while still keeping track of my train of thought, allowing me to go back to method B and remember what I was trying to do there, then back to A.
It's been said a lot of times here in HN that most of your time writing programs isn't spent on typing code, and that's true. However, once you do start typing, a good IDE can help quickly get your thoughts converted to correct, compilable code (proper reference names included), and I find that it helps a lot.
It took me about a week to feel really comfortable with it, but now I'm really glad I didn't give up. I still learn new shortcuts every other week.
Personally I do mostly Ruby development, so I use VIM plus a host of plugins that are Ruby-specific. If you develop in another language then there are probably a host of plugins that make that language easier to work with.
In general though you are correct that you will have to tweak more to get VIM or Emacs to work for you - an IDE is essentially an environment that has already been tweaked for you.
It would be good if there was some sort of package you could download that sets up your development environment (Vim + plugins + configuration file) for a particular language.
At the moment it's just a personal preference and I'm finding it difficult to find what's useful or not
I've never understood that statement (I've programmed Java for 10 years, using a text editor). I think I'm effective.
For better or for worse, most of that tooling is implemented as an IDE command/plugin. Command-line refactoring tools are way rarer. For example, <http://stackoverflow.com/questions/704062/are-there-any-open...; was asked a year ago, but the top answer lists software that, according to it's website, was Last released seven years ago.
So, IMO, that 'require' may not be absolute, but it certainly is pragmatic.
What makes you think you are effective in Java? Do you know what you are missing?
The argument I've heard many times before is that you must use an IDE with Java because Java is overly verbose.
I'm effective in Java in that I achieve what I want to achieve. The bottleneck has never been speed of typing/refactoring etc.
For Java, you can take a function in isolation, search its source file for import statements, and tell me what the variables, statements and expressions are. C# was in the same boat, but with LinQ, I think it gave up that idea. Now,
Nonsense. A very small category of behavior exists where static parsing of Perl 5 cannot determine whether a given program is valid. That's all. It's possible to write a pathological program which has two valid and working parses, but I've never seen it and it's an intellectual game, not a trap waiting to snare an unwary programmer.
(I have no idea what "an identifier or a function name" means, as Perl uses sigils to distinguish between variables and function names.)
See http://www.modernperlbooks.com/mt/2009/08/on-parsing-perl-5.... for details.
For C#, I don't mind VS2010. My laptop handles it just fine, though, yes, it's a bit slow on start-up, but once it starts, I can just leave it open for days and days. I do, however, use the VIM extension.
For all other stuff (Perl, ColdFusion (really), Javascript), I use gVim.
I think C# needs an IDE like VS more than Java, if only because it doesn't have a standardized high-quality documentation tool equivalent to javadoc. For many .Net libraries, intellisense is the only source of documentation, and MSDN docs are rarely very helpful.
http://swtch.com/plan9port/
http://acme.cat-v.org/
Don't forget Acme-Sac for windows http://www.caerwyn.com/acme/
P.S. I would like to know if someone spots mistakes or suggest enhancements, thanks :-)
I don't mean to be rude but to me this folder is just a collection of your configuration files. What I really want to know is what your configuration is, what changes have you made to make your environment usable and useful to you?
It took (still takes) a lot of time to learn Vim. At first I used it as notepad with syntax-highlighting with auto-indent. That is, I immediately entered insert-mode and kept in there for as long as I could. But slowly I've started to learn myself how to truly use Vim. Nowadays I try and exit insert mode as quickly as possible (sometimes after typing just one or two letters).
Every once in a while I stop and reflect on things I do very often, look up ways to do them faster and then try and train those ways to be a habit. I learned most of these things from Bram Moolenaar's presentation "Seven habits of effective editing" (http://www.moolenaar.net/habits.pdf and http://video.google.com/videoplay?docid=2538831956647446078) most of this talk probably holds for emacs too.
Examples: when I need to rewrite a function arguments nowadays I just type "ci(" which does Change Inner parenthesis, it deletes all text between the enclosing parenthesis and puts me in insert mode to start typing. If I need to move more then 5 lines down I use incremental search instead of arrows/hjkl to move around. If I need to move to the end of a line I use $ (goto end of line) or A (append after end of line). If I need to go to the middle I'll use other shortcuts.
Vim has billions of ways to move around and select text for editing. Learning to use those relevant to your way of working is crucial if you want Vim effectively instead of annoying form of non-modal editor.
As for making Vim useful to you, I don't think anyone can tell you how to do this. You need to make it fit your style of working. Which means, trying, figuring out what bothers you and steal what works from others. Most of these example .vimrc's that people post do not include comments on what the options do, which makes this hard. I commented mine but it is rather sparse and I don't have a place to dump it at the moment to show you, unfortunately.
I've been using vim for not that long (but long enough that it's now my main editor). What all shortcuts exist for getting to the middle of a line?
I would be curious to know if there are other shortcuts for doing this too though.
Alternatively you can use the search commands, '/' (forward search) or '?' (backwards search) with the text at the middle of the line as your search string.
[Edit: here's a nice cheatsheet of them: http://www.digilife.be/quickreferences/qrc/vim%20quick%20ref... ]
When I'm editing string parameters of a function I'm calling, I use di' / di" a lot (moves to first ' / ", deletes inside content, and drops to insert mode).
As I learned vim, I learned to appreciate its simplicity and now keep my config at the minimum possible deviation from default as I can tolerate. My .vimrc is fairly spartan (http://github.com/tomhsx/homedir/blob/master/.vimrc) and the only plugins I use are ctags, pyflakes, and shortcuts for F6/F7/F8 to debug/execute python scripts.
I posted that link as a suggestion to browse the relevant parts (.vim/ and vimrc) as they are the result of a Vim newbie quest through several content on the Internet describing how to get some of the most requested features from IDEs (for example, intelligent completion) working with Vim.
As you might see from my .vim/bundle, I use relatively few plugins; they are pretty standard things like a file browser (NERD Tree), except for the custom "plugin manager", Pathogen, that I found as a reliable alternative to Vimballs and the like.
I now use Emacs for everything. It has just enough pieces to be able to configure the task you want to do. In particular, I make heavy use of key mappings, for example, F11 to the compile command, which defaults to "make -k -f Makefile".
VIM is highly configurable--several at work use it. Two of our more experienced guys use Pico.
Check out "Coders at Work" to see what the truly serious programmers of our time use for IDEs. Short form, none.
Idiomatically, "C-c C-c" usually means something like "commit" - send an e-mail, compile source (by starting make), etc.
C-h m (the mnemonic is "help,mode") lists all the bindings for a give mode.
Also, pressing a prefix followed by C-h (i.e., "C-c C-h") defaults to listing all keybindings with that prefix. (Sometimes there are bindings replacing that, though, like "C-x C-h", which is delete-region.)
It's a modern editor with as much IDE as you care to add.
Just seems like such a strange thing to say. I've never, for example, preferred one media player over another based on it's algorithmic size, or bought a iPhone app because it used especially fewer screens.
IDEs are just big text editors with a lot of stuff tacked on. I can see, perhaps, wanting to become VIM or EMACS master-of-the-universe, where you've macro'ed yourself to death and the entire planet can be controlled with just a few keystrokes, but for "regular" coding? What is it about an IDE that bugs you?
I hope I didn't sound too critical. I'm just curious. I'll use any IDE anybody has as long as I can type code and compile it. Add in some macros? It's all good. Why in the heck would I want to dive deeper than that unless I had to? Why would I care? Why would, say, Eclipse be any worse or better than EMACs? Or VS any worse or better than Multi-Edit.
I understand there are big fans of various tools. Feel free to jump in here and make your case. I've love to be mistaken. I just think this is like all the hoopla over Git -- it's a tool. I shouldn't be thinking about it very much. If I am it's not a very good tool.
What you say is correct, an IDE is just a text editor with a bunch of features tacked on, but those features lead to the environment becoming hungry for resources after every keyboard command you type.
It doesn't surprise me to find Eclipse using 1GB of RAM after a few hours of development.
My main development machine right now is a Macbook laptop, so I have limited resources in terms of RAM (2GB) and processor (2GHZ) and hate to see programs becoming greedy
Are you sure that it would still use 1GB if you ran a program that needed memory harder?
Chrome with thirty tabs -- switching to a tab I haven't looked at in a while sets the disk grinding and brings everything to a halt.
When I start up Outlook, or just click on Outlook after waking up the laptop, there's a couple minutes I can spend getting coffee, because it takes take that long to switch to another program and start using it. (Waiting for Outlook to finish starting up is another few minutes after that.)
Eclipse with fifty or more files open (damn these big Java frameworks) -- grind grind grind every time I switch between views, or at unexpected times while I'm typing.
I wish I knew more about Windows, because when I look at the processes in the Task Manager, their combined memory footprint is well under 2GB, but all my programs become nearly unresponsive while the disk goes grind grind grind grind grind... what the hell is that about?
Whether it's misconfiguration or some spyware crap my company installs on our laptops (I disabled the "backup" feature that just copy files around on the hard drive, but I'm sure there's more) it certainly helps if I keep the resource usage of my programs down.
tl;dr: As long as people are bothered by performance problems, they'll worry about the resource consumption of their tools.
I found it very helpful to actively and violently close down tabs. 4-5 is just about the ideal maximum. I keep a separate lightweight browser, Opera, open to API documentation, and firefox for other stuff. For wifi, I removed the internal one and use an external one. Whenever I need to focus, I close firefox without saving sessions and unplug the wifi.
When I go out to cafes for reading, I leave the wifi at home.
Opera is not particularly lightweight, even compared with Chromium. Check out Midori.
Maybe someone knows otherwise; but I think it is a fact of life that when you set your JVM to use (say) 1GB and keep a java app open and creating objects for long enough, it will tend to grow to 1GB rather than spend time running the GC.
Now that Sun is no longer I sure hope Netbeans doesn't go down the tubes.
It's true that Eclipse can be quite memory hungry, but if you let it eat some memory, it's features can be fast. Still, the standard configuration of Eclipse is a joke. If you are trying to edit files, Eclipse will hang all the time.
In recent days I play a lot with Vim. Even though I configured it to my needs, it still lags behind an IDE when it comes down to IDE specific features - e.g. search in a project: it's neither as comfortable nor as fast as an IDE in this area. (I'd like to be proven wrong on this feature, because that's the main thing that's bothering me) - But Vim is good in what it is: a text editor. And that's what I'm doing most of the time: editing text files.
As well, there is ctags, which basically builds up a list of function calls and where they are in a file. Vim understands tag files by default and will use them automatically. You can then toggle between the function declaration and your current line (useful for searching for functions' and what their parameters are).
Does the ctags plugin work for other languages as well, e.g. python, ruby, javascript?
BTW, ctags is a separate command-line tool. Any *nix has it, it is available for Win too.
I remember when people joked that Emacs was a memory hog "eight megs and constantly swapping".
Eventually Mallocs All Computer Storage.
Emacs Makes A Computer Slow.
About the only one that's still true now is this:
Escape Meta Alt Control Shift.
A once-in-a-lifetime experience though, I start the emacs server on boot so I can start clients much faster, which means it's always running as long as my computer is on, and it's never had any issues other than that one time.
He's comparing it to building emacs from source. He's quite obviously trolling: Emacs has 15MB of C source and header files already.
On my machine (2010 15" MBP) a configure alone takes 20s, which is about 3 times the loading time of an empty IntelliJ (no project), and about twice if loading a preexisting (cached) project. A `make` of 23.2 takes nearly 3 minutes. Unless he's trying to launch an IDE with no free RAM or building an already-built soft (or a networked build), his declarations hardly make sense.
Why? You start it once, the first time you want to start developing. And you never close it until you reboot the machine.
Same as with Emacs, start it, have it enable server-mode automatically, and until you reboot you go through emacsclient.
IDEs are not optimized for the common case. For example adding an interface to your project in visual studio takes the same steps as adding a "ADO.NET Self-Tracing Entity Generator": right click on the project in the solution explorer, choose Add, choose New Item, choose Interface, click Add. At every step in this process you have to choose from a list of about 10 options. So by choosing something else when you're given these options you can probably reach about 10000 different end results. Surely adding an interface is what you want more than 1 out of 10000 times, so why bury it under so many steps?
Because those megabytes need to load from disk, and those CPU cycles need to cycle. Eclipse has some cool features, but if I have an aversion to loading the thing because it takes literally 5 minutes then I need a better tool. Leaving it always open isn't an option because of all the RAM it uses. I don't want another computer right now either.
I personally picked emacs for a number of reasons, you seem to already be familiar with Vim so that might be best for you.
Print out the cheat sheets, and get to work. It's terribly frustrating at first, but you'll be off the sheets in no time. After a month of steady emacs use I could not go back to anything else. I have to use Eclipse at work from time to time and I find the experience maddening; having to use keys like Page Up, Page Down, Home, etc. Emacs lets me do all that and more without ever leaving the home row. I'm sure Vim is the same way.
Pick one, learn it, love it... just don't become a zealot :)
While it's common to start and stop vi(m) frequently, Emacs is usually kept running, with shells, interpreters, etc. inside it. The start-up cost of loading lots of extensions amortizes over the total session. (And it just took about seven seconds for a new Emacs to start and load everything I use, FWIW.)
The main thing is just to get good at using the shell. Grep, awk, etc etc With all the tools at the cmdline, you can do anything.
only if your definition of 'everything' is limited, all the refactorings in a half-decent ide are quite hard to get right with awk & sed. For what is worth, even something as simple as finding all elements in a type hierarchy are quite unobvious to do with shell tools for me.
FWIW, for other types of refactorings (I mainly use Java):
Maybe that's less efficient than using some IDE tool to do it, but it's not like it takes a long time.I agree that, all the things you can do with automatic refactoring you can do with a change/compile/fix loop, but it imposes an higher amount of friction, which (even in a subconscious way) pushes you into not making changes.
As a ruby and python dev using vim, I can even feel this in changing a single method name (with sed, obviously not syntax aware), as a java one without a supporting ide I'd seldom venture in a "extract superclass and use it where possible as return value" kind of change.
But thank god I don't work on large systems like that.
A standalone tool can either do static analysis (like a tag index, but more so) or communicate with the language runtime, and just leave the UI to the editor/IDE. Either way, it doesn't need to be in sed & awk.
Keeping that all in your head is a serious effort, especially if you don't work on the same project all the time.
I try very hard to stay away from IDEs and environments that require one to function, but 'modern' looking websites and applications more or less require the use of such frameworks.
So I find myself using the documentation probably more frequently than I really need to, in order to simply look up the names of stuff and I probably am not using the frameworks to their fullest potential because I can only memorize a subsection of them.
Even a 'lightweight' framework can easily come to 100 classes.
So, my toolset: vi + my memory, but it's tough going.
I substitute for this with a tiling window manager (wmii) with very similar keybindings to vim.
My toolset: my memory, vim, wmii, rxvt-unicode-256color
OTOH, I can't use it with Google AppEngine projects because the way GAE takes over stdin/stdout, which prevents me from starting pdb/ipdb. For GAE work, I am stuck with Eclipse and Pydev. For me, the biggest nuisance is not the amount of memory/cycles it eats, but the amount of pixels.
What kind of framework you develop for?
Then again, I do always keep a shell open when I'm coding to run tests and stuff.
When I first started taking classes, I tried using eclipse. I decided rather quickly that, especially in a classroom setting, IDEs were a crutch and if I wanted to become a good programmer they would do more damage than good. (Note I said good. That may or may not be the same as productive.) So I started learning vim. Now I can't use most environments. I use Xcode for iphone development, but otherwise I'm just too programmed for vi. I need my commands and macros. GDB works great once you learn it. Valgrind works great as well. And these are available on any *nix machine, all over an ssh connection.
We just had a programming exam where they give you three hours on an isolated machine to build a fairly simple program in C++. Most of the questions and problems people had were that their IDE of choice wasn't working for some reason. Meanwhile, using vim/gdb/valgrind I was done in an hour, long before anyone else.
(Long-time Emacs user here. I don't have a horse in this race.)
[code] h j k l i a ^ $ Ctrl+w Ctrl+n Ctrl+p * # ? [/code]
So vim is simply set as my editor, with CoccaVim plugin installed. Xcode manages the builds, etc, but otherwise I'm in vim.
There are plenty of plugins that give you "all a boy could ask for" as far as development resources.
Go through vim tutor for a bit to get the NEXT level of commands down. Once you get used to typing replace commands and moving about by words etc, you'll possibly think it "powerful enough".
Everything I need from a code editor is the ability to open files in tabs, to syntax highlight any random language I use (on an average day I'll be using up to 5+ different languages) and to understand the indentation style for all the languages to ease indentation. Perhaps some bracket matching and that's pretty much it.
But what I seriously, seriously cannot live without is a HUGELY HUGE area for code. The biggest thing I hate in IDE's is that they tack on so many features and toolbars and crap that at the end I'm left with this tiny code editor that leaves me feeling horribly claustrophobic. Sure, I could close all those toolbars, but then why am I wasting resources on them in the first place?
Another thing I hate about IDE's is how egocentric they are. I don't like conforming to some IDE's idea of what my project structure should look like. And I certainly don't like it when they get horribly confused if I move a file through a normal interface instead of the IDE.
As for "keeping the project in my head" that some people mention as a problem when not using an IDE ... I've never found an IDE particularly helpful in that regard. I've actually never found any added value that an IDE would provide ...
ido-mode + tags for navigating my source code, syntax highlighting + indentation for any language I do, pretty much nothing on the screen apart from my code, easy hooks for programming custom functionality
That said, sometimes I use NetBeans (and sometimes I don't). I was using Eclipse for a few years, but I got so tired of the setup and wait. Of course, there is probably a newer, less sucky, version of Eclipse now, who knows.
NetBeans is fast enough on my netbook (Atom, 1.6 GHz w/ 1 GB RAM) for most little projects I tinker with (at least under Linux), and likewise on employer's workstation with real stuff (even using the mandated Windoze). The edit window is mostly responsive soon after start, though it may take a minute for rescan to finish so docs, jump-to-def and autocomplete to be available.
Also, I like that you can undock the edit window in Netbeans, putting it in its own relatively large stand-alone window. Throw in the "vi" plugin, and get to work, referencing the other window full of, um, crap, only when you really need it. I guess I shouldn't call the integrated debugger "crap", but much of the other stuff is :-)
I have some screen shots on my website of several file types, where I have undocked the editor and hierarchy widget. Playable for me, YMMV. http://roboprogs.com/devel/2009.09.html
Also, its easy enough to create a project with "external" (existing) sources, rather than the IDE-p0wned build process. I usually end up creating one (1) IDE project for a given source base, then checking out source for multiple branches and then either resetting a sym-link (*nix file systems) or renaming (MS-brain-death) the top level directory for the branch-of-the-day.
By far the best windows text editor (currently being ported to osx/linux)
I'm a long-time emacs user, but I have found Intellij IDEA to be a wonderful tool for working in java. Older versions were slow to start up and occasionally sluggish, but new versions on modern hardware are wonderful. I use netbeans for C++. I haven't found anything for Python that I like. (I find Eclipse unusable for anything.) If IDEA or Netbeans were taken away from me, I'd use emacs.
Actually, I still spend a lot of time in emacs. I use the IDEs for writing new code, reading code, and running/debugging unit tests.