Live data from Hacker News

Show HN: Visualizing a Codebase

octo.github.com

41–50 of 101 posts

Re: Show HN: Visualizing a Codebase

#41
Took a look at my own codebase, which is 99% Rust. All gray, I'm guessing Rust isn't currently a recognized file type? Either way, very nice! I currently use the "dirtree" tool (https://github.com/emad-elsaid/dirtree) to generate diagrams like this of my codebase for documentation: https://github.com/WhiteBeamSec/WhiteBeam/wiki/Code-layout

The "eralchemy" tool (https://github.com/Alexis-benoist/eralchemy) is also excellent at visualizing SQL databases: https://github.com/WhiteBeamSec/WhiteBeam/wiki/SQL-schema

Re: Show HN: Visualizing a Codebase

#42
Apologies for the hot take, but imo GitHub has been really knocking it out of the park with terrible ideas lately (remember how everyone fell all over themselves during the Copilot release?). This is an absolutely worthless visualization that only impresses those that haven't heavily worked with visualizations. A few points right off the bat:

    - Labels are way too small, so you'll need to zoom in..
    - ...but if you zoom in, you'll need to pan...
    - ...and if you need to pan, you lose context
    - Hovering over "connected files" is just a jumbled mess
Case in point: look at the `paperjs/paper.js` example they themselves provide. There's a big circle called "packages" and inside that circle, two smaller circles that all contain the exact same files: "package.json," "index.js," and "README.md" -- how is this insightful in any way? I need to go to the repo to actually see that one of the folders is called "paper-jsdom" and the other one "paper-jsdom-canvas." The visualization literally confuses me more than just looking at the repo.

I don't mean to be overly negative, but it's just not a good visualization and no one will ever seriously use this.

Re: Show HN: Visualizing a Codebase

#43
post #42

Apologies for the hot take, but imo GitHub has been really knocking it out of the park with terrible ideas lately (remember how everyone fell all over themselves during the Copilot release?). This is an absolutely worthless visualization that only impresses those that haven't heavily worked with visualizations. A few points right off the bat: - Labels are way too small, so you'll need to zoom in.. - ...but if you zoo…

I don't think it's useful in it's current form (except perhaps for newcomers to a project to have an idea of the file structure at a glance).

But I also don't think they're trying to present this as a new killer feature they've been working on for years.

I'm pretty sure this is just an experiment/exploration done by a few people over a few months to see what they found, then they presented their results.

Re: Show HN: Visualizing a Codebase

#44
post #42

Apologies for the hot take, but imo GitHub has been really knocking it out of the park with terrible ideas lately (remember how everyone fell all over themselves during the Copilot release?). This is an absolutely worthless visualization that only impresses those that haven't heavily worked with visualizations. A few points right off the bat: - Labels are way too small, so you'll need to zoom in.. - ...but if you zoo…

While I wholeheartedly agree, I'd argue there is value in having R&D teams tinkering around with different ideas. They may churn out duds, but theoretically they will produce something valuable eventually.

Re: Show HN: Visualizing a Codebase

#45
post #18

My favorite tool for visualizing a codebase is Gource. Here's a 1 minute visualization of the Linux Kernel repository from 1991-2015 https://twitter.com/mattrickard/status/1423366779590430721

I was about to also mention Gource.

Here's a render I made in December, "1500 Commits (39 months) in 1 and a half minutes": https://www.youtube.com/watch?v=szhYhph4C2U

And he's another one I made a few years ago, "100 Commits (18 months) in 1 minute": https://www.youtube.com/watch?v=aIN4mOdL0d0

Re: Show HN: Visualizing a Codebase

#46
post #42

Apologies for the hot take, but imo GitHub has been really knocking it out of the park with terrible ideas lately (remember how everyone fell all over themselves during the Copilot release?). This is an absolutely worthless visualization that only impresses those that haven't heavily worked with visualizations. A few points right off the bat: - Labels are way too small, so you'll need to zoom in.. - ...but if you zoo…

The guy literally says he timeboxed his exploration on this experiment.

I think it's pretty cool and would love to have the option to navigate repositories like this.

Re: Show HN: Visualizing a Codebase

#47
post #31
post #23

I worked on something like this a few years ago, only in VR so you could walk around the visualization and use your spatial recognition abilities in 3D. One part we struggled with was evolving the visualization with the codebase. I see in the demos at the bottom that small changes to the codebase can have a large impact on the visualization (unless I'm missing something), making it difficult to treat the visualizatio…

My big bet (10% confident it's correct and will be world changing), is that having languages that rely on spatial position of tokens in a 2D or 3D grid will be a big leap forward and make 3D visualizations quite natural. I think 3-D visualizations of 1-D languages (all our current programming languages are 1-D) will not be so helpful, as you will be looking at transformations, not the actual code as it exists. If any…

I have also been thinking about building something like this.

I believe there should be a presentation layer separate from the code. Give people tools to build an empty building (or city) via floorplans; allow them create pleasing spaces in VR. Then the actual code machinery (literally represented as machines) is built inside the various rooms.

My hope is that organizational/bikeshed concerns are funneled into the architectural/interior decoration layer, whereas engineering is housed in those 3D spaces relatively undisturbed. The needs of the code would exert influence on the architecture as new spaces would be required for new functions, or rooms would be rearranged to better reflect dependencies and coupling.

Re: Show HN: Visualizing a Codebase

#48
post #39

Earlier quoted context omitted.

That sounds interesting, can you give more details about that? I work on Vircadia ( https://vircadia.com/ ) and have been thinking for a while that it would be cool to have in-world visualizations of things like the project's structure and github activity. It's a big one, so perhaps the right 3D representation would make the project's structure more understandable at a glance.

I haven't worked on the project in a while, so I can't comment too much on the current status. But I'm happy to talk about what I learned, the challenges I faced, etc. if you have any questions about those. The multiplayer aspect is immensely valuable. Having multiple developers walk around the same codebase together, discussing the architecture and the code, is helpful for debugging, onboarding, brainstorming, all t…

I have no idea of which project you're talking about, so I think it would help if you explained what it looked like. Do you have any screenshots?

How do you navigate it? How do you search for text in VR?

What do you visualize exactly?

Is it a static or a dynamic display? Can you drill down to actual lines of code?

How do you deal with large projects? Vircadia has 400K LOC and 11K files.

Re: Show HN: Visualizing a Codebase

#49
post #30

Oddly enough, the page partially loads, hangs, crashes the tab and attempts to reload, hangs, and then crashes the entire running mobile chrome instance on my phone. I don't think I've ever seen that before! I'm guessing the page is just memory heavy and android 11's memory manager can't figure out how to deal with it. ( chrome mobile, pixel 3 xl, android 11 )

100% cpu for me, browser tab uses 3+ GB ram, chromium hangs then crashes

oh no! My best guess would be that there are many element-heavy SVGs on the page. I was hoping for better performance, since the files will almost definitely be smaller than large raster images, but there are likely older browsers that have trouble with that. I'll look into it, thanks for the report!

Re: Show HN: Visualizing a Codebase

#50
post #42

Apologies for the hot take, but imo GitHub has been really knocking it out of the park with terrible ideas lately (remember how everyone fell all over themselves during the Copilot release?). This is an absolutely worthless visualization that only impresses those that haven't heavily worked with visualizations. A few points right off the bat: - Labels are way too small, so you'll need to zoom in.. - ...but if you zoo…

I don't think it's useful in it's current form (except perhaps for newcomers to a project to have an idea of the file structure at a glance). But I also don't think they're trying to present this as a new killer feature they've been working on for years. I'm pretty sure this is just an experiment/exploration done by a few people over a few months to see what they found, then they presented their results.

Spot on! It's a space I've been wanting to explore, and so have been tinkering with it this last week while we're in between larger projects. I definitely don't see it being a product in it's current gotten, but wanted to share the exploration! Although I will say that the more I've been visualizing different repos, the more convinced I am that it's more useful than is easy to convey.
Post reply on HN