Hacker News new | ask | show | jobs
by arghbleargh 4331 days ago
This is a pretty interesting concept, but the site doesn't do a good job of explaining exactly what it does. A realistic step-by-step example would help a lot. Is it doing some kind of static analysis, or is it looking at the object graph at some specified point in the program's execution?

I think it would be really useful to have a tool that visualizes execution paths of programs to help you understand the general architecture of someone else's project. I believe debugging tools are able to do this to some extent, but I haven't seen anything that exactly fits, especially for JS. I would want to be able to do some interaction (e.g. mouse click) and see a visualization summarizing all the lines of code that were run without stepping through them one-by-one. Maybe this is a direction that PojoViz could go in eventually.

1 comments

Actually I wrote a step-by-step example of the Object function in the readme file, what PojoViz does is just make an analysis of the structure of the library without running any code from it, it's pretty simple but the results are kinds amazing like discovering that Function.prototype is actually a function O:, but your idea is awesome and should be the next step of PojoViz, thanks!
Just a heads up, analyzing the structure of code without running it is called static analysis. If you're going to continue working on this, you may want to look into using a parser like Esprima (http://esprima.org/).
Thanks :)