News for hackers. Stuff that matters.
Re:Monodraw by subjectsigma on Saturday March 09, 2024 @12:10PM (#39653052)
1. You can just “Save as” to PNG, it takes no time or effort.

2. I use to use Monodraw exclusively for making diagrams in source code, but over time I’ve become so comfortable with the tool, keyboard shortcuts, etc. that now I just use it for all diagrams. It’s a very nice tool.

Re:Monodraw by James_K on Saturday March 09, 2024 @01:42PM (#39653796)
If you feel the need to embed giant ASCII diagrams into a source file, I think you should just use a picture. Like a .png or .svg or something and write the documentation in another file. Or even maybe try out rich text source code.
Re:Monodraw by aidenn0 on Saturday March 09, 2024 @01:53PM (#39653871)
Please don't do things like this that make it harder for people to read your comments.
Re:Monodraw by James_K on Saturday March 09, 2024 @02:08PM (#39653974)
Writing documentation is typically an addition to writing comments. They serve different purposes. That said, adding a diagram to a comment will only make it easier to read. It is an addition. It cannot make things harder.
Re:Monodraw by zelphirkalt on Saturday March 09, 2024 @03:16PM (#39654419)
If only it were true, that additions cannot nake things harder to read.
Re:Monodraw by James_K on Saturday March 09, 2024 @03:39PM (#39654554)
In this case, it is absolutely true. It is the difference between:

  // some comment
and

  // some comment
  // additionally see ./diagram.png
Diagrams are often useful tools for communicating information.
Re:Monodraw by aidenn0 on Saturday March 09, 2024 @05:51PM (#39655321)
That's not the difference I'm talking about; I'm talking about the difference between

  // some comment
  // ... 25 lines of a diagram
and

  // some comment
  // additionally see ./diagram.png
Re:Monodraw by subjectsigma on Saturday March 09, 2024 @02:16PM (#39654024)
The diagrams I am pasting in are usually like 80 x 40 chars and keep you from having to tab out into documentation. They don’t change often so they don’t create messy diffs. I don’t think that’s unreasonable. Nobody on my team seems to mind. I don’t think this is a problem and I’m having trouble understanding why you think it is.

If you’re wondering why I need diagrams in source code, then the answer is I usually don’t need them but it helps. The only project where they were game changing was where we were using Neo4j as a backend and being able to clearly diagram the data model was really helpful.

Re:Monodraw by James_K on Saturday March 09, 2024 @06:44PM (#39655551)
I don't really have much of an issue with it. It's got bad vibes by association. I find it a little annoying how much stuff is done with text, and this is just a small part of that.
Re:Monodraw by misnome on Saturday March 09, 2024 @01:54PM (#39653877)
Thanks! I’m sure they never thought of that!

Or maybe they did, and there are advantages and tradeoffs to any approach.

I’m sure your unique insight must be right, though.

Re:Monodraw by James_K on Saturday March 09, 2024 @02:13PM (#39653994)
You don't need to get so annoyed on someone else's behalf. I am just putting my opinion out there – specifically that I would prefer just an image file that is referenced from a comment. I'm sure this person knows what an image is; I was not trying to imply that they didn't.