views:

263

answers:

7

Having programmed through emacs and vi for years and years at this point, I have heard that using an IDE is a very good way of becoming more efficient.

To that end, I have decided to try using Eclipse for a lot of coding and seeing how I get on.

Are there any suggestions for easing the transition over to an IDE. Obviously, some will think none of this is worth the bother, but I think with Eclipse allowing emacs-style key bindings and having code completion and in-built debugging, I reckon it is well worth trying to move over to a more feature-rich environment for the bulk of my development worth.

So what suggestions do you have for easing the transition?

+2  A: 

If you've been using emacs/vi for years (although you listed both, so it seems like you may not be adapted fully to one of them), using said editor will probably be faster for you than an IDE. The level of mind-meld a competant emacs/vi user can achieve with a customized setup and years of muscle memory is astounding.

William Keller
+1  A: 

Try making a couple of test applications just to get your feet wet. At first, it will probably feel more cumbersome. The benefits of IDEs don't come until you begin having a good understanding of them and their various capabilities. Once you know where everything is and start to understand the key commands, life gets easier, MUCH easier.

scubabbl
+4  A: 

One thing that helped me transition from Emacs to other IDEs was the idea that IDEs are terrible editors. I scoffed at that person but I now see their point.

An editor, like Emacs or Vim, can really focus on being a good editor first and foremost.

An IDE, like Visual Studio or Eclipse, really focuses on being a good project management tool with a built in way to modify files.

I find that keeping the above in mind (and keeping Emacs handy) helps me to not get frustrated when the IDE du jour is not meeting my needs.

Jason Dagit
A: 

Read the doc... And see what shortcuts/keybindings equivalents are with your familiar ones. Learn the new ones...

François
+1  A: 

I think you'll find IDE's invaluable once you get into them. The code complete and navigation features, integrated running/debugging, and all the other little benefits really add up.

Some suggestions for starting out and easing transition: - start by going through a tutorial or demonstration included with the IDE documentation to get familar with where things are in the GUI. - look at different kinds of sample projects (usually included with the IDE or as a separate download) for different types of areas you may be coding (web applications, desktop applications, etc) to see how they are laid out and structured in the IDE. - once comfortable, create your own project from existing code that you know well, ideally not something overly complex, and get it all compiling/working. - explore the power! Debug your code, use refactorings, etc. The right click menu is your friend until you learn the keyboard shortcuts just to see all the things you can do. Right click different areas of your code to see what is possible and learn (or re-map) the keyboard shortcuts.

Pete
+4  A: 

Eclipse is the best IDE I've used, even considering its quite large footprint and sluggishness on slow computers (like my work machine... Pentium III!).

Rather than trying to 'ease the transition', I think it's better to jump right in and let yourself be overwhelmed by the bells and whistles and truly useful refactorings etc.

Here are some of the most useful things I would consciously use as soon as possible:

  • ctrl-shift-t finds and opens a class via incremental search on the name
  • ctrl-shift-o automatically generates import statements (and deletes redundant ones)
  • F3 on an identifier to jump to its definition, and alt-left/right like in web browsers to go back/forward in navigation history
  • The "Quick fix" tool, which has a large amount of context-sensitive refactorings and such. Some examples:

    String messageXml = in.read();
    Message response = messageParser.parse(messageXml);
    return response;

If you put the text cursor on the argument to parse(...) and press ctrl+1, Eclipse will suggest "Inline local variable". If you do that, then repeat with the cursor over the return variable 'response', the end result will be:

return messageParser.parse(in.read());

There are many, many little rules like this which the quick fix tool will suggest and apply to help refactor your code (including the exact opposite, "extract to local variable/field/constant", which can be invaluable). You can write code that calls a method you haven't written yet - going to the line which now displays an error and using quick fix will offer to create a method matching the parameters inferred from your usage. Similarly so for variables. All these small refactorings and shortcuts save a lot of time and are much more quickly picked up than you'd expect. Whenever you're about to rearrange code, experiment with quick fix to see if it suggests something useful.

There's also a nice bag of tricks directly available in the menus, like generating getters/setters, extracting interfaces and the like. Jump in and try everything out!

Desty