Ask HN: Visualizing software designs, especially of large systems (if at all)?
101–110 of 129 posts
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#102Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#103As others have mentioned, to effectively communicate a system you must limit the context to particular layers of abstraction, and C4 is a good approach to doing just that. There's also a C4 plugin for PlantUML[1].
But don't forget that, as with all visualizations, audience and purpose are key.
Consider whether you are addressing short-term needs (eg identifying inefficiencies, modeling for a client pitch) or long-term needs (eg knowledge retention, managing complexity). If your audience's needs are short-term, you can certainly get by with much simpler tools (eg Inkscape, excalidraw/draw.io/etc, picture of a whiteboard, doodles on a napkin).
Also consider whether or not you actually have a problem better served by bottom-up (ie generated) visualizations (eg ERDs for database schema refactoring, heatmaps for profiling, GraphViz for debugging DAGs).
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#104To describe messages and related state transitions representing the function of a system over time, numbered arrows atop a block diagram can work well (essentially one visualization of a graph), but for more complex multi-component interfaces with a strong requirement for ordered messaging, message sequence charts are well received. https://www.mcternan.me.uk/mscgen/
There are two models of reality that I find to be the most useful ones, especially when writing programs. The first is functions, and the second is sequences of states. - Leslie Lamport
.. via https://github.com/globalcitizen/taoup - see also https://en.wikipedia.org/wiki/State_machine - and you won't regret learning http://graphviz.org/
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#105For 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 use pen and paper as well, but rather than print out all the source code, I write down the call stack. A calls B calls C, etc. along with the line numbers of the call. Much easier than printing out the source and you still have the IDE niceties like go to definition, find in source, etc.
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#106For individual systems I think a good inversion of control/dependency injection system can give you a good overview of the connections between components.
If I’m stepping into a giant ball of spaghetti code I generally set the debugger at line 1 and start stepping, and draw a lot of boxes and lines as I go… then throw those drawings away when I’m done. They’re really only helpful while you’re producing them (like taking notes as you read a textbook), hopefully in that situation you improve the code as you go so this approach isn’t as necessary!
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#107For 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…
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#108Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#109For 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…
Could do similar with bash text mangling tools, but language native would probably be best.
I dunno, just a thought in an EOD fog. I don’t own a printer these days, so I guess I’d need an alternative.
Tell computer to observe self and report back.
Re: Ask HN: Visualizing software designs, especially of large systems (if at all)?
#110Keep them small, if you need more than 7ish boxes, your model is too detailed