I love plain text

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.

  • 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:

    diagram

    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.

3 Comments so far

  1. James Moore on March 28th, 2011

    There's always http://www.graphviz.org/ too - been around forever, works just about everywhere, very useful.

  2. Greg S on July 6th, 2011

    Mikemo! We have been using markdown for internal documentation for a little while now and it's pretty awesome. I was just thinking about how I might add some easy diagrams, so I did a search and somehow found - of all blogs - yours! What a godsend, thanks for doing the research for me. :) Can't wait to try these out.

  3. mike on July 6th, 2011

    Awesome, Greg! :-)

Leave a reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word