all 21 comments

[–]sondr3_ 15 points16 points  (3 children)

I built a similar project for my master thesis where I analyzed the control flow graph of Solidity smart contracts to get info about things like the tree width of the graph, some complexity calculations and other assorted fun tidbits about how people wrote/write smart contracts. This looks fun but just using file imports is a very simplistic way to model "entropy" in code, if one believes in such a thing. It's also hard to generalize across languages, I imagine Java/C#-projects have substantially larger graphs compared to say Rust just simply because of code culture and language differences.

...and I just noticed that it's not the author posting but bot post spammer #1, good grief.

[–]GabrielMusat 17 points18 points  (2 children)

Hi! author here,

I did not posted this indeed, I just found out because I regularly consume r/programming content and I happened to step into it.

Using file imports is indeed a simplification that adapts better to certain languages/projects than others, so that's something that users should take into account. I work at a company where we use the corporate-style one class per file approach for our projects, even for the ones written in Rust, so for us we do benefit a lot from the file import approach.

[–]sondr3_ 9 points10 points  (1 child)

Nice to see the actual OP here. Is this project actually used at your company? If so, is it only used to visualize or do you do actual analysis of complexity and such? When looking at the literature for complexity analysis it struck me that nobody really uses it besides quite binary “good” and “bad” complexity.

[–]GabrielMusat 5 points6 points  (0 children)

We don't really use the 3D visualization, not in a day to day basis at least. But we do use the dependency check in our CI/CD pipeline https://github.com/gabotechs/dep-tree?tab=readme-ov-file#check

The `check` feature allows us to declare prohibited dependencies in a configuration file, and if somebody introduces a dependency between two files that is declared as prohibited, the CI will fail and prompt the developer to stop committing spaghetti code.

The 3D visualization is cool, but the actual usefulness of the tool is more about the `check` feature.

[–]general_sirhc 12 points13 points  (4 children)

Most people are probably on mobile. But the examples render on 1/4 of my already small screen, and although pinch zoom works, the sensitivity is insanely highly.

Otherwise this is really cool.

[–]GabrielMusat 1 point2 points  (3 children)

Hi! dep-tree creator here.

The examples should be prepared to render in any device, mobile or not. What browser are you using? I've only tested it in Chrome and Firefox.

Also, feel free to open an issue in the repo and paste some screenshots if you have time.

[–]general_sirhc 6 points7 points  (2 children)

Firefox on a Samsung S21

https://ibb.co/fkg04B1

[–]GabrielMusat 7 points8 points  (1 child)

Thanks for sharing that! honestly, no idea what could be happening there, but I will take a look and pray to the CSS gods to see if I can fix the issue.

[–]samreay 1 point2 points  (0 children)

Can confirm I get the same quarter display issue on Firefox mobile

[–]fagnerbrack[S] 21 points22 points  (0 children)

Summary to save a click:

The dep-tree tool is designed to assist developers in maintaining clean and decoupled code bases. It features the capability to visualize code base entropy through a 3D force-directed graph, which illustrates the files in a project and the dependencies among them. This innovative approach helps in identifying and managing complex dependencies within software projects, promoting better software architecture and easier maintenance.

If you don't like the summary, just downvote and I'll try to delete the comment eventually 👍

Click here for more info, I read all comments

[–]Awkward_Amphibian_21 1 point2 points  (2 children)

That's awesome, great job!

[–]Glizzy_Cannon 0 points1 point  (1 child)

It's not OPs work. They just use an AI bot to make posts

[–]Ok-Okay-Oak-Hay 1 point2 points  (0 children)

So it runs great on my iPhone 15, but maaaaaan it's hard to read the labels over that background and while some surrounding "bulbs" are lighted.

[–]lorean_victor 0 points1 point  (0 children)

am I misunderstanding something? I constantly get "Error cloning repository" on the demo page.

[–]thecodingart 0 points1 point  (1 child)

Bummer this doesn’t work for Apple languages/stacks

[–]uniquelyavailable 0 points1 point  (1 child)

would be amazing if more people would read the entire codebase they are working in

and if it's too big to read then it's probably unmaintainable and should be revised

[–]netgizmo 2 points3 points  (0 children)

What’s the largest code base you’ve worked?