What does HackerNews think of Sourcetrail?
Sourcetrail - free and open-source interactive source explorer
Sadly, they retired the entire project a while back.
i also have a self hosted instance of this : https://elixir.bootlin.com/linux/latest/source
what you asked, comes across with code auditing as well, i wasn't surprised to know security researchers use sourcetrail as well.
hope your favourite language is supported.
Yes, if it helps you understand how it works and how the pieces fit together.
No, if the previous is not all that useful for you (different types of learners), or you need to spend significant amounts of time doing it manually, especially given that code could change.
If you can, look into any tool that might allow you to get visualizations in an automated manner.
For example, JetBrains IDEs have a few different graph visualizations for dependencies and inheritance etc.: https://www.jetbrains.com/help/idea/2022.1/tests-in-ide.html...
There also used to be SourceTrail, though sadly the project is now retired: https://github.com/CoatiSoftware/Sourcetrail
For databases, you can also use external tools like DbVis: https://www.dbvis.com/features/
There are also a few tools here and there for visualizing networks or how container deployments look, but those are pretty situational/specific for each platform/setup.
- Sourcetrail (GUI/Linux/Windows, closed-net-capable, archived) - https://github.com/CoatiSoftware/Sourcetrail
- SourceInsight (repo/web-server/closed-net) https://www.sourceinsight.com/
- OpenGrok (web server plug-in/Java/closed-net) https://oracle.github.io/opengrok/
- CLion (GUI-based IDE) - By IntelliJ/JetBrains - https://www.jetbrains.com/clion/
- SourceGraph (Web-based) https://about.sourcegraph.com (thanks, gravypod)
- Codesee.io (GitHub/web-based) - https://www.codesee.io/privacy-and-security
For free as in beer, I prefer OpenGrok so I can get more than JetBrains
Helped me improve my understanding of last codebase and their design
I always get it confused with self-hosted https://github.com/CoatiSoftware/Sourcetrail but I think Sourcetrail just shut down.
I’m looking at ways to improve the analysis to get more detail from apps, but it’s tricky. As far as I know, nobody’s made an ontology of computer science or source code patterns yet.
Creating the graph is easy compared to how much you might want to do to interpret it. Then we’ve data flow graphs to consider, and UI component graphs, dependency graphs, supported platform annotations, and ideally, telemetry from code execution in tests and production, and each can supplement or annotate control flow graphs and source code.
It’s a problem we’ll solve as a community but it’ll take a number of years before it’s general purpose enough that step one is load a program and step two is read and modify it... with everything you need neatly linked and annotated...
https://github.com/CoatiSoftware/Sourcetrail
https://www.patreon.com/sourcetrail/posts
For more on my thoughts of “understanding code automatically,” see https://github.com/CoatiSoftware/Sourcetrail/issues/750#issu... as an example.
My preference would be just as books, programmers and IDEs build mental models from source code, that eventually we could generically go from a collection of source files to identifying languages, build commands, and app starting points to multiple layers of graphs: control flow, data flow, cross-project references, and eventually — help programmers like an IDE would, but smarter, more like documentation written by a human with annotated examples from test cases and live code, etc.