Building a better blog.

Or, less clickbaity, building a blog in Go.

I am a fairly prolific writer. I write a lot; comments on Reddit, Hangouts messages, oh, and I guess code. I have a  lot of thoughts (Who doesn’t?), and I often find that writing them down helps me process them. So, whenever I start working on a new personal programming project, I will very often write down, in plain English, exactly what I want my program to do. This often translates really well to effective documentation. For instance, my latest pet project is to create extremely well-documented solutions for the Advent of Code. My solution for Day One, as a result of my process, is almost fifty percent comments. Of the 130 lines in the program, 54 of them are comments. When you take into account empty lines, you’re looking at as much documentation as code.

This isn’t necessarily a good thing. I could probably trim it down a bit. But that’s not the point. The program is supposed to be easy to understand for anyone. Anyone should be able to look at nearly any line of code, and understand why that code is there. This is a common theme in much of my development. However, it occurred to me that maybe, just maybe, comments in Python files and READMEs on GitHub projects aren’t the best places for me to keep my process documented. Not if I ever want anyone to read what I write, anyway. And so, I made a blog. One that I’ll actually use.

What on earth is NIH?

This blog is currently using WordPress. WordPress is great because it’s simple. WordPress is great because I can just write. All I had to do was install it using my website’s nifty “app store”, Softaculous, and here I am now, writing up a storm! WordPress is super customizable, and blah blah blah you know everything about WordPress. WordPress is boring. So why am I writing this? Well, to get back to the point of this post, I’m going to write my own blog platform. It’s going to suck. The feature parity with modern blog services will be functionally non-existent. It might support pictures. Maybe. If I get around to it. But the point is, it will be something that I made, something useful for me, and it will put to test the skills I’ve supposedly learned.

Let’s talk about what I need from a blog software. I don’t care about themes. I literally picked the first theme that came up when Softaculous asked what theme should be on my WordPress site. I don’t need themes. What I do need is a way for me to just push markdown (Yes, markdown. I like markdown) to a web service and have it rendered as HTML. Similarly, I need a way to do this without having to log on to a web interface. My blog isn’t going to get updated by some fancy web-technology-enabled text editor. [1] It’s going to be written, I’m going to type some words into a command line, and it’s going to show up on the web. That’s what I want.

How are you going to do that?

Excellent question, dear reader. As I mentioned in the subtitle to this post, I’m going to use Go as my programming language of choice. I’m choosing Go for exactly one reason: I like Go. I could go in to detail about why, and I might just do
that in another blog post, but for now, that’s all that needs to be said.

Now, normally I’d start my design process by firing up Evernote and typing out a skeleton of everything I think I’m gonna need. In fact, I did exactly that.

Yes. I named it blog.GO. I am very original.

This is exactly as far as I got before I realized that I’m missing out on a huge meta opportunity: I could write down my process of making my blog on a blog. So now you’re up to date. I’m still going to use Evernote, because I’m not an idiot, a blog is not a documentation tool. However, I’m going to make an effort to sit down after every planning, testing and coding session and write about what I did, why I did it, and how the project is going.

Maybe, in a few months when I’m tearing my hair out trying to track down a stupid parsing bug, I’ll be able to look back to this moment (or any of the intermediary moments) and rediscover why I decided to do this in the first place. Which is, to put it bluntly, because I need a tangible, useful project to stick on my resume.

That’s it for now. When I have put some work into this, I’ll update, and hopefully have some code to look at. Happy holidays!


[1] – I mean, yeah, VS Code is technically made of web technologies. And technically it’s running in an instance of Chromium, which is basically a web browser.