Comments are back!
Comments are now back up and running. They were interesting to put together; as a concept they don't play well with a static site, as they are by their very nature dynamic.
I was considering using Disqus, but I do want to try to
keep my data to myself with this blog. I wound up putting together a separate
site, comments.gilesthomas.com, which is non-static, and handles all of the
comments -- some simple JavaScript injects them into each post page. It uses
Akismet -- the one external dependency I feel I can allow myself -- to filter
spam.
Should be interesting to see how it works! I'll give the new system a few days to bed in, and for a spot of code-tidying, then I'll post on the design of the new blog as a whole. I feel that I have Things To Say.
A new beginning
If you're reading this, you're seeing my new and shiny blog :-)
Blogging has been quite light here over the last few years; as PythonAnywhere has taken off, life has become ever-busier, so, less time to post.
But I also feel like one of the reasons that I've not been posting has been that I was using a Wordpress blog. Not that there's anything wrong with Wordpress, mind, but every time I logged on to it there were a pile of security updates to download and install, which was very demotivating. So often I'd think, "oh, I should post about that" but just never get round to it.
(There's also the faint embarrassment factor of running one of the most popular Python hosting platforms, and having a blog based on PHP...)
For a long time I'd been vaguely planning to switch over to some kind of static site generator like Hugo or Sphinx. They are both well-regarded, but our experience in porting the PythonAnywhere blog over to the former gave me some pause; while Hugo was really configurable, it always seemed to be really hard to configure it the specific way we wanted.
And then I thought, wait a minute. I'm meant to be a programmer. How hard can it be to write a simple static site generator?
That's the kind of sentence that feels like it should be followed by, "it was actually really hard". But it wasn't, because all of the pieces have been coded by generous people already and it was just a case of plugging them together.
With the help of wpparser to parse an export of my old blog (which I fed into a little script that spat out the articles in a Hugo-like format) and then markdown2 to format markdown-based posts, Pygments to highlight my code blocks, and then Jinja2 to let me bung the results in some templates, and feedgen to write out an RSS file, it was pretty easy to put together something that replicated the URL structure of the old blog.
To be honest, I've spent significantly more time fiddling with the CSS to make it all look pretty. I doubt that bit shows.
Anyway, now I have something where I can knock together a quick post in markdown, run a command, and have it published. Welcome to my new blog!
I'll be scanning through the old posts over the coming days and fixing any formatting issues I find.
The next step will be to work out some way of bringing the comments
over, as they (of course) don't really fit in with the whole "static site" side of
things. I have some ideas, though... But if you'd like to leave a comment in the meantime, @ me on Twitter.
(Update 2021-02-22: comments are back!)
...just resting...
Just a quick note to say that I'm still here! Using rsp as a front-end for this site has usefully shown up some weird bugs, and I'm tracking them down. I'll do a new post about it when there's something useful to say...
...and another sidetrack -- a new theme!
While I was at it, I figured that this blog was looking ridiculously dated. So I've fixed that with the Iconic One Wordpress theme, with a few tweaks that I think make it look a bit cleaner.
A brief sidetrack: Varnish
In order to use this blog as a decent real-world test of rsp, I figured that I should make it as fast as possible. The quickest way to do that was to install Varnish, which is essentially a reverse proxy that caches stuff. You configure it to say what is cachable, and then it runs in place of the web server and proxies anything it can't cache back to it.
I basically used the instructions from Ewan Leith's excellent "10 Million hits a day with Wordpress using a $15 server" post.
So now, this server has:
- rsp running on port 80, proxying everything to port 83.
- varnish running on port 83, caching what it can and proxying the rest to port 81.
- nginx running on port 81, serving static pages and sending PHP stuff to php5-fpm on port 9000.
I've also got haproxy running on port 82, doing the same as rsp -- proxying everything to varnish -- so that I can do some comparative speed tests once rsp does enough for such tests to give interesting results. Right now, all of the speed differences seem to be in the noise, with a run of ab pointed at varnish actually coming out slower than the two proxies.
Shiny new blog theme
I thought it was time for a change around here, so I've updated the theme with something prettier. What do you think?
Click-through ratios
Shortly after writing about the correlation between music copyright and composers in England, I read one of Mike Masnick's thought-provoking anti-copyright posts over at Techdirt, and thought he might be interested in the book review that had prompted my post. I dropped him a line, and last Thursday he wrote an article which mentioned it.
He was kind enough to include a "hat-tip" link to my post as well, so I prepared for a spike in visitors here. After all, Google Reader says that Techdirt has 750,000 subscribers to its RSS feed; allowing for other aggregators, that means that maybe 800,000 people would have read Mike's article, and although there was no particular reason for them to click on the link to this site, I figured idle interest would probably lead to a few. The question was, how many?
Resolver Systems' banner ads tend to get three or four click-throughs per thousand impressions, and Google Adwords one or two per thousand. I figured that a hat-tip would be less effective than either of these, and might get one click-through in every two or three thousand, leading to maybe 300 visitors. On Friday I asked the people I know on Twitter what they thought I might expect, and their guesses ranged from 200 to 10,000.
The actual number was two. Not two hundred, but two visitors. When I mentioned this on Twitter, I discovered that they were both people who knew me anyway (presumably wondering if the "Giles Thomas" in question was the one they knew).
That's really quite a surprising data point.
(BTW, if you were interested in the music-related posts here, and were wondering when the next one was coming, I've moved that side of my blogging over to a new site: the Baroque Project.)
Recovered!
In early 2007, I had a nasty DB issue on my web server and (I thought) lost the first year or so's worth of posts to gilesthomas.com -- including the history of my attempts to automate my backups using s3sync, which are inexplicably popular :-). Even worse, the subsequent restarting of post IDs meant that Google Reader stopped noticing updates to the website, leading to a number of readers thinking I'd gone quiet.
Today, I found an old backup, and I've managed to merge it in with the recent posts -- so hopefully all of these problems are now fixed. There's a risk that some RSS readers might mark a lot of old posts "unread", so apologies if it looked to you like I'd just made a few dozen new posts.
All should be well now.
[Update] I've checked Google Reader and it looks like posts are feeding through again. w00t!
Back again
Things have been busy for the last week or so, especially at Resolver, where we are moving inexorably toward a public launch. Normal blogging service will be resumed shortly.
Hello, world!
This is a new technical blog to replace the personal/political blog I've been keeping for a while - which latter shall remain nameless... A fresh start -- somewhere to keep "lab notes" as I play with the various techie toys I have at home, to store links to sites and articles I find interesting, and perhaps somewhere to sound off about tech-related ideas coming from work. I think it'll be fun.