Toolsmithing
- 2 minutes read - 361 wordsThere is a certain quiet pride in watching someone embrace a new tool that you have told them about. Recently, a co-worker asked if I had Visio on my machine. I told him that I didn’t (because I didn’t realise that I did), but asked what he needed it for. My co-worker, being an experienced and sensible kind of chap, said that he was trying to do inheritance diagrams for a bunch of Oracle database objects. Rather than the typical answer one might get, some variation of “draw a diagram, you pollock!”
Now, for basic box and stick diagrams, there are many alternatives. One I quite like is Dia, although that hasn’t been updated for a while (and at least on OS X, needs you to install XQuartz). So, a possibility, but not the best tool for the job.
But the best tool for the job — a tool for drawing diagrams that doesn’t have a graphical interface. When I explained that one, my co-worker blinked a bit, but granted me the respect to continue listening. I said that, rather than painstakingly fingerpaint one’s diagram, you instead described what the boxes were, and how they connected, and left the tool to figure out the details. “After all,” I may have said, waxing poetic as I do, “you’ve got plain text output now — transform it using this tool.”
He nodded, and set to work. Following a question I could answer, and three I couldn’t, and a brief span of time, he showed me a diagram that could be used to terrify small children. It was a superb example of the genre, and he duly sent the results off to the person who’d asked. It turns out that he’d scripted something that queried the database and output the source for the diagram, then ran that through this tool, producing the documentation as asked.
The tool is called GraphViz. If you need to produce box and stick diagrams (and are happy creating graphics without a GUI), I suggest checking it out.
Feel free to leave a comment below about any time you’ve used this or something similar.
- Posted using BlogPress from my iPad