First post
Carl Sagan said that if you wish to make an apple pie from scratch, you must first invent the universe.
We can modify that saying a bit:
If a software engineer wishes to write a tech blog, he must first create a CMS.
And that's exactly what I did!
And as always, when I design anything, I have the following goals in mind:
- Fast
- Pragmatic
- Simple
- Durable
For this blog specifically, I wanted to work within a couple of constraints.
No Database
I am a fan of RDBMSes to be clear. My day job involves working close to the database layer. Given when
your favorite tool is a hammer everything looks like a nail, using a database should be a natural fit for
such an application as a blog written by me.
However, I decided to go a different way for multiple reasons.
First, maintaining any database (MySQL, Postgres, Mongo, etc) is overkill and overhead. I already maintain multiple
databases, why would I want to maintain another one?
Second of all, and this point pertains specifically to relational databases (as opposed to "document store" style
databases), but I don't believe it's an optimal solution for dealing with long blocks of text, and specifically, dealing with changes over time to long blocks of text. You have to have multiple rows per entry to track historical changes. However, there is already great tool for that: git.
All of my entries are written in a text editor and then checked into a git repository. Obviously things like blog entries don't change a whole lot, but I've noticed that from time to time, on any other blog I've worked on, I have had to go back and add slight corrections or update the entry, and checking every entry into git gives me a historical record of how every entry has changed over time.