Live data from Hacker News

GoCity – Code City metaphor for visualizing Go source code

go-city.github.io

31–37 of 37 posts

Re: GoCity – Code City metaphor for visualizing Go source code

#31

Very interesting! We built something very similar a few years ago for visualizing code complexity (or other metrics) over large code bases, it's also open-source: http://quantifiedcode.github.io/code-is-beautiful/ Here's e.g. the cityscape visualization of the Django codebase: http://quantifiedcode.github.io/code-is-beautiful/code-city/ We also did some 2D versions of the same graphs, which are often a bit easier to…

Nice! We also have an internal tool for this that was somewhat recently open-sourced: https://github.com/MaibornWolff/codecharta. It's been quite useful in several projects I've been on, especially when used on legacy codebases to visualize improvement as a refactoring/rebuild project progresses.

Re: GoCity – Code City metaphor for visualizing Go source code

#32
post #11

Very interesting! We built something very similar a few years ago for visualizing code complexity (or other metrics) over large code bases, it's also open-source: http://quantifiedcode.github.io/code-is-beautiful/ Here's e.g. the cityscape visualization of the Django codebase: http://quantifiedcode.github.io/code-is-beautiful/code-city/ We also did some 2D versions of the same graphs, which are often a bit easier to…

This is really neat, does your team/you actually use this in a meaningful way? Take a snapshot of a project occasionally to get an idea of whether it's getting unwieldy, etc.?

We actually use our similar tool (see my reply to parent comment) in a typical CI/CD pipeline. The generated output can be visualized and browsed anytime. The tool can visualize differences between different analysis states, which makes it very useful to demonstrate progress as a project grows, especially on pre-existing codebases that are refactored/rebuilt.

Re: GoCity – Code City metaphor for visualizing Go source code

#33

Very interesting! We built something very similar a few years ago for visualizing code complexity (or other metrics) over large code bases, it's also open-source: http://quantifiedcode.github.io/code-is-beautiful/ Here's e.g. the cityscape visualization of the Django codebase: http://quantifiedcode.github.io/code-is-beautiful/code-city/ We also did some 2D versions of the same graphs, which are often a bit easier to…

I love this. Do you happen to know if there's anything similar for ruby?

Re: GoCity – Code City metaphor for visualizing Go source code

#34
post #2

Reminds me of FSV: http://fsv.sourceforge.net/screenshots/10.png (which was a clone of some even earlier SGI demo app - http://www.siliconbunny.com/fsn-the-irix-3d-file-system-tool... ) Anyone know of other metaphorish visualizations that might be useful for navigating code or graphs?

One format I liked is distellamap, [1] a visualization of some Atari 2600 games in poster format.

https://benfry.com/distellamap/

Re: GoCity – Code City metaphor for visualizing Go source code

#35
post #7

Earlier quoted context omitted.

How can you mention those tools without also noting their most famous on-screen appearance: the "hacking" scene from Jurassic Park :-) This is almost the opposite of what you're asking for, but I am reminded of a rather more 2D version of these tools for finding what is using up space on your hard drive: the very excellent SpaceSniffer [1], which is sadly only for Windows. [1] http://www.uderzo.it/main_products/space…

That tool reminds me of KDirStat ( http://kdirstat.sourceforge.net/ ).

That looks promising; pity it doesn't put the file/directory name in the graph. It looks like KDirStat and its successor QDirStat have a split pane view, with file names at the top and anonymous rectangles representing file sizes at the button. It's hard to express how much more effective it is to see all the information in one visualisation. It sounds like a small thing but it's really the whole point of the tool.

The are issues about it in the QDirStat repo. The author has two objections: The first is that it would look ugly. That's pretty silly: obviously function is more important than looks when I'm tracking down disc space usage. Their other objection is that in Linux you have such a wide directory structure that all the labels would be uselessly crushed into tiny boxes anyway. That also doesn't make much sense to me; even if you have a lot of directories in your tour directory, usually there's only one or two containing the vast majority of disc usage (that's why the tool's useful on the first place!) so their labels will be clear, and if the others aren't then I don't care because I'm not interested in then in the first place. Perhaps the real problem is that QDirStat doesn't have the ability zoom in and out, and to increase and decrease the visibility depth, that SpaceSniffer does, which is also needed to make labels useful.

Sorry, I didn't mean for that to turn into an essay!

Re: GoCity – Code City metaphor for visualizing Go source code

#36
post #33

Very interesting! We built something very similar a few years ago for visualizing code complexity (or other metrics) over large code bases, it's also open-source: http://quantifiedcode.github.io/code-is-beautiful/ Here's e.g. the cityscape visualization of the Django codebase: http://quantifiedcode.github.io/code-is-beautiful/code-city/ We also did some 2D versions of the same graphs, which are often a bit easier to…

I love this. Do you happen to know if there's anything similar for ruby?

In theory you can use it for other languages as well, you'd "just" need to implement an analyzer for that language using checkmate. Currently we do not actively develop this project so I'm not able to help you with this, will be happy to provide guidance on the process if you want to implement it yourself.

Re: GoCity – Code City metaphor for visualizing Go source code

#37
post #31

Very interesting! We built something very similar a few years ago for visualizing code complexity (or other metrics) over large code bases, it's also open-source: http://quantifiedcode.github.io/code-is-beautiful/ Here's e.g. the cityscape visualization of the Django codebase: http://quantifiedcode.github.io/code-is-beautiful/code-city/ We also did some 2D versions of the same graphs, which are often a bit easier to…

Nice! We also have an internal tool for this that was somewhat recently open-sourced: https://github.com/MaibornWolff/codecharta . It's been quite useful in several projects I've been on, especially when used on legacy codebases to visualize improvement as a refactoring/rebuild project progresses.

Thanks for sharing this, it looks very nice and polished!
Post reply on HN