Leaving NetBeans for Emacs as my Ruby Editor
When I first started working with Ruby I used RadRails (which still has the best integrated test runner I have used). Various problems and crashes with RadRails along with exciting features being added to Ruby NetBeans enticed me to switch. I enjoyed NetBeans and some of its features, but the weight of my IDE began slowing me down. I didn’t have the control to tell it not to do some things that annoyed me.
My cofounder Ben had been using Emacs since learning Ruby. The quick speed that he could work with code, made me wonder what features I was actually using in my bloated IDE. It turned out that I had been getting annoyed with most of the advanced features because they stalled my system, crashed occasionally, or really weren’t that useful. An example of a cool feature that I hardly found useful would be Netbean’s Ruby code completion. In the past I had used Emacs to develop all my C and C++ code and I always liked it, so I decided to switch away from NetBeans and see how Emacs would hold up as my editor.
I have enjoyed using Emacs and think that I can more quickly work with code with far less hassle and frustration. I don’t expect to move back to a large IDE anytime soon. That being said there are definitely pros and cons to working with a full IDE vs an editor, and I find myself missing features sometimes. So I thought I would list out some of the pros and cons so others can weigh these issues themselves.
Reasons I miss NetBeans:
- Graphical test integration linking to the lines of code in the stack trace
- Navigate -> ‘Go to Declaration’, ‘Go to Test’, ‘Go to Action or View’
- Easy code refactoring and renaming
- Code completion, occasionally (e.g. was the Array function called include? or includes?)
- File browsing with folder tree view
- Graphical SVN browsing, easy branch, merge, get version, diff
- Easy project file search (Yes, you can do, ‘grep -Ri ‘Logger’ lib/* bin/* app/* | grep -v .svn’, but that is a pain to type)
- Easy code commenting (Apple-/ which toggles, is much nicer than Ctrl-x, Ctrl-m comment-region / uncomment-region which has to be added to your Emacs configuration)
- Easy code formatting (Apple-shift-f, is easier than Ctrl-x, Ctrl-m indent-buffer / indent-region)
Reasons I hate NetBeans:
- Frequently stalls (Especially if you have been out of the application for awhile)
- Crashes (At least every couple days)
- Not enough user control (stop indexing everything)
- Magic behind the scenes (constantly connecting to SVN every time I saved a file)
- Debugger didn’t work well (ended up running on the command line to get debugging)
- Ruby Console didn’t work well (ended up using irb on the command line instead)
- All tasks that NetBeans handles nicely for you like testing or migrations were slower (ended up running all rake task and tests on the command line)
- Resource hog, making everything else I am running far slower
- NetBeans ignores canceling tasks and continues trying to run them
- Booting up takes a few minute before NetBeans completes its various start-up tasks (You can work during some of the start-up tasks, but it is slow and unresponsive until it has completed the tasks)
Things I like about Emacs:
- Better/more key commands (I love kill/yank – the ability to kill until the end of line is incredibly useful)
- Incredibly fast, if I am working live with someone I can jump in make an edit and be back live showing them the change on the project (Imagine having to boot NetBeans to do this)
- Multiple copy and paste buffers. This is something you get with GNU Emacs on an X system. I can use both kill/yank from Emacs while also using my normal copy and paste to maintain two independent copy and paste buffers, very handy
- Complete control over the editor, no longer do I have to deal with auto closing brackets or any other ‘helpful’ defaults the editor includes (You can turn them all off, but I get annoyed having to go change a bunch of settings)
- An unexplainable feeling of being closer to the system and the code.