The main problem with low-level code visualization was that it did not add much to the well-formatted code representation in most cases. As for the high-level architecture extraction tool, which is more close to the question in the article, many links on the diagram do not just involve header inclusion, module import, method calls etc that are relatively easy to extract (not without its own challenges with virtual and indirect calls though). Users wanted to see Inter process communications (socket, queues, pipes, http connections) and extracting those is an uphill battle though we introduced some of it (lots of custom, platform specific code). Between this and knowing which connections are important and which are less so, automatically extracted diagrams were of limited value.
Ask HN: Why aren't code diagram generating tools more common?
51–60 of 112 posts
Re: Ask HN: Why aren't code diagram generating tools more common?
#52The problem facing these tools is a catch-22 really - diagrams are useful when understanding big messy codebases but big messy codebases are hard to visualise. For instance, I frequently build small paper diagrams of different code paths through a component and nearly always find leaky abstractions, mixed layers of abstractions, weird cyclical dependencies, etc. etc. and there really is no clear way to diagram this.…
Exactly. I've found that there is no perfect tool and I'm closing in on 40 years of writing software. I use a blend of UML, IE (James Martin's Information Engineering), etc. Anything that makes it "easy-to-grok". Draw.io generally does what I want it to do; there is no feedback loop back to the codebase. It's really just to help onboard new helping hands.
Re: Ask HN: Why aren't code diagram generating tools more common?
#53But, of course, it turns out, someone still needs to understand and be able to debug all the nuances that makes complex logic systems complex, especially when they're cobbled together from many underlying systems.
The real goal should be to take good programmers and magnify what they can do. But since the industry bought so hard into the naive vision, the industry is behind where it should be on a smarter vision.
Re: Ask HN: Why aren't code diagram generating tools more common?
#54I find those diagrams a lot more confusing than just reading and having a mental model of the code.
Re: Ask HN: Why aren't code diagram generating tools more common?
#55I think it's kind of like the AI Winter -- there was a period of time when the software industry really went down a stupid path in regards to diagram-based code generation. A lot of kool aid was drunk over promises of making it so that everyone would be able to program. But, of course, it turns out, someone still needs to understand and be able to debug all the nuances that makes complex logic systems complex, especi…
Re: Ask HN: Why aren't code diagram generating tools more common?
#56Maybe it'd be neat.. but, I think sometimes "the map is not the territory" goes both ways. - I probably want a diagram to be simpler than the actual system. With a manually constructed diagram, I have leverage to handwave irrelevant details away. Perhaps to compare with documentation: it's easy to automatically describe things like types, and maybe callgraphs, but there's value in having prose which explains details…
Most of a system is either uninteresting or trivial. You need someone to tell you where the interesting part is.
Re: Ask HN: Why aren't code diagram generating tools more common?
#57I think it's kind of like the AI Winter -- there was a period of time when the software industry really went down a stupid path in regards to diagram-based code generation. A lot of kool aid was drunk over promises of making it so that everyone would be able to program. But, of course, it turns out, someone still needs to understand and be able to debug all the nuances that makes complex logic systems complex, especi…
The OP is asking for diagram generation not code generation.
The industry couldn't get the simple one of those (diagram -> code) to work well enough, how would they do the much more complex reverse?
Architectural and even library nuances can't be easily quantified to a particular UML symbol unless you go through the effort of classifying it for every library/design pattern, and keeping that up to date as well.
Re: Ask HN: Why aren't code diagram generating tools more common?
#58Re: Ask HN: Why aren't code diagram generating tools more common?
#59In my experience these tools generally exist to facilitate bikeshedding. The academic nature of UML makes it pretty useless in the real-world.
Something that could be useful is having a tool that uses knowledge about code to help you build a mindmap (but does not just puke the whole thing out). Huge bonus points for allowing the user to create late-bound relations and conceptual boundaries. Finally, one of these tools should be able to compare its output with the source, and indicate what has changed (through deletion/addition, or via VCS diff).
Re: Ask HN: Why aren't code diagram generating tools more common?
#60NDepend Dependency Graph https://www.youtube.com/watch?v=23fBxM2v22k