TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Tools for visualizing a codebase

148 点作者 tslmy大约 3 年前

22 条评论

divan大约 3 年前
Most of the tools for visualizing code lack the practical part. Dependencies graphs are often so huge, that generated graphiz output doesn&#x27;t even open on Macbook M1. Codeflow graphs kinda helpful sometimes, but nothing game changing.<p>I explored the topic of visual programming a couple of years ago and presented the first attempt to make the code visualization tool useful and practical in this long-read - &quot;Rethinking visual programming with Go&quot; [1]<p>The key point is that we build mental maps of the code whiel reading it. Simplicity of Go allows for rules&#x27; formalization of how I build 3D mental map myself, so I can outsorce it to the code. I.e. the static code analysis tool that reads any Go codebase and visuzlies a 3D structure similar to how I would do it in my head anyways. By clearly separating spatial and temporal aspects of code, it&#x27;s possible to blend this code visualization approach with editor and make it practical and helpful rather than just visualization excercies.<p>I paused the development, as I see the future of this project only in VR&#x2F;AR environment, and I&#x27;m not sure this ecosystem is ready yet (it&#x27;s a side project still). But honestly I dream about this tool almost daily, while coding with usual text code representation.<p>[1] <a href="https:&#x2F;&#x2F;divan.dev&#x2F;posts&#x2F;visual_programming_go&#x2F;" rel="nofollow">https:&#x2F;&#x2F;divan.dev&#x2F;posts&#x2F;visual_programming_go&#x2F;</a>
评论 #30895440 未加载
评论 #30894625 未加载
评论 #30894498 未加载
graphviz大约 3 年前
Inside every large graph is a small graph dying to get out.<p>There&#x27;s a place for just wanting to see everything, but the beauty of graphs is abstraction. Sometimes if you are asking a specific questions, a small, beautiful graph might be a better way to answer the question, than just rendering a diagram with hundreds or thousands of objects.<p>Graphviz just provides a basic rendering service; it would be up to higher semantic layers to support such exploration. Also, no doubt, interactivity is essential. It would be good for some enterprise that has the incentives to support the work, to create a new system, or at least to extend Graphviz to support better interactivity. It is not such a big stretch.
throwoutway大约 3 年前
Most visualization tools (not just for codebases) seem to rely on graphviz. Is there anything better? Or is this still the best option?
评论 #30894432 未加载
评论 #30892908 未加载
possiblydrunk大约 3 年前
Back in the day, Visual Age for Java (IBM) had a cool dynamic call graph visualization tool. Would be great if companies released their tool sources when they abandon them.
评论 #30893222 未加载
jdougan大约 3 年前
For a more dynamic moldable approach, look at Moose. <a href="https:&#x2F;&#x2F;moosetechnology.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;moosetechnology.org&#x2F;</a>
adhesive_wombat大约 3 年前
CMake can also generate a graph of the targets with graphviz, which can be very useful (and also make horrible things like cyclic linkages evident).
loopbit大约 3 年前
Back in the ancient times of the early 2000&#x27;s I had to deal with a massive, legacy java codebade.<p>I found a small free library called MaintainJ that used aspect-oriented programming as you used the app. It was great to make sense of how everything was pieced together: You coul fire it up, run through a single scenario (user log in, add to cart...) and generate a flow diagram of just that scenario.<p>The library still exists, <a href="http:&#x2F;&#x2F;www.maintainj.com" rel="nofollow">http:&#x2F;&#x2F;www.maintainj.com</a> but I haven&#x27;t used it in +15 years, so no idea how it is today.
john-tells-all大约 3 年前
This is close to my heart :) I&#x27;ve been toying with a codebase visualizer, &quot;Shotglass&quot;. It&#x27;s unique that it shows a pixel _for every single line of code_, thus showing the overall structure. Functions can be individually colored, e.g. to show code complexity.<p>Code + screenshots: <a href="https:&#x2F;&#x2F;github.com&#x2F;johntellsall&#x2F;shotglass#demo-django-a-bit-larger" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;johntellsall&#x2F;shotglass#demo-django-a-bit-...</a>
toinbis大约 3 年前
<a href="http:&#x2F;&#x2F;epydoc.sourceforge.net&#x2F;api&#x2F;" rel="nofollow">http:&#x2F;&#x2F;epydoc.sourceforge.net&#x2F;api&#x2F;</a> - epydoc has great combination of reference documentation combined with codebase visualization. Please note that the two visualisations in &quot;Package epydoc&quot; and &quot;Package Organization&quot; ar both clickable. Once clicked, also feel free to find and click &quot;call graph&quot;, which itself visualizes, well, call graph.<p>Sadly epydoc is no longer maintened and only supports py2. Had an idea of porting it to py3, but never found enough time to do so.
arraypad大约 3 年前
A couple of my own projects might also be of interest. Repography [1] creates posters with more of an aesthetic focus, and Work&#x2F;Artwork [2] takes this even further, creating modern art.<p>[1] <a href="https:&#x2F;&#x2F;repography.com&#x2F;app&#x2F;0&#x2F;neovim&#x2F;neovim&#x2F;trunk&#x2F;poster-surface" rel="nofollow">https:&#x2F;&#x2F;repography.com&#x2F;app&#x2F;0&#x2F;neovim&#x2F;neovim&#x2F;trunk&#x2F;poster-surf...</a><p>[2] <a href="https:&#x2F;&#x2F;workartwork.org&#x2F;design&#x2F;mountain" rel="nofollow">https:&#x2F;&#x2F;workartwork.org&#x2F;design&#x2F;mountain</a>
NicoJuicy大约 3 年前
Gource ( <a href="https:&#x2F;&#x2F;gource.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gource.io&#x2F;</a> ) is awesome if you want to visualize the evolution of a codebase fyi.
评论 #30893993 未加载
abnry大约 3 年前
I feel like there should be an IDE tool that shows a dependency graph and you can click on each function to go to the code.<p>Functions happen to live in the same file, but they can really be their own thing, especially pure functions. Even just having a tool to pick out pure functions vs state modifying functions would be great.<p>I want a graphical way to focus on each building block in a codebase that moves beyond the file format.
评论 #30894726 未加载
rajandatta大约 3 年前
Ver helpful post. This is an under-covered topic especially for large code bases.<p>Anyone aware of efforts to pair these tools with tools to filter and examine different call paths to interactively explore a large code bases. A model like specifying a filter and having the view be filtered by paths that meet criteria.
kissgyorgy大约 3 年前
Dependency graph visualization for Go:<p><pre><code> godepgraph -s package | dot -T png -o depgraph.png </code></pre> With: <a href="https:&#x2F;&#x2F;github.com&#x2F;kisielk&#x2F;godepgraph" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kisielk&#x2F;godepgraph</a>
systematical大约 3 年前
I&#x27;ve been meaning to give this a try: <a href="https:&#x2F;&#x2F;github.blog&#x2F;2022-02-14-include-diagrams-markdown-files-mermaid&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.blog&#x2F;2022-02-14-include-diagrams-markdown-fil...</a>
评论 #30895541 未加载
efortis大约 3 年前
For JS projects, I use the script below to analyze dependencies, such as unused files, or files that are used only once and could be consolidated.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;uxtely&#x2F;ops-utils&#x2F;blob&#x2F;main&#x2F;find-unused-deps.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;uxtely&#x2F;ops-utils&#x2F;blob&#x2F;main&#x2F;find-unused-de...</a><p>--<p>For monorepos, I check which files are shared between projects with:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;uxtely&#x2F;ops-utils&#x2F;blob&#x2F;main&#x2F;show-interproject-deps.sh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;uxtely&#x2F;ops-utils&#x2F;blob&#x2F;main&#x2F;show-interproj...</a>
TacticalCoder大约 3 年前
A dependency structure matrix is a nice tool to have for some languages too (used to worked fine from IntelliJ for Java at least 10 years ago and I bet it still does).
cc101大约 3 年前
You should have a QuickStart. Use the ReadMe to explain what the QuickStart does. Then, use the QuickStart as a skeleton on which to elaborate things not covered.
评论 #30891907 未加载
ilovecaching大约 3 年前
Anyone know of some tools that could draw graphs of the Linux kernel ? I’d like to draw subsystems or pick a function and have it diffuse out to build a graph.
halayli大约 3 年前
It&#x27;s missing a very popular option:<p><a href="https:&#x2F;&#x2F;sourcegraph.com&#x2F;search" rel="nofollow">https:&#x2F;&#x2F;sourcegraph.com&#x2F;search</a>
评论 #30893616 未加载
atlgator大约 3 年前
Anything for .NET?
评论 #30895579 未加载
vaidik大约 3 年前
Try Cidescene.io
评论 #30893024 未加载