←back to thread

Monodraw

(monodraw.helftone.com)
603 points mafro | 3 comments | | HN request time: 0s | source
Show context
randomgermanguy ◴[] No.45038211[source]
Bought this couple months ago, and am now always looking for more ways to include this for inline-documentation.

the fact i can export to clipboard and re-import it and reconstruct all the shapes etc. almost flawlessly is such a big win.

replies(4): >>45038246 #>>45038408 #>>45038857 #>>45038914 #
1. makeitdouble ◴[] No.45038408[source]
Sounds super interesting, where do you put these diagrams ?

It's an issue I'm seeing even for comments touching too much on algorithmic stuff. To take a somewhat common example, if you were dealing with a credit card payment flow, where would the explanation of how a transaction goes through a few states asynchronously, which all trigger a webhook callback ?

Obviously the people working on the code need to be aware of that, so documentation is somewhere needed. I've seen people put whole blocks in class headers, other sprinkle it all inside the code, personally I ended up moving it outside of the code. Where would you put it?

replies(1): >>45038939 #
2. randomgermanguy ◴[] No.45038939[source]
I personally just throw them at the top of my files as long block-comments, or sometimes inside/around very heavy functions. For example i often add little diagrams for when dealing with some bit-fiddly logic parts to easier visualize the bit-layouts. But for architecture, either a whole text-file for it or at the top of the module
replies(1): >>45040989 #
3. makeitdouble ◴[] No.45040989[source]
Thanks! Do you deal with the logic getting split/shared around the code ? For instance on the credit card example there will be probably be one central class (the transaction class?) but you'd need to know the whole logic in the card registration part or the webhooks as well. I guess you don't stick a diagram everywhere ?