Interesting new IDE concept, and my initial thoughts

One day, while surfing the web..

I found this via slashdot: http://www.youtube.com/watch?v=PsPX0nElJ0k

I think I need this..

As I was watching it, it occurred to me that this is already very similar to how I write code these days. It’s a lot of alt-clicking on labels to get to their definitions, and right click->find references to find where it’s being called from. I jump back and forth between methods without paying much attention to the actual structure of the class file other than the API, for which I use the overview panel in Eclipse. I can’t remember the last time I read through any longer java file.

When developing this way, I always end up with a LOT of open tabs, not sure which I am done with and which I might need again soon, so I end up having more and more tabs open until I finally go “AAH, SCREW THIS” and close all windows, starting over again from the start. Usually the “AHH, SCREW THIS” happens after a feature has been completed, but not always.

Another annoying this is not being able to quickly go back to where I was last, since it’s in a totally different tab, and the order of the tabs are not sorted by relevance to each other, but rather in the order in which I opened them. Sure, I can use alt+left and alt+right to jump back and forth between the last edited areas of the code, but this doesn’t always work reliably, and worst of all doesn’t work at all when just inspecting code.

While it IS possible to have multiple views of the same file, it’s horribly unintuitive, so editing two areas of the same file at the same time gets pretty confusing, and I often end up placing markers in the code by adding compilation errors like partially written method calls or just simply omitting the semi colon. This is bad practice.

You say you want a revolution..

This new idea moves coding away from “file editing” to a more conceptional model that I feel fits more with how I represent code when thinking about it, but there are few potential problems..

First problem is line length. Java can sometimes get a bit verbose, and lines like this are not uncommon:

public static final Map users = new HashMap();

I cry when people split statements like that into several lines, and I abhor the idea of keeping lines short for the sake of keeping them short. A line should be a single statement or declaration, and should not have some arbitrary maximum length. I find that line to be a perfectly readable atomic part of java programming as it is, splitting it up makes it harder to read.

This doesn’t fit well in the bubble design in the video, since the bubbles would have to be at least as wide as the longest line, and a single long line could end up wasting a lot of screen real estate.

Another problem is that of code structure. While this IDE idea doesn’t rely on special markers in the source code or anything silly like that, it decouples you from the actual .java file. That means that for someone who doesn’t use the same IDE, the code will be less readable than it should be. Some way of organizing what order the blocks are in the overall java file will be needed. (Then again, if people get used to reordering a lot, it might cause problems with code versioning systems.. but that’s really a problem with the version control system, not with programming)

The final problem I see is that this forces the “chunks” of code to certain predefined levels. I personally see getters and setters as pairs, not as individual blocks, and sometimes there are complex initializers (even static ones) that rely on (some) members in the class. It’d be nice to be able to set up arbitrary blocks of code, but I don’t think that’s possible without storing meta data either in the file itself (forces editor lock-in), or in a separate file (can go out of synch).

Twang! Drrrr..

I signed up for the beta. I hope I get to try it! It’s a very interesting idea.

Also, pardon the rambling. ;)

posted 14 years ago