// From http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64Bits
unsigned char b; // reverse this byte
b = ((b * 0x80200802ULL) & 0x0884422110ULL) * 0x0101010101ULL >> 32;

February 27, 2010

IDEs not ready for prime time

Filed under: Uncategorized — jon @ 4:28 pm

I’m an experienced vim user, but for a number of reasons I’ve been trying pretty hard to start using Eclipse. This isn’t the first time I’ve tried. I first became aware of Eclipse in 2001 but didn’t get much further than staring open-mouthed at the resources it demanded, and how slow it was.

The reason I even care is that it’s become the defacto standard for Java development, with a reasonable following for most languages. There have been a couple of times that I’ve wanted to use a new tool, and it turns out to be heavily geared towards Eclipse users. The latest example is the Android SDK. The whole experience is meant to be much easier under eclipse – letting you play with the full dev cycle (including emulation) before learning all the gory details.

Now the last time I tried Eclipse, I got as far as trying to install some standard plugins but it couldn’t find the repository then the whole IDE came crashing down. I tried NetBeans, but it crashed at startup. This is on an otherwise totally stabel machine, and I had the same problems with Eclipse on another machine.

This time, thankfully, the install went smoothly with the following observations:

  • It’s so damn slow. I can’t tollerate an editor that can’t keep up with my typing.
  • Why is “Install New Software” under “Help”? I seem to remember it had an even worse name previously.
  • Why oh why isn’t it themable? This is such a basic feature. I’m really not going to change every colour individually.

Things started to get better from this point in. The android stuff installed pretty easily although some of the device setup wasn’t too intuitive, and it did take an age. The emulator takes so long to start up I though it had crashed, but I realise that’s an Android issue.

Here’s what impressed me right away:

  • The file-format specific editors are great – especially the XML ones.
  • The layout preview is a nice touch.
  • The notification of missing references and “add import” features are pretty nice.

And this didn’t:

  • Editing is actually laggy, and switching tabs is slow
  • The autocomplete didn’t always appear (seemed to work for the first two XML attributes for a tag, then stop) and I don’t know if there’s a way to bring up the list before you’ve started typing.

But I was at a point where I could get things done.

I then made the mistake of trying to use it to do some refactoring on a python project at work. Two things stopped me:

  • The mercurial integration (with the plugin) is dreadful
  • Files seemed to open in an editor determined by a dice roll (.sh opened in emacs, .py opened in bluefish)

After getting no response on http://superuser.com/questions/112410 I gave up.

So I was happy enough to continue using it for Android development and the time came to stick my hello world project in a repository. Having been wholly unimpressed with the hg plugin, I thought I’d use git and the egit plugin. Unfortunately I ran into bug 277265 meaning I couldn’t actually install it on the first attempt. When it did finally install I ended up with a totally broken eclipse install. No workspace, no options, very few buttons. Uninstalling didn’t help.

How has such a broken piece of software become the defacto standard? Sure, if you have a brand new top of the range machine and run with no plugins for a Java project you’ll probably be fine, but that’s a hell of a price to pay.

Now I’m not a big IDE fan. The primary thing your development environment should do well is editing, and all IDEs I’ve used are bad at it. They offer plenty of other nice features, sure, but that’s not much use if I can type quicker than it can process the characters. I did try eclim which did a surprisingly good job of embedding vim, but then you loose those extra eclipse features.

Honestly, I think what I probably want is Emacs, but I’ve never been able to get on with the style of the keybindings. If I ever have to use Eclipse for work I’ll just have to demand a top-notch PC and someone to support it… then do all my editing in vim and just build/refactor in Eclipse.

:%s/\ceclipse/pretty much any IDE but it seems to be more often claimed that Eclipse is amazing/g