Having lived in the world of technology for two to three decades now, I’ve come to a fundamental truth: text formats are the ultimate format.
“text formats are the ultimate format”
~ Me, just now
It’s funny really because for everything we’ve invented, of every level of complexity, usability, shinyness etc, when it comes down to it, texts is still king, just like it was in 1980 when I was still learning to talk.
Properties of text formats
Things that make text inevitably superior to all other more complicated formats:
- Simple - nothing to go wrong.
- Use any text editor you like - vim, vscode+vim, intellij+vim are my gotos, but there are soooo many.
- Sync, backup and restore are trivial - try as they might, nothing beats a folder-tree of text files.
- They are ultimately portable - no change in technology (windows to linux, desktop to cloud, laptop to mobile) requires you to change anything, text is text, just copy them across and carry on, the ultimate defense against the ever-present pernicious vendor-lockin.
- Conflict resolution is always possible - edited two out of sync copies? No problem, there’s a plethora of tools (kdiff3 is my favourite), or you can just do it manually if you wish.
- Version control supported - text files are trivially versionable in tools like git, everything understands it and can show diffs etc.
- Simple conventions like markdown, yaml, toml, and even slightly more complicated things like json don’t fundamentally break any of the above.
- With some lightweight processing and structure (noteably markdown), the same basic format can be automatically converted to a plethora of rich and beautiful forms, and with so many tools understanding formats like markdown you are spoilt for choice.
- Supports emoji - this one is more modern, but its usefulness is not to be underestimated, and thanks to utf-8 and unicode the plain-old-text-file can have rich emotions and symbols too.
- You can use all sorts of interesting tools to process text files, many from the linux cli stack such as
sed
,grep
(orag
), plus full-on shell scripting to automate repetitive tasks such as making a new blog post.
Amazing things you can do with text files
The below are all things I personally swear by and use daily. I wish more things were like this.
Markdown is by far my favourite text format, and it’s incredibly versatile. In my crusade to basically convert everything to plain text / markdown files having been repeatedly burnt by fancy binary formats (.doc
anyone?). GraphViz (“dot” format) is also a notably powerful text-based system.
Blogging
As per this blog, see “Setting up a static website/blog with jekyll” from 2019. No regrets there. Writing this in vim in a terminal.
Slide decks
reveal.js can parse markdown files with a sprinkling of html & css allowed inline (very handy) and turn them into stunning modern presentations with slick animations and multi-step reveals, amazing.
I was trying to create some slides in google-slides thinking that would be the quick way, ran into some bizarre formatting limitation and went hunting for alternatives. I haven’t looked back, at least for things I don’t need real-time collaboration on.
You can see what I managed to do with reveal.js for the Rust Workshop - here’s one of the source slide markdown files
Note taking
Markdown, VSCode with some markdown plugins, maybe even a markdown-wiki tool. Markor on android. Syncthing to keep them in sync across devices. Works for me, and any conflicts due to editing files out of sync is easier to deal with than tomboy’s nasty XML format (yes I know XML is text but it’s still naaaasty).
And for something much fancier, Logseq is a FOSS note-taking app that stores all your notes as markdown and layers on a sqlite index, a great UI, and a ton of plugins.
Creating pdf files
Thanks to pandoc (other tools are available), you can trivially convert your markdown files to pdf files for sharing with people who insist on that as a format.
pandoc --from=gfm --to=pdf -t html5 "input.md" -o "output.pdf"
Killer CV
Thanks to json resume you can create a CV in json (or yml), capturing the pure data, and then run it through a series of theme and formatting engines shared by the community to make something really fab in multiple formats.
Coding
This entry is only half tongue-in-cheek. I think it’s worth pointing out that programmers have, after flirting with many other approaches, settled on plain old ASCII as being the one-true-format for explaining to a computer (and other programmers) what the computer is supposed to be doing. Pay attention to what programmers have learnt, there is much depth here on managing vast amounts of precise information in text form. Especially if you are not a programmer or not used to text tools there is much to learn from this world. You might think programmers are odd creatures that thrive on unnecessary complexity; nothing could be further from the truth, they (we) are obsessive about solving problems once and for all and being ruthlessly efficient in all things. The fact that programmer practices are seen as odd by the general public is more a sign of just how far programmers have optimised their lives away from the unthinking defaults of the masses than it is of any peculiarity of whim or culture.
Graphs & flowcharts
The GraphViz dot format is amazing, it takes a bit of getting used to, but once you’ve got it then you can rearrange your flow chart with vim in a few keypresses and have the whole thing rearranged in milliseconds. Amazing.
There’s even some neat web based real-time renderers:
For UML, graphviz and many other formats there is mermaid.js, and amazingly you can embed the mermaid formats in markdown and github pages will render your mermaid diagrams. Win.
The yucky bits
The almost-rans:
- Email’s mbox format is kinda text, but due to the way it’s set up is horrible for sync
- vcf for contacts, what happened there then?!
- ical for calendars, what a disaster, so close but yet never works, shame
- XML - nice try, turned out to be horrible in hindsight, but not before we’d written almost all software to use it (
.docx
anyone?)
The text world is a bit short on collaborative real-time editing - google-docs is still king on that one, though it would be perfectly possible for equivalent tools to be created for the above text formats and tools. Watch this space.
Crappy half-arsed implementations of markdown, looking at you Jira/Confluence/Slack (not really a problem of text, more something where we’re almost there with and then crappy WYSIWIG implementations wreck it).