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?

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as not constructive by Mark Trapp Jan 26 '12 at 0:18

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

3

Good question, would love to see more answers though... Bounty!
–
Tom WijsmanSep 30 '10 at 15:54

Not actually all that impressive, you can do that just by analyzing a TAGS file.
–
alternativeSep 23 '10 at 21:53

2

What I like is hippie-expand... it is profoundly more useful to me than code completion.
–
Paul NathanSep 23 '10 at 22:14

2

@mathepic And exactly how many people know to do that?
–
TheLQSep 23 '10 at 22:21

2

It's impressive if you've been programming since the mainframe days.
–
AShellyOct 4 '10 at 5:52

4

Guys, if you don't find this answer appealing, please vote for another answer instead, rather than disagreeing in the comments. It's a subjective question, so the answers given are likely to be too.
–
JBRWilkinsonOct 4 '10 at 22:18

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.

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.

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.

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.

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.

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.