Live data from Hacker News

Ask HN: Visualizing software designs, especially of large systems (if at all)?

news.ycombinator.com

41–50 of 129 posts

Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?

#41
In my experience it tends not to be done because there's an inevitable drift between the system as it actually operates and the relevant visualizations and diagrams. I have seen them used as a starting off point at times, although that's also been infrequent.

There is however a growing movement of being able to visualize how a system is functioning at various levels. XState/Statecharts are a good example (https://xstate.js.org/viz/). Another example in the Ops space would be https://github.com/spekt8/spekt8 for K8S. I work at Grafana and we're more or less trying to expose these things in ways that make sense. Our bread and butter is timeseries data but we're adding more in that regard (it's possible to build node graphs from running systems).

Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?

#42
My friend and I have been working on https://www.codeatlas.dev in our spare time, which is a tool that creates pretty (2D!) visualisations of codebases, while providing additional insights via overlays (e.g. commit density, programming language). For example here's the Kubernetes codebase visualised using codeatlas: https://www.codeatlas.dev/repo/kubernetes/kubernetes.

At the moment, codeatlas is only a static gallery, but we're currently about 1-2 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

Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?

#43
post #9

I gave this a bit of thought earlier this year ( https://alexanderell.is/posts/visualizing-code/ ) and, with the help of HN commenters, collected a small list of ways people are working to help with code visualization. I don't think most of them are production ready (some are just research papers), but you may find them interesting all the same. SoftVis3D ( https://softvis3d.com/ ): where a "‘code city’ view provides…

These look great, I think the general idea of using space is pretty solid. Anyone who's ever tried to draw a tree structure finds it gets busy really quickly with more than a dozen or so leaves, but an actual tree in 3D space can have thousands of leaves yet fits into a reasonable chunk of space. Graphs are similar, if they are connected in 3D rather than 2D (ant nests and termite mounds are decent models).

Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?

#44
The time of UML came and went very quickly. No one misses it.

These types of diagrams are either not specific enough to answer any useful questions or so dense and insane that no one can read them.

If you have a business requirement with a decision tree it is probably a good fit for this type of documentation - write it down in DOT or asciiflow or something

Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?

#45
for existing codebases, doxygen will produce static call graphs for c/c++ and java codebases using dot graphs that are hyperlinked back and forth to lxr style code listings (you do typically have to turn this on as it's expensive to compute and is turned off by default.)

i always found uml and other object style diagrams to be kind of obfuscating and encouraging of overcomplicated oop designs.

Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?

#48

UML is not a documentation tool, it´s a communication tool. It is a standardized way to communicate. It removes ambiguity. UML is the best way to manage, communicate and handle a large amounts of complexity. Most of the free UML tools are very basic and does not have traceability features (we can see many in the comments), and this is really a no-go if you want to understand large systems.

Documentation is communication, albeit asynchronous.

Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?

#49
post #35

For a small but complicated project I got thrown into a while ago, the only way for me to understand it was to print out all the source directly, vertically tape together the pages for a single file, and then lay them all out on a huge table. Then I took multicolored markers and started physically drawing out the call chains. I then I sers-toi the system, and also found an enraging bug: the system widely used the var…

Sounds like something the type system should have caught!

Lucky you if you work with people who see the value in a language with good type checking or that doesn’t just use strings for everything.

Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?

#50
post #35

For a small but complicated project I got thrown into a while ago, the only way for me to understand it was to print out all the source directly, vertically tape together the pages for a single file, and then lay them all out on a huge table. Then I took multicolored markers and started physically drawing out the call chains. I then I sers-toi the system, and also found an enraging bug: the system widely used the var…

I also used to do this when working on a big convoluted system. I had a conference room near my desk with all the walls completely covered in code. A big pack of multicolored highlighters is key.

I remember a whole bunch of light bulb moments when I showed other developers the "big picture". It's an awesome technique when you're forced to work on spaghetti!

Post reply on HN