Rather than diagrams as code what does code as diagrams offer?

Code as Diagrams — What’s the Point?

Living Documentation — Part 3

Greg Billington
Geek Culture
Published in
7 min readApr 9, 2021

--

You often hear the phrase “diagrams as code” referring to using a text editor to write some code that can be parsed to create a diagram rather than using a graphical editor and UI to create a diagram. If however, you parse real source code to create a diagram then you are reverse engineering it. So what value does “code as diagrams” give us as engineers?

The simplicity of the structure according to Monet

The evening scene in the painting by Monet of San Giorgio Maggiore At Dusk shows the outline of the building, with no details on the building just a dark shape. A simple graphical representation of the calling structure of a piece of software is often shown as a simple A calls B, then B calls C. On initial inspection, this basic diagram doesn’t seem to offer much value until you have seen lots of them and then it becomes easy to spot the problems. In reality, this is the human eye and mind doing complexity analysis which could be done with a command-line tool that highlights all modules over a certain value.

Beauty in the detail according to Fazio

--

--

Greg Billington
Geek Culture

Technology Director | Passionate about management, development and helping technology teams deliver software projects successfully.