I’m a programmer, so I’ve always loved plain text, and I’ve always been bad at doing most things that require me to work with richer formats. For example, if you ask me to create some sort of schematic or diagram, I always spend way too long working on it, and it never comes out looking very good.
That’s why I am so excited with all the wonderful tools that are becoming more and more prevalent, that allow me to work in the medium in which I am so comfortable – good old plain text – and yet to output to very rich formats.
For example:
I am writing this blog post in Markdown using the Markdown plugin for Wordpress. Awesome! I love it. I no longer have to fight with the WordPress rich text editor. (Update 2/5/2013: Now using Jekyll. Even better.)
I recently needed to create some UML Sequence diagrams to demonstrate flow through the different components of a program I was writing. I’m on a Mac, so I can’t use Visio. I spent a long time looking at a number of different options, like OmniGraffle, Gliffy, and so on. Finally, I found websequencediagrams.com, which is awesome. It lets me write a plain-text description of the interactions between the components – for example:
iPhone->Server: send request
Server-->iPhone: xml
… and it will instantly create the UML sequence diagram for me:
Once you have this capability, the possibilities are endless. For example, websequencediagrams.com makes it easy to write your own scripts in Python, Ruby, Java, or whatever, and create the sequence diagrams. So the point is, I can create the text representation locally on my own computer and check it into source control, and then recreate the resulting diagram whenever I want.
yUML is similar, but for other kinds of UML diagrams such as class diagrams. Again, you just write it down in plain text, and it lays out and creates a pretty diagram. For example, with this input:
[Customer]1-0..*[Address]
… you get this image:
In case it wasn’t obvious, both of the above services make it easy to just
put an <img>
tag in your own web page and point to their server, and your
diagram will show up.
And then there are things like PanDoc, which makes it possible to write an entire book in Markdown. Today I came across The Little MongoDB Book via Hacker News. So the guy writes the book in Markdown, and then runs PanDoc which creates a very nice-looking PDF out of the whole thing. And of course he stores the original Markdown in GitHub.
This is the way things are supposed to be. It feels so right.