Light Table: A New Spin on the IDE
New submitter omar.sahal writes "Bret Victor demoed the idea of instant feedback on your code. ... Allowing the programmer to instantly see what his program is doing. Chris Granger has turned this novel idea into Light Table — a new IDE designed to make use of Victor's insights."
The screenshots make this look like it could be genuinely useful — like a much fancier and more functional combination of features from SLIME and Speedbar. There's a Google group for those wanting to track development. There's no code yet, but source is promised: "I can guarantee you that Light Table will be built on top of the technologies that are freely available to us today. As such, I believe it only fair that the core of Light Table be open sourced once it is launched, while some of the plugins may remained closed source."
How is this different from something like IntelliSense, the consoles of many scripting interpreters or simply splitting up code into various panes? This looks like a unification of ideas in a nifty wrapper rather then something revolutionary or deeply insightful.
...not some guys idea of IDE-NG
Here's the funding plan:
I'm happy to announce that we submitted our Kickstarter earlier today and are simply waiting for it to be reviewed.
In other news, to save everyone the time, I'll point out that 100 people are going to post the lighttable does what smalltalk did in the 80s. As with all IT and most CS stuff, there really is nothing new under the sun, just recycling. That doesn't mean its bad, or reimplementation of a good idea is bad, just that it isn't new.
"Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
From the article:
Files are not the best representation of code, just a convenient serialization.
I've been thinking about this for a while and I think we do need a new generation of IDE which isn't based around showing source files in tabs, but rather code snippets (functions, class definitions etc.) on some kind of desktop. When I'm debugging code I don't want to jump through X files, I just want to see the X related functions so I can understand the programs flow etc.
Most of what they showed is either already being done with different interfaces, or would be nearly useless with a large program. Visual Studio has had a feature where you can see all the variants of a function, the function documentation, variables required, etc. for years just by typing the function name. The live data view is cool, but I don't see it working as well when your call stack gets to a couple dozen layers, either it will have to expand to the point that you can't really see anything, or it will conveniently ignore little things like external resources and threading issues. This really looks like an attempt to build an IDE by someone who hasn't worked with an IDE before and thinks that vi or emacs is the best way to write code.
You mean, like Code Canvas?
http://research.microsoft.com/en-us/projects/codecanvas/
Karma: Poor (Mostly affected by lame karma-joke sigs)
That's called "open core".
Pity.
Expert in software patents or patent law? Contribute to the ESP wiki!
Code without files, exists since a long time and it's called Smalltalk.
This does seem sort of what LightTable seems to be aiming at, actually.
Beside the usual runtime inspection of data structures, you can evaluate expressions in the context of the app being run, even those not existing in the app itself. And the evaluation includes calling the app's methods and modifying its state.
I have to admit, I'm not really sure what's new here; you can do the same sort of thing in Visual Studio and Eclipse, as far as I know.
If documentation is available, Intellisense (or Eclipse's equivalent) will pop it up along with the function's parameters when you start typing.
If you want to play around with code, you can pause the debugger and see what happens in the Immediate Window.
If you want to search for a particular function, well, that's why you've got Google open in another window; it's a lot nicer than messing around in the IDE.
If you want to see how data is flowing through your functions, you can watch variables, which are less confusing; in the demo, variables get replaced with the current literal value, which might make you forget that there's actually variable there after a long coding session. I do admit that his idea of keeping track of what every function's state was when it was initially called and displaying that is interesting, but I'm not sure how that would work with loops or recursion (do you show the looped function multiple times?)
The only really interesting thing is this idea of pulling related functions next to each other so you can look at them all at once, but I'm pretty sure the rest of the functionality isn't very novel.
Yep, but without the eye bleeding UI ;)
Another benefit of moving away from explicitly managing files is that the computer is probably in a better position than the user to decide how to present the code to the compiler / linker. It could also have benefits in source control where you could track the history of an individual function better (imagine if someone refactors a function from one file into another).
Live debugging seems cool, however, basically every other feature is already implemented better in Visual Studio, Eclipse, or Netbeans. Hell, I have 95% of the functionality in Vim already. Why not just make the live debugging a plugin to one of the more mature editors? It seems you would get a whole lot more bang for your development time that way.
Yep. That's called SmallTalk.
Cantankerous old coot since 1957.
So, you want Smalltalk code browsers. This IDE concept is nothing new, Smalltalk had that kind of code browising from the start and the concept of a live image where every code change is done in a live vm. The only thing I see new here is some "modern" "HTMLy" UI
Doesn't work with languages such as C++....
You could do that today, in some programming environments, anyway. Some programming languages / compiler combinations allow classes to be split among files, into individual methods, if desired.
Karma: Poor (Mostly affected by lame karma-joke sigs)
Sure, you can do runtime code modification in Lisp, but this approach won't work with C++ or Java.
That's still a textual serialization though, just with a different container. Since there is a one-to-one mapping between classes and files in Java, it already kinda does that.
Maybe there's a way to represent code with no text commands at all? CryEngine's Flowgraph already does that, but its solution is of limited use (it gets really messy with more complicated code).
You mean, "You mean, like Code Canvas (minus the 'Microsoft')"? This is /. after all.
There's no reason why it couldn't. The underlying code can still live in a collection of .h/.c/.cpp files, I'm just asking that the IDE present that code to the developer in a different way.
Personally I wouldn't mind something like Star Trek style coding.
AI-backed coding would be pretty interesting if done right.
While I really like VS, there are some irksome points... namely that plugins are now fairly plentiful, but when it slows to a crawl, there's no way to tell which plugin is the culprit. Second is that half the times it crashes, it loses my settings.. I like VS on my left monitor with the nav panels on the left... code to the right, and my right monitor for running/previewing. It resets and that's annoying. That and the rare occasion I'm supporting a VB.Net project it crashes 5x as much.
That said, I can have a new web project to the "hello world" stage much faster than say Eclipse for a similar project. This isn't meant for flamebait, just my own opinion. I wouldn't mind seeing some enhancements, and hope this is a successful effort. Personally I'd love to see continued advancement for JS development, specifically with NodeJS in mind.
In C++, textual order matters.
The day my IDE is more rounded corners and empty space than actual code is the day I quit programming forever.
Luckily, my "IDE" is vim. Works great, about 50x more useful and faster than anything else I've tried and is available to me no matter where I am or what operating system I'm on at a given time.
Opinion may be harshly (and indeed prematurely) divided on the actual usefulness or originality but at least we can agree that it's pretty.
Right?
I like the interactive "debugging" features that allow you to run selected functions from your code and see the results in realtime. Seems like he might be onto something there. Will be interested to see how it develops.
I've been using the frank gem with Ruby to see / explore effects of code changes in the browser.
The browser becomes a high-end output device (through frank's Auto-Refresh) for my text inputs.
http://stephan.sugarmotor.org
...that's scripting. Any time you can gain insight into your code by seeing variable values substituted for names, (which used to be called watched variables long ago), your code just isn't advanced enough to be doing anything legitimate. That's great and all when you're learning to program in school, and you were asked to use a few functions to make something happen. But that's not programming.
When, professionally, I write my own function, I can't make judgements based on actual variable values! A given function is called from at least three dozen places, and here's the kicker, in more than three dozen different ways. That not only means that flow paths change, but the actual value of a parameter can have drastic effects on what the function actually does. I don't mean that 3 becomes 30 and 4 becomes 40. I mean 3 becomes apple and 4 becomes an array of database results.
The entire idea of advanced programming is to use variable instead of actual values because programming is more powerful than markup. Because I can bring real intelligence to a function's operation.
And if I dared to modify a function based on a set of run-time values for one of those scenarios, I'd risk instantly breaking every other run-time scenario where that function is being called.
Now, if Light Table, or some IDE wants to show me every time my function is being called throughout my entire project, with every distinct set of parameters that it's ever received, and allow me to pair down the ones that I say are structurally identical, then yeah, that would have merit. Of course, it would be showing me about a hundred different scenarios for my one function, and would be based on weird run-time and user-input cases that simply couldn't be reproduced without actually running my entire project, so it would be impossible to simulate once I make one change to any other function anywhere else in my project.
Making things like this excellent academic learning tools, and nothing else. It simply removes the fundamental abstraction that is programming, and replaces it with information that I didn't need. I don't need documentation for a language that I use professionally. And I don't need to see the functions called by my function. Not only am I not able to comfortably change those sub-functions, but there are going to be at least fifty of those sub-functions if my code does anything impressive at all.
And you've consumed half of my screen real-estate.
Too bad it will never work. As of this day I haven't found a single development environment where installing the documentation into the IDE was not a pain in the ass. And all of them come in a form that is not easily extracted by other applications. Creators of the platform seem to have a vested interest in controlling distribution and presentation as much as possible.
- Visual studio needs a downloader/installer and a goddamn local webserver to even show .NET docs. And inline xml documentation is awfully verbose, maintaining it is a nightmare.
- Java IDEs need an archive filled with html page from oracle. Why it doesn't come with the JDK by default I'll never know. At least inline docs are sane.
- Flash documentation is a nightmare in just about every way possible.
- Unity, the game engine I'm working on right now, again uses a pile of html for its documentation, which comes with the installer.
- Last time I used c++, the best documentation was cplusplus.com, which of course was awkward to search and impossible to download for local use. (I might be wrong about that these days though. Don't know if there were any significant changes.)
I just don't see documentation like this becoming big unless everyone agrees on a common format for every language and every platform and make all documentation available for online and local use, no strings attached. This will never happen.
Then you see an IDE in your IDE, in which you could create another IDE, and ...
This is getting closer to what I've been hoping for.
Glad to see the realtime filtering of documentation too. That's something that's been missing from not just programming languages, but software and Windows in general (my own documentation for a program called opalcalc takes this to its logical conclusion at the bottom of the page).
What I'd really like to see though is not just real-time filtering of functions/methods/variables (each with their own metadata, so a word such as "exit" can be associated with "close" or "quit"), but ALSO where each function is ranked according to how much it's used. This will vary somewhat from person to person and program to program, but more often than not, some methods (and variables) from a class will be used much more often than others in general. It would be nice to see these at the top when given (often hundreds of) potential candidates.
Why OpalCalc is the best Windows calc
I like the idea of working on a function at a time, not a file at a time. Code folding in VIM gets me part of the way, but searching for text unfortunately includes folded text and automatically opens the fold for me. Not what I want. Technically, functions shouldn't be that long to have to search but in reality, one has to work with 'fine' code sometimes. :)
I thought we'd all moved on to SATA by now.
In C++, textual order matters.
Which would (and can) still be retained in the underlying source code files. The visual representation at the IDE level *does not have* to be viz-a-viz with actual physical textual ordering of definitions and declarations.
How to get that in a useful manner, that's another question. After all, tools and enviroments like VB, VFP and PowerBuilder attempted to show code in snippets as opposed to walls of text. Attempted they did and the results were mixed. Sometimes it helped, sometimes it got in the way.
So, that is the trick, in the delivery of the concept. But the concept itself, it is not computationally impossible, not even with a PL where textual order matters.
So, that is the trick, in the delivery of the concept. But the concept itself, it is not computationally impossible, not even with a PL where textual order matters.
Responding/adding to my self:
1. Why does the screen shots have to sample LISP code? :)
2. Tools like this *might* enforce people to functions and methods that are smaller, with lower cyclomatic complexity and with better composition, cohesion and structure. It would be very hard to visualize a 300-line long spagetti wall-of-text-function ;)
Something I was confused about in Victor's talk. The code he was editing seemed to be really short.
For my code, it takes a few minutes for the code to compile -- sometimes as long as 10 minutes if you're doing a full rebuild.
How could you use a tool like this in that context?
It would be very hard to visualize a 300-line long spagetti wall-of-text-function ;)
Not much harder then visualizing 300 line long functions (plus one more to glue them together).
This IDE sounds all exciting as long as you're working on a program that displays "Hey Chris!", not so much if you think of larger projects.
It would be very hard to visualize a 300-line long spagetti wall-of-text-function ;)
Not much harder then visualizing 300 line long functions (plus one more to glue them together).
This IDE sounds all exciting as long as you're working on a program that displays "Hey Chris!", not so much if you think of larger projects.
You are missing the point (the one about size of unit of code and complexity): A system consisting of 300-line long functions/methods/proc/anything is a PITA to work with. Yes, it could be visualized, but it will be of little help to the poor soul that happens to inherit such a system.
Or maybe I am misunderstanding the point you are trying to make. I'm being honest, we could be talking about completely different things.
I have to say, I hate having to jump around multiple files, and multiple places in the files, to be able to see something.
Yes, but the programmer still has to do that splitting manually.
Not much harder then visualizing 300 line long functions (plus one more to glue them together).
Odds are I don't care about all 300 at the same time. I only care about a couple of them at once.
I meant line long functions, three hundred of them. As in, the result of factoring out shorter functions from 300-line long one.
Even if you go all higher-order and code-reuse on its ass and get it down to 50 functions (and 50 lines of glue), it's still a lot to visualize at once, especially since every of them are called half a dozen times with different parameters now.
And in relation to a response below ("Odds are I don't care about all 300 at the same time. I only care about a couple of them at once.") - it just becomes no more useful then usual code walking, and I guess latence of tracing thru those 298 inbetween the two you're inspecting is still there.
Sorry but that's a stupid idea. You don't have to hunt through files anyway if you have a decent IDE.
So, you want Smalltalk code browsers. This IDE concept is nothing new, Smalltalk had that kind of code browising from the start and the concept of a live image where every code change is done in a live vm. The only thing I see new here is some "modern" "HTMLy" UI
If a Kickstarter project and a new IDE is what it takes to get these ideas more commonly used, as a former smalltalker, I'm all game. The "live VM" idea of Smalltalk was probably way ahead of it's time - with JITs and a much higher baseline of compute power even in smartphones, it's now high-time we start seeing code as beyond text files or db blobs.
I'm still waiting for a non-smalltalk VM to feature the power of the walkback.
Make sure everyone's vote counts: Verified Voting
... The "live VM" idea of Smalltalk was probably way ahead of it's time - with JITs and a much higher baseline of compute power even in smartphones, it's now high-time we start seeing code as beyond text files or db blobs.
I'm still waiting for a non-smalltalk VM to feature the power of the walkback.
Sing it brother.
XML is a known as a key material required to create SMD: Software of Mass Destruction
From the article:
Files are not the best representation of code, just a convenient serialization.
Trivially true: files aren't the "best" representation of code because the definition of "best" depends on context and goals (which shift constantly during a work session). That's a sort of non-claim. Absolutely true: files are a convenient serialization of code.
Some folks will look at the trivially true claim and think "Boo files! Let's do away with files altogether!". Then they will go off and develop something that throws away the absolutely true part of the claim [I'm looking at you Squeak, Centura SQL/Windows, Visual Basic, etc.].
Some will be smarter (or rather, more well-funded) and develop something that lets you have your cake [store data in text files] and eat it too [work w/alternate representations]. Despite all its drawbacks, XML has been a major enabler of this, and it has the advantage of playing nice with version control and other file management tools.
Some folks will be even smarter yet and figure out different ways to exploit the absolute truth: for instance, static HTML operates quite successfully on file based representation. That economy let it win the hypertext wars before they even began. Or as another example, the D programming language strengthens the meaning of the "file" as the logical unit of management (for instance, a private member is visible to all code within the same file, regardless of whether it's in a different class or not).
So I guess what I'm saying is... consider fad-ish claims carefully and try to place them in a more holistic perspective.
-1, Too Many Layers Of Abstraction
Code Bubbles looks pretty nice. Unfortunately it's for Java.
There are some times (such as HTML generation) where the intermediate results would be useful to see right away.
There are other times when they would just annoy you. If I've got an algorithm in mind and I have to type 20 lines of code, I don't want to be bothered by the panel on the right showing me all the stuff I know is wrong.
This reminds me of Google's dynamic search; but for code. I turn off dynamic search because it's too CPU intensive for my machine.
Why exactly do you want to see code as something other than what it is?
Abstraction layers lead to nothing but hassle...
is something that does "live preview" pretty much? there's limits to what seems like a non hassle to do with it though.. seems ok for mocking up listviews and the alike.
you could configure android ide to do "live preview" too for your custom controls. it's a bit of teh suck though.
world was created 5 seconds before this post as it is.
In Conversational Programming your program is executed all the time and annotated. The Bret Victor approach does not scale well in comparison because it tries to compute everything. That works fine for a toy example such as a simple drawing but what if your application has many objects interacting with the user or interacting with each other? Long answer in the paper but the short one is that you need to be able to focus on bits of code relevant to the users as suggested by the user through the selection of objects:
http://www.cs.colorado.edu/~ralex/papers/PDF/Conversational-Programming%20VL-hcc2011.pdf http://www.agentsheets.com/Documentation/windows/Reference/conversational_programming.html
someone's been at the Helium a bit too much.
You don't seem to have any idea of how mocking and dependency injection can be used to avoid the combinatorial explosion in a completely trivial way.
Both Code Canvas and Light Table are really exciting for me, and BOTH make me wish I was still coding...
Love the arrows through the Code Canvas debugger stack thing... Gimmick perhaps, but I'd find it really useful (if I were still coding, of course...)
That is all.
ahead of it's time
"its".
It's probably less faddish than you think because a metadata based system encompasses files completely. For example, each tab in your IDE could instead be a keyword which filters out the functions/variables that come under that category. By removing the filter/s, you have a 'document' which contains all the code in the entire project.
Thinking files is ultimately a good idea is almost as bad as saying each HTML page should imitate the A4 size of paper, rather than a (possibly) infinitely long page.
Why OpalCalc is the best Windows calc