Ask HN: Why aren't code diagram generating tools more common?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • plantuml

    Generate diagrams from textual description

    This isn't a tool for generating diagrams from actual code, but I have really enjoyed using PlantUML lately while putting together design or architecture proposals: https://plantuml.com

    As someone who is not a very visual person at all, I found it really nice to use to make my design docs more comprehensible to visual learners. I've gotten good feedback about designs every time I've used the tool.

  • c4-notation

    Technical resources for using the C4 model for visualizing software architecture.

    One of the problems is: what is the language to describe these diagrams? We do have UML and it's various variants: PlantUML, Mermaid but these are too low level to prescribe conventions over how to use these to describe complex architectures. A sequence diagram could describe anything through customer journeys, rest api call patterns to call stacks within a VM. It needs granular description and navigation or else you end up with metres squared of boxes that can't be parsed at a glance.

    The closest I found that solves this problem is https://c4model.com/ but you still need the code to turn your code into these markups. Can this be well inferred from code alone without framework specific interpreters? I doubt it.

    And then you still need a frontend to zoom and navigate the ridiculous amount of hierarchy found within any modern software architecture, e.g microservices.

    It also doesn't help microservices patterns also prescribe that you don't share repositories or code. So now you also need to pattern match untapped references across codebases.

    This is a ridiculous amount of convention and tooling that I'm not sure exists.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • codebase-visualizer-action

    Visualize your codebase during CI.

    I've already mentioned this on the other thread (https://news.ycombinator.com/item?id=31569646), but my friend and I have been working on [https://www.codeatlas.dev](https://www.codeatlas.dev/) as a sideproject - it's a tool for creating pretty (2D!) visualisations of codebases, while providing additional insights via overlays (e.g. commit density, programming language or other results from static analysis like dead code/test coverage/etc.). For example here's the Kubernetes codebase visualised using codeatlas: [https://www.codeatlas.dev/repo/kubernetes/kubernetes](https:....

    At the moment, codeatlas is just the static gallery, but we're only a few weekends away from releasing a Github action that deploys this diagram on github pages for your own repos - if you're interested, feel free to watch this repo: https://github.com/codeatlasHQ/codebase-visualizer-action

    OP, how close is this to what you had in mind in your question?

  • resholve

    a shell resolver? :) (find and resolve shell script dependencies)

    For a concrete example, I've been developing a tool (https://github.com/abathur/resholve) that can ~build/link Bash/Shell scripts--i.e., rewrite them with external executables converted to absolute paths. (This helps ensure dependencies are known, declared, present, and don't have to be on the global PATH for the script to execute cleanly.)

    There's a devilish sub-problem, which is that any given executable can potentially exec arbitrary arguments. For now I handle this with a very crude automated binary/executable analysis that needs to be augmented by human source analysis. Deep multi-language source analysis wouldn't be very scalable, but I suspect fairly-standardized structural annotations could improve the results in a scalable way.

    I have to imagine there are other applications of the same information.

  • dbcview

    Quickly visualize senders and receivers in a DBC

    A DBC visualizer (CAN bus protocol specification file) - https://github.com/driftregion/dbcview (mine)

    I love these tools not only for probing the depths of an unfamiliar codebase but also because they can result in surprising insights even for people nominally familiar with that codebase. For example: statically generated callgraphs showed that some debugging hooks had been left in. They've also shown duplicate code paths.

    A third class of tools mentioned in the comments are dynamic analysis tools: profilers, tracers, debuggers. These are the oscilloscopes and signal analyzers of software engineering.

    > Why isn't diagram generation automated as part of the build process (UML or otherwise)?

    The output of class 1 and 2 tools

  • nballerina

    Ballerina compiler that generates native executables.

    I haven't tried it, but the thing that I found fascinating about the Ballerina language is that it automatically generates sequence diagrams. Seems like a very powerful feature. https://ballerina.io/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts