Every computer science student has taken a course that requires them to make charts, diagrams, graphs and other visual tools. One of the biggest tools I wish I knew about early on is plantuml in markdown files.
Unified modeling language, the UML portion of plantuml is as a visual modeling language. To be more specific, plantuml is just a good open-source tool that incorporates uml and other things like support for visualization of JSON and YAML files.
Markdown (a .md file) is a language that lets you format text and symbols.
The combination of these languages would have made many of the courses in my past much easier. I could also see it being useful in the future when it comes to modeling any work. VScode only requires a couple extensions to get it to work .
There are a few different sources one could go to, to figure out how to write the code that they need for whatever task is at hand. Those resources will be listed at the end.
For now there will be a couple basic examples showing how the diagrams from the previous blogs are made.
This is the diagram from the previous blog:
For this breakdown we will be keeping it simpler and using a smaller portion of this diagram.
The diagram we will be looking at:
Oh how nice it would have been if I could use this to organize group projects early on in my academic career.
the code to make it present this way looks like this:
With the plantuml extensions you simply put 3 back quotes (“`) and plantuml. Then go to town following whatever cheat sheet you like to use to help you write the code. You can show relations, display classes and even put notes for more details.
This example keeps it fairly simple, it can get a little more complex depending on the size of your diagram and what you are doing.
Like was mentioned earlier you can even make diagrams for relational databases!
ex.)
The amount of time me and my friendsin class had spent using different cookie cutter diagram makers in our browser that would hide features we needed behind paywalls…
Even if you’re just making a list of tasks you need to do or formatting a paper markdown by itself has a lot of useful tools. One of my personal favorites is crossing off a list using the tilde key (~).
ex.)
Markdown and plantuml are on the same list as unit testing when it comes to things I wish were taught before getting deep into programming courses.
Do yourself a big favor and get at least a little familiar with it.
Cheat sheets:
Plantuml simple – https://ogom.github.io/draw_uml/plantuml/
Plantuml official – https://pdf.plantuml.net/PlantUML_Language_Reference_Guide_en.pdf
Markdown simple – https://github.com/adam-p/markdown-here/wiki/markdown-cheatsheet
Markdown official – https://www.markdownguide.org/cheat-sheet/
Sources:
Database example – https://medium.com/@elvis.gosselin/plantuml-for-database-modeling-1b71e6d4622d
From the blog Mikes CS 343 by Michael St. Germain and used with permission of the author. All other rights reserved by the author.