4 ms·
Ask HN: How do you personally diagram code?
UML is quite formal and involved. Drawing boxes with arrows on Lucidchart or Draw.io is easy, but the lack of detail is a liability when code gets complex.
How do you personally diagram code so there's enough detail, but you aren't constantly getting lost in the formality of the system?
- ezekg 5y agoI use https://monodraw.helftone.com https://monodraw.helftone.com. A good example of how to make exceptional diagrams is brandur's blog [0]. [0]: https://brandur.org/postgres-reads https://brandur.org/postgres-reads
- ayoubElk 5y agohttps://whimsical.com https://whimsical.com
- rualca 6y agoI use mostly UML. Component diagrams and deployment diagrams for the general overview, architecture and operations-wise. Communication diagrams for some workflows. Sequence diagrams to show how operations are executed. For onboarding, sometimes a class diagram or two.
- slipwalker 6y ago- context diagram for an overview - uml sequence diagram for a more detailed view of interesting parts - entity relatioship model for databases
- jamestimmins 6y agoAh so you have multiple different diagrams for the same domain? I've been trying to do everything with one, which might be the problem.
- segmondy 6y agopaper & pen
- fiftyacorn 6y agoMe too with notes scrawled all over it
- type0 6y agoTake a look at https://diagrams.mingrammer.com/ https://diagrams.mingrammer.com/
- el_dev_hell 6y agoI default to https://www.diagrams.net/ https://www.diagrams.net/. But I've used Microsoft Visio in the past and it's a really nice solution (this was 3 years ago, so it might be better/worse now).
- joshxyz 6y agoCombination of things - diagram for high level - diagram for small complex things - comment on code as necessary - write good enough documentation that is enough to onboard people to the project structure - write decent commit messages
- joergen7 6y agoI use Petri nets. They allow me to diagram communicating systems, making explicit how active components (like functions or services) and passive components (like storage or i/o-devices) interact. Petri nets have formal semantics easy enough to grasp (firing rule) and provide enough optical cues to make them readable at a glance. With a little practice, nets can be visually appealing, which helps in presentations and publications. I use Inkscape as a drawing tool.
- vladojsem 6y agoI use mostly Entity-Relationship for designing a database, and UML Class diagrams. Personally I prefer typing to drag-and-drop so I use https://www.gleek.io/ https://www.gleek.io/ Check templates and turials, or ask me if you like to know more ;-)