Charles Keepax

Atom Feed

About Me

Well... hello, I am Charles Keepax and this is my site mostly about me and other things I like. I am a software nerd, who lives in Scotland with my beautiful and patient wife. We are blessed with one very charming daughter, who does her best to make sure I don't sleep in too often.

My family bought our first computer, a BBC master, when I was 8 years old; I was immediately fascinated by it. I have always enjoyed learning new things and solving problems, and whilst programming my world was limited only by my imagination. From that moment on I knew I wanted to work with software and still maintain a real passion for programming today. Professionally, I mainly work on embedded systems but had started to feel I was perhaps neglecting my development in other areas, so I fumbled around looking for a small project to embark upon and decided I was now fashionably late enough that I could start my own blog. The rest as they say is history.

Other than programming, I have developed quite a collection of other hobbies over the years. I am a big fan of malt whisky and am a keen member of the Scottish Malt Whisky Society. I also thoroughly enjoy cooking and can while away many the hour simmering and roasting creations to inflict on my family and friends. Particularly of late I become interested in baking bread and home brewing. Few things can compete with the taste of a freshly baked loaf of your own sour dough bread, especially if accompanied with some home made ale.

Occasionally I also like to venture outside and particularly love fishing. As well as a change of pace from furious programming, fishing offers a wonderful diversity of activities. One day you can be sitting by a manicured bank with some friends, a few beers and a large box of bait. The next you might be scrambling up the muddy banks of a small stream trying not to snap your fly rod or enjoying the sense of scale as you stand in the middle of a large salmon river fighting the current with nothing but the scenery as company. And of course, the occasional fish for dinner is always welcomed.

I will leave this fairly brief, but if you crave more you can read more about me on my cv.

A New Backend

So I am afraid, I have been rather slack on updating my site for quite a while; I have recently moved jobs which has been keeping me rather busy. Anyway, I have final found some time to play with my site again, and decided it was time to redo the backend.

I have been playing with Golang recently and have been rather impressed with it in general as a language. Particularly I have been impressed by its templating library, I wrote a small program which exports Golang templates along with a few small extensions as a command line program. This lets me combine the power of the command line with the awesome go templating library which makes generation of a simple site like this easy. The new site is completely generated using this program and a Makefile. This removes the last parts of the site that were dynamically constructed using PHP and allows me to host it completely statically on Amazon S3, which should be cheaper and scale better should I ever get a really popular post.

My templating program is called Gote (I guess pronounced 'goat'), and can be found on my Bitbucket account, here. It naturally provides all the Golang template features along with a few small extensions, that allow some string manipulation and capturing the output from shell commands.

A Little About My Site

So the site itself, I am afraid I clocked up a fair collection of crazy decisions during the creation of this site, so stick with me here. Language choice first, I have dabbled in PHP since my distant youth and decided that it was probably best to begin with something fairly familiar. I know, I know, PHP isn't that sexy these days, but still it's used in a lot of places, has a huge community, runs everywhere (i.e. nice and cheap hosting), and most importantly more often than not when someone asks me to help with a website the code I usually find myself looking at is PHP. It's the lingua franca of the internet if you will, which made it seem like a sensible starting point.

I thought it would be a good move to compound my crazy language choice with not using one of the many excellent CMS or MVC frameworks out there. "Why would you do that?!?!", I hear you scream. Well firstly, it's a hobby project with no deadlines and I fancied getting my hands dirty. Hobby projects should be fun first and foremost. Secondly, I have done small pieces of work with various frameworks and CMSs over the years and sometimes I hunger to see things from ground up for a change. You learn more creating something from first principals even if it is not the quickest of best way to build something.

Finally, my approach to content management is a little quirky as well. It struck me that the vast majority of content on the site will be static. I will write a blog post stick it up and then usually not edit it again. Secondly, I have found CMSs a little annoying in the past. A page times out or you click the wrong button and bang your large and detailed blog entry is gone; not to mention missing all my beloved Vim features. So if I am generally going to write the content in Vim anyway and then copy and paste it into a CMS, I though why not just fire the file up to the website. So that's what I do I push a new file into the repository and run a small script that regenerates the various index and menu pages for the new content. Slightly unorthodox but it lets me do all my editing in Vim and deploy a post with a couple of lines of command line ninjitsu. At this point I should probably stress that I am not advocating this and if you are building a blog use something off the shelf as I should have done. But I had fun cobbling it together and find using it rather suits me.