this post was submitted on 18 Oct 2023
2 points (100.0% liked)

Emacs

311 readers
2 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

I am not skilled in drawing, but after trying PlantUML, I found that I can create visual representations directly using code. This has greatly aided my spatial imagination.

Take, for example, the usecases diagram:

@startuml
:user: -right-> (Right)
:user: -up-> (Up)
@enduml

https://preview.redd.it/1bx7h7sa7vub1.png?width=152&format=png&auto=webp&s=6271256f6855b88a93a62abf63569f1bc542ded5

With the use of directional terms like "up" and "right," you can intuitively draw the diagram as shown. it lowers barrier for non-artists - no drawing ability needed and focuses thought process on structural elements and relationships.

When immersed in text, our spatial imagination can often become less active. For example, when trying to imagine the hierarchical structure of an article such as org-mode, our mental representation tends to be more like a bullet structure in an editor, rather than a graphical tree structure.

PlantUML addresses the challenge of limited spatial imagination by providing an intuitive text-graph syntax. One notable feature is the Work Breakdown Structure (WBS) functionality.

Consider the following example:

@startwbs
!theme mono
    Emamcs
    ** Texting Editing
    ** Note taking
    ** File Manager
    ** Literature Programming
@endwbs

https://preview.redd.it/95b2mg6w9vub1.png?width=567&format=png&auto=webp&s=2e0f00c54e4d411ec731eba7b23a46a665ed78fc

The WBS feature in PlantUML facilitates the effortless transformation of a vertical structure into a horizontal representation. This allows me to mentally interpret and visualize the PlantUML code, automatically converting the vertical structure into a spatially-oriented horizontal structure in mind. Consequently, it effectively resolves the issue of my limited visual imagination and improving it continually.

top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago (1 children)

You can also try mermaid (http://mermaid.js.org/syntax/sequenceDiagram.html). There is a babel extension for that

https://github.com/arnm/ob-mermaid

For me the syntax is lighter and the aesthetics are nice and modern.

[–] [email protected] 1 points 1 year ago (2 children)

PlantUML's Gantt charts is well-suited for a more natural language and textual representation, for instance:

[reading] starts 2023-10-18 and lasts 10 days.

[–] [email protected] 1 points 1 year ago

I think the Mermaid Gantt charts look incredible and they are extremely feature-rich. I'm a huge fan of that project.

[–] [email protected] 1 points 1 year ago (2 children)

Yes, PlantUML is very helpful in that way. I know this because I have used it in many projects. But Mermaid caught my attention because of its beauty and simplicity. I don't know if you have tried to customize a PlantUML diagram with colors, positions and other stuff. I don't have the patience for that. :p

Now, UML is a recognized standard, and it will not go anywhere. If you learn it, you won't waste time at all.

So, I rather prefer mermaid for personal or small projects which don't involve many people. However, if you need to diagram for work in a large company with established standards, then UML is your friend here.

In the end, we have options, and we pick the best tool for every job.

Good luck!

[–] [email protected] 1 points 1 year ago

Yes, thank you. Mermaid is surely rather pleasing and beautiful.

[–] [email protected] 1 points 1 year ago

Thank you very much for your recommendation. I immediately read the documentation for Mermaid after receiving your answer, and I find its styling pleasing and modern. I really appreciate it.

However, when it comes to the Gantt chart, it doesn't seem as intuitive as PlantUML, which is why I mentioned it in my feedback.

It seems that my previous response may have given the wrong impression, suggesting disappointment with your recommendation. This is not the case at all. I actually like Mermaid and am grateful for your recommendation.

I am just beginning to delve into PlantUML and, of course, I am also new to UML as a standard language. As you mentioned, "If you learn it, you won't waste time at all." Thank you.

[–] [email protected] 1 points 1 year ago (1 children)

But plantuml-mode seems not update, I also tried mermaid but m2 seems the best choice(with m2-mode and ob, written in go, just install a binary), any thoughts?

[–] [email protected] 1 points 1 year ago

doesn't plantuml follow a language specification (UML) whereas D2 is based on the creator's own syntax?

[–] [email protected] 1 points 1 year ago

I used it all the time for lab reports or dissertations. It also supports in some cases, conversion to LaTeX, which means I had vectorized output instead of relying on PNG.

[–] [email protected] 1 points 1 year ago

To be fair, I wish there was better implementation for OCL, it so much richer than UML.. it just seem like not enough people known about it yet

https://modeling-languages.com/ocl-tutorial/

https://github.com/useocl/use/blob/master/manual/main.md

[–] [email protected] 1 points 1 year ago

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

 ^(If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads.) ^(Info ^/ ^Contact)

[–] [email protected] 1 points 1 year ago

I've been using PlantUML for documenting almost everything. ORG, org-babel and PlantUML is indeed a lovely combo!

For a recent blog post I wrote this ORG file: https://github.com/dorneanu/roam/blob/main/org/blog/2023-07-17-documentation_as_code_for_cloud_plantuml.org

There I not only use org-babel to write PUML code but I also use things like `org-sbe` to

- *tangle* PUML files in a specific directory

- *generate* PNG files in another one

Make sure to view the RAW file.