Ask HN: Visualizing software designs, especially of large systems (if at all)?
111–120 of 129 posts
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#112https://github.com/hammeiam/saddle-data-graph/blob/master/Sa... (scroll down for images)
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#113I also do some sketchnoting (using pen & pencil) when I design a system for the first time. I wish I could easily convert those sketches to PlantUML.
[1]: https://brainfck.org/#PlantUML [2]: https://skyksit.com/programming/uml/plantuml-samples/
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#114I'm an intensely visual person, but have never found a visual programming system which scales well --- the problem is, past a certain level of complexity one has to use modules, which then devolves the visual representation down to just a bunch named blocks.
That said, I'm using BlockSCAD:
https://www.blockscad3d.com/community/projects/1421975
to work up designs which I'm then putting into other tools.
Looking at GraphSCAD:
and there's also Ryven and pythonocc which I managed to get installed:
https://github.com/Tanneguydv/Pythonocc-nodes-for-Ryven
but I'd really like to see a tool for this sort of thing which made G-code.
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#115It produces diagrams like these: https://www3.svjatoslav.eu/projects/sixth-3d/graphs/
Advantage of this is that diagram can be automatically updated from latest code. Classes discovery and visual layout is automatic.
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#116There are a lot of great tools that can reverse engineer code -> UML and databases to ER or UML. (and forward engineer UML or ER -> code or database)
I find them quite helpful.
If someone has taken care to keep up UML diagrams, and I can grab the blessed ones with more context that is great.
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#117UML 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.
I agree with your view on UML, but now I'm curious what you consider documents to be for.
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#118UML 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)?
#119For these things you know there are systematic ways of finding them - for mine it was a C/C++ Project so:
1. Find all executables via build output, or in the running system. For now you're largely going to ignore the details of what the code is doing. You just want to know what is actually "running" at runtime :). 2. Figure out where the entry points to those executables are, like a main. These are usually easy to search for or discover by convention. 3. Find out what threads it spawns 4. Start a simple diagram with a box at the top named for the executable, and branch down to one box for each thread. Manually trace control flow for each thread, adding boxes at points you think are noteworthy logical units. E.g. often threads will have some kind of main loop they sit in, which is a key element for understanding what that thread is doing. 5. Continue for nested threads and worker (short lived but not ephemeral) threads.
Once you complete this, you should have an abstract block diagram that gives a decent map of "What code is running in the system". And just through the process of naming and looking over, maybe a rough idea of what the various pieces of software are doing and possibly how they relate.
You can then repeat this for the other basics in a similar fashion - data and communication interfaces. It's good to emphasize staying at a first-principles kind of abstract mindset. You know there are a finite number of ways a process or thread can communicate or create side-effects outside of itself. If you literally just find all of them (not the details of what is happening over those interfaces), usually it ends up being quite few, and all of a sudden the complexity becomes less intimidating. You have a little box that does some manipulation of data via logic and state, and it goes in one pipe and out the other.
I should point out how difficult all this is largely derives from those "coding practices" droned on about for benefiting maintainability, but so often get tossed. For example, say your system uses message IDs as part of an IPC mechanism. If the code followed good practice, using some kind of constant definitions shared from a single place, you can now do things like search for that message identifier and find all places it's sent/received. If some code used it's own re-definition of the same ID, or hardcoded just the raw numerical value, this becomes nearly impossible.
Also you'll need multiple diagrams. You won't be able to clearly show a complete "code execution" diagram at the same time as an interface relationship diagram or shared data sources diagram. The complexity of it will not help, it will just be more overwhelming complexity.
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#120Earlier quoted context omitted.
Documentation is communication, albeit asynchronous.
Documentation is a tool for communication, not the same thing. The dictionary is our best friend =]
Please don’t be condescending and incorrect.