Dev Note

moon indicating dark mode
sun indicating light mode

10x Engineer - A Tale of Sequence Diagrams

January 01, 2020

For a software engineer, sequence diagrams come up as a boring technology. This is partly because sequence diagrams were sometimes the unwanted requirement of the homework deliverables while we were in college.

However, as I got more matured with the discipline, I found that this is the one piece of technology that should be taught and utilized more widely. We have all seen a case where someone fails to explain his good idea to the group because nobody is able to follow his thought when he explains it with words.

Protip: Don’t be that person

The key to growing as a software engineer is the ability to communicate your ideas and plans to your team/supervisors effectively. As one said, “one look is worth a thousand words”. Don’t take my words for it, see for yourself the better steps toward making yourself heard. 💡

Sequence Diagram

Why do we even bother with PlantUML? Can’t we just use draw.io for this task?

It is because we’d like to be able to modify this file quickly with code. The file above was generated using this code

@startuml
!includeurl https://cdn.jsdelivr.net/gh/HSLdevcom/hsl-plantuml-theme/hsl-theme.iuml
actor "An Engineer" as A
participant "Plant UML" as P
actor "His Audience" as H
autonumber
|||
activate A
A -> A: I have a GREAT idea!
activate P
A -> P: Draw out my ideas using PlantUML
P -> A: Return diagrams and code
deactivate P
activate H
A -> H: Show the diagram to precisely communicate the idea
H -> A: Wow! I've got your ideas
A -> A: Yay!!!
deactivate A
deactivate H
|||
@enduml

You can follow this link to the playground

By now, if you are like me, you will realize that you can quickly update the above diagram if needed and you can put this code in version control along with many other things. 😍

Beside sequence diagrams, the tool can even generate other types of diagrams such as state diagram, class diagram, component diagram… So next time, when you have your next idea, don’t miss out on utilizing this tool. I guarantee you it will immediately increase your productivity like it did x2 for me. 👌


An Pham's Personal Blog
An enthusiastic software engineer who genuinely enjoys life. 😍