Tuesday, March 11, 2014

Evolution: form Emacs to Eclipse to IntelliJ and back to Emacs?

A few days ago, Dinis Cruz asked "Why doesn't Eclipse community stand-up more to IntelliJ?". As a long term eclipse fan, let me explain why I am currently not using eclipse but IntelliJ (actually PyCharms) and why I almost feel like going back to emacs. It is not because I think eclipse is bad or it misses features. It is because I have to get my job done and I don't really need an IDE, all I need is a good editor with CM integration and some search and debugging capabilities.

From emacs to sniff to eclipse...

About 30 years ago I started using emacs on a VT100 terminal as my first "IDE"     for programming modula-2. When I started using C++ the first graphical IDE was sniff. About 20 years ago I became part of the team commercialising SNiFF+ and 10 years ago the team switched to Java and eclipse. Each of the development environments was better than its predecessor... Clearly,  eclipse was and is the ultimate IDE.

...then entering the wild wild web....

Since almost a year, I am working on a startup web project. The project is based on open source projects which use coffeescript, python, javascript, jquery, angularjs, json, xml, css, less, elasticsearch, sqlite, flask, grunt, nodejs, git, make, sh, markdown, reStructuredText etc. The projects are linked and nested in some "strange" ways. Not necessarily the choices I would have made. But I have little control over how the open source projects I use are organised and structured.

...with unknown territory...

When I started the project, I did not know much about the inner details and structure of the components in my workspace. It was just a tree of nested directories. I did not know much about the filetypes inside the directory tree. Nor did I understand the relationship between the files and directories. What I needed at this point was a tool that would help me explore the unknown territory. This is not exactly what eclipse is made for. Eclipse wants me to know a lot about the code in order to install the necessary plug-ins and in order to 'flatten' the nested tree into a list of projects.

...using eclipse....

So, given that 'reality', the question is how to make eclipse happy. I really tried hard for a few weeks to get this running with eclipse. But it was a constant battle on multiple front lines. How to find and install the plugins I need to support the languages I use. Another battle is that eclipse has a very strong idea on how projects should be structured. That is great if you start form scratch and build java projects. It turns out to be very difficult if you cannot control or fully understand the structure of the projects. Another front line is that egit requires a certain project layout to work properly (it expects a 1-to-1 relationship between projects and git repositories). In essence, I spend a lot of time trying to install and configure eclipse to make it work with the code, but with limited success.

On one hand, eclipse is very opinionated and that can get in the way if the "reality" does not fit the eclipse model. On the other hand eclipse offers too many choices and little advice on what to install. I want the opposite: give me the freedom to keep the files and directories the way they are and give me good advice on plug-ins I should use and install.

...stop fighting windmills and trying something else...

After a long battle fighting with my inability to force eclipse to do what I want, I gave IntelliJ (in my case PyCharms) a try. After relatively quick setup and learning phase, I came to the conclusion that it can deal better with the my reality than eclipse. It supports most of the languages out of the box well enough for me to be able to work. I could just point to the root directory with all my sources and it found the git repositories inside. I had no problem finding and installing the plug-ins I needed (in fact it suggests to install plug-ins when I open a new file type instead of opening the file with an "arbitrary" application on my system like XCode for .sh files). To borrow a term the python community often uses: "it comes with batteries included". I don't think it is the better IDE, it just works for me with much less pain. Maybe I am to opinionated on what eclipse should do and therefore I struggle. With IntelliJ I am much more humble. I am happy if I get things done.

...(ab)using IntelliJ as editor with syntax-highlight...

It turns out that I use PyCharms essentially as editor. I probably use less than 1% of the features of the IDE. I am not really happy with that. It still feels unfamiliar. And I miss mylyn very much.

What I actually use/need is very simple
  • browsing code with syntax highlight (because a big part of the code is coffeescript, and there is no usable support for coffeescript eclipse, that is one of the killer features for using PyCharms)
  • navigation (not as good as it could be)
  • search
  • editing with code completion (for me it is much worse than it could be)
  • debugging of python (javascript and coffeescript I debug in the browser)
I choose PyCharms, because I thought I need an IDE, but, if I think about it now, I could have gone back to my first love, emacs or I could have chosen one of those many clever editors out there. At the time when I made the switch I thought it has to be a real IDE. But then I learned a surprising lesson:

...the revival of simple text editors and command-line tools...

I am always interested in what kind of tools other people use when working on similar projects. I have to say, I was really shocked at the beginning, when I saw what tools really talented developers use: vi, emacs, notepad++, TextMate and a few other more or less advanced text editors. I have not seen much use of anything I would call an "IDE".

The other observation is that a lot is done on the command-line. The projects use command-line tools to install, setup, build and deploy the code. I am really glad, I got a MacBook, because most projects run out of the box on a mac. With windows this might be much more difficult.

It seems there is a new generation of developers that have never used a VT100 terminal. But they make their environment look like what was the reality 30 years ago when I started programming: simple text editors, green colors on black background and running command-line tools.

What is my conclusion of this? I think there is a different world that needs much simpler tools than the ones we have build over the last 25 years when we created super powerful IDEs. It is a kind of down-sizing when it comes to development environments. When the famous great libraries you use (jQuery, angular, node, backbone...) are just a few thousand lines of code, why should your IDE be tens of millions of lines of code?

In fact, I don't think that IntelliJ is the biggest competitor of eclipse, its all the simple text editors and command line tools that compete with both eclipse and IntelliJ.

...but eclipse can provide solutions...

Hmm, should I really try emacs again (I still use it every day, but not as IDE), but that feels so wrong. Maybe there are solutions in the diverse eclipse community.... Maybe something like a Light Eclipse or an Easy Eclipse could emerge for the eclipse eco system...

...therefore let's contribute money and resources!

...and yes that is just happening! There are some promising attempts to go in the right direction like LiClipse and EasyEclipse. Both are crowd funded. I think, eclipse has a bright future! The risks is not lack of ideas.The risks is lack of money to fund the work that needs to be done. You can help too....


  1. For me the secret was never to leave Emacs in the first place. :)

    1. Simple but clever strategy ;-). All my attempts to convert you to eclipse failed and I tried really hard.....

  2. One thing I like about IntelliJ is it's integraion with VCS. It just works out of the box with SVN and Git. No need to bang your head hard to make it work