Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share

locked by maple_shaft Jul 28 '13 at 12:34

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 Wijsman Sep 30 '10 at 15:54
5  
Real programmers use butterflies. –  rightføld Oct 5 '10 at 20:57

20 Answers 20

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 =-{

share
2  
Wow. That video... I'm drooling. Can I have this for C++, please? –  sbi Oct 5 '10 at 17:06
1  
+1 Although I don't like the current GUI, the concept itself is pretty amazing... –  Tom Wijsman Oct 6 '10 at 16:13

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.

share
2  
I haven't used this yet, but I want to. –  AShelly Sep 30 '10 at 16:04
2  
the problem is that you can only do this with MS languages (managed) and not with C++, for instance –  flow Oct 4 '10 at 15:15

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.

share

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].

share

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.

share

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

share

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

share

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.

share

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.

share

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

share

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)
share

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.

share

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.

share

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.

share

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.

share

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

alt text

share

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.

share
3  
Oh, do elaborate! –  Mark C Oct 4 '10 at 16:36

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

share
1  
Can you please maybe give some examples for those who never seen it in action (me) –  serg Sep 23 '10 at 21:17
9  
If your text editor can replace you in writing code, I have some bad news... –  Pavel Shved Sep 23 '10 at 21:28
3  
foreach(var matche in regex.Matches(str)). Also sets matche as an object rather than a Match, not very useful. –  Callum Rogers Sep 23 '10 at 22:53
1  
@Callum: True, but that's just because MatchCollection is an untyped collection. For proper collections, var works great. (I still don't like it though) –  configurator Sep 30 '10 at 23:53
1  
this is a feature in eclipse too. –  NimChimpsky Oct 4 '10 at 9:44

Code completion

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

share
3  
Not actually all that impressive, you can do that just by analyzing a TAGS file. –  alternative Sep 23 '10 at 21:53
2  
What I like is hippie-expand... it is profoundly more useful to me than code completion. –  Paul Nathan Sep 23 '10 at 22:14
2  
@mathepic And exactly how many people know to do that? –  TheLQ Sep 23 '10 at 22:21
2  
It's impressive if you've been programming since the mainframe days. –  AShelly Oct 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. –  JBRWilkinson Oct 4 '10 at 22:18

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

share
1  
Eclipse has it as well (use it all the time). Useful - very. Magical - not so sure. –  serg Sep 23 '10 at 21:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.