Hacker News new | ask | show | jobs
by michaels0620 5281 days ago
I wonder if this is something that could at least be partly offset by an IDE. Highlighting a function and instead of being able to jump to the definition, it sticks the code for that function where it is being called (initially, only as a view, offset stylistically).

That way you can expand the selections and see what is going on from an actual code standpoint without jumping from file to file, but you could jump to where the actual source is, if you want to go change it.

3 comments

Sounds somewhat like Code Bubbles:

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

It's a similar approach to the same problem. Code Bubbles make the jumping more palatable. I'm not sure you would need such a drastic change to the traditional IDE look to implement what I describe. You could (for instance) simply have the code (set off stylistically) expand in-line pushing the code below it down the screen. This would get rid of the jumping altogether.

Of course this approach raises its own issues. Can you expand a function within an expansion, how would that look, usability, and so on.

Interesting, it could work like code folding. Bonus points for graying out dead code paths according to arguments given. Modification could very well be in place as the folding can be a partial inline buffer.
Many times I've dreamed of having such an IDE. I'm sure others here have too.

Anyone ever tried writing it? Just wondering if there's a reason why it doesn't exist yet.

I once wrote a parser that did this for a large and undocumented Object Pascal project. The problem is OO code enables run time binding to objects and functions, so your compile time decoder often returns ambiguous results. However, I found simply including possible code paths was still useful because they tend to be related functionality to what you are debugging.