18

Modern IDEs have a lot of tricks up their sleeves to help with code writing, refactoring, searching. All those are very helpful, but rarely any of them looks like a real "magic" and makes me think "Wow! How did it figure that out?"

Can you name any impressive IDE code automation (or other) features that blew your mind first time you saw them?

serg
  • 2,087
  • 3
  • 17
  • 22

20 Answers20

29

Backwards Debugging

Visual Studio 2010 (and now 2012) lets me debug backwards with IntelliTrace.

Never again will I have to re-live the moment where I hit F10 one too many times and have to restart debugging.

Ryan Hayes
  • 20,109
16

ReSharper's ability to guess what I want a variable named continues to amaze me. Here is a very simple example but you get the idea.

alt text

mpenrow
  • 1,643
  • 13
  • 16
16

Code completion

When all you've seen is a text editor, this is impressive

TheLQ
  • 13,650
  • 7
  • 56
  • 88
12

I was very impressed with Eclipse's refactoring tools when I first encountered them. The ability to extract methods (which, when you're learning better design is a common occurrence) from a large chunk of code and have everything handled for me was quite cool.

bedwyr
  • 2,212
12

Code Bubbles. http://www.andrewbragdon.com/codebubbles_site.asp

I love Visual Studio and Eclipse for the tools they give me to change code, but Code Bubbles really excites me for being able to navigate and view my code. Too bad it's not publicly available =-{

MBonig
  • 616
7

The most impressive programming environment I have ever heard of is the Genera operating system.

You could click on any widget in the windowing system and obtain a full readout of source code & documentation of the item. Being a dynamic programming language (Lisp), you could edit the widget's source on the fly.

ZMACS from the Lisp Machine world is still said to be a better editor than Emacs, which is an editor environment without peer.

Paul Nathan
  • 8,560
  • 1
  • 34
  • 41
6

Visually showing the structure of the program (programs/functions/routines/...)

alt text

Rook
  • 19,947
4

Whyline

Whyline for Java really impressed me when I saw it. It's a dynamic analysis tool that lets you ask questions about the program's output, and not just text, but graphics too. For example, you can ask "why was that line red?" or "why didn't the paint method get called?"

It works by instrumenting your program and recording a run. For example, suppose there's a bug you can reproduce. You instrument your program with Whyline, run your program in Whyline to reproduce the bug, and then when you quit the program, you can use Whyline to inspect the execution history.

This recording and playback isn't new, but how Whyline implements it is pretty slick. You can view the history according to specific events (e.g. focusing on only mouse drag events, or only keydown events). It also associates output with what part of the program printed it, so you can navigate from the output to the code.

To work, it uses program slicing, so that you can focus on the parts of the code that are actually relevant. CMU now has a patent on it, and I don't know what their plans are, but I hope we can see more of it in production. It's a memory hog, but that's likely because it's a prototype and it can improve.

You should see the demo online, but you should also try it out for yourself to get the full experience. If anything, the online demos undersell the idea.

Macneil
  • 8,243
4

ReSharper's ability to refactor. In full disclosure, I may be behind the curve here since I think Java with Eclipse has had this type of functionality for some time, but I don't regularly work with Java.

The delta in capability that ReSharper adds to Visual Studio is so great, it's unbelievable. I know I sound like an ad, but I don't think I could ever go back to using a stock Visual Studio installation without ReSharper on top.

More generally, a semantic understanding of the code would beat the pants off of a plain old text editor any day. This leads to things like "find usages of variable" or "inline function" or "opportunity to use idiomatic pattern", etc.

Mark Canlas
  • 4,004
4

Smalltalk's debugger:

  • Full access to the entire call stack (What was this instance variable of that object 3 senders down the stack?)
  • Edit the code under test in the debugger, restart and carry on program execution like nothing happened.

It's perfectly normal in Smalltalk to spend most of one's time writing code from within the debugger.

(I remember being blown away by running a method, seeing something wrong, changing it, and running the method again without restarting the application back in the day with Visual Age for Java... because VA4J was written in Visual Age for Smalltalk.)

Smalltalk's Method Finder

Method Finder lets you ask "which message might I send to take these parameters and get this result?" Ask it 'abc'. 'def'. 'abcdeb'. and it tells you 'abc' , 'def' --> 'abcdef'. Ask it #(0 1 2 3) and it says #(0 1 2 3) sum --> 6. * Senders-of, implementors-of all you to find all (*) senders of a message or all objects that implement that message.

(*) Except when you do stuff like create message names at runtime: self perform: (#foo, #bar) to send yourself the message #foobar - in which case you know what you're doing, and you don't mind the potential of hoisting yourself on your own petard.

Frank Shearar
  • 16,751
3

I think the most impressive IDE feature I've seen is SyncEdit, which AFAIK is only available in Delphi.

Mason Wheeler
  • 83,213
2

What I'd like to see in an IDE are these features:

  • Display the code the way I'm used to (independent of how it's actually formatted)
  • Allow to embed tables (say an Excel spread sheet where I can read the cell values with sheet[A3]) and drawings in the code and access them just like any variable.
  • Allow to omit braces and other unnecessary code that is just there to make the parse happy.
  • Searching the code with a Google-like engine (especially getting search results within 35ms)
  • Displaying complex if conditions in a table-like manner (still searching the link).
  • Refactoring tools which can find similar code, extract the differences and reduce them to the max.
  • Support for code generation while obeying language rules (think: Create all getters and setters for Java classes unless a method with the same name already exists or dependent on annotations)
2

Type Checking for Dynamic Languages

As long as your code doesn't get too 'meta', an IDE for Ruby or Python should be able run a background task which:

  • for a given function, determines all the possible classes that will get passed in as arguments
  • for those classes, ensures they respond to all the methods invoked by that function
  • presents a list of the incompatible classes with the missing methods you need to implement

I haven't yet seen an IDE which does this.

AShelly
  • 5,773
  • 32
  • 51
2

Im a huge fan of the alt click multi line ability in Vs2010 best thing I've found about the new version.

rerun
  • 2,045
2

Eclipse's Auto Build is the feature I most admire.... 7 years ago. Now I just take it for granted.

nanda
  • 559
2

Xcode 4 fixes semicolons and typos and uses arrows to show how an error occured.

E.g.:

NSString *a = [[NSString alloc] init];
[a release];
int l = [a length];

An arrow will be drawn from [a release] to [a length] to show why you can't use [a length].

1

Code Templates and expansion, such as DevExpress' CodeRush. In C#, a DependencyPropertyis a major pain to create, since the syntax can get verbose, but simply typing "dp" brings up something akin to a snippet where you fill in the type, name and default value, and all else is done - including adding any necessary "using" statements, and possibly project references if memory serves.

The benefit is in creating your own templates, for code you often reuse or rewrite, such as simple implementations of INotifyPropertyChanged properties, where simply give the template the name and type of the property (if another expander hasn't handled it) you want to use, and it handles the rest, including creating the backing variable.

Hugo
  • 1,129
  • 8
  • 14
1

Pex does some pretty cool automated unit test generation. It traces your code, determines branch points, uses a conditional solver to generate inputs that hit every possible branch, and then lets you export the results as repeatable unit tests. It can humiliate complex string handling code.

nlawalker
  • 2,962
  • 22
  • 21
1

In Eclipse Generate SEtters and getters automatically , similarly create methods in implements class from an interface

GoodSp33d
  • 199
1

IntelliJ Idea's support of JPA

Mention you have an DatabaseEntity:

@Entity
public class Customer{
[...]
String lasName;
[...]

now you have some JPA-Queries

Query q = "selecct s from Customer c where c.lasName=:lastName"

after some Time you see, that you made a typo within your Entity and you decide to refactor lasname to lastName.

That IDE will refactor the JPA-Query as well.

ckuetbach
  • 168
  • 5