Lessons from content marketing myself (aka blogging) for five years
I started writing this blog in late 2012, partly because I felt like it would help me improve my English and my writing skills, partly because I kept having a lot of random ideas in my head and I wanted to write them down somewhere. I honestly never cared too much about finding a particular niche, I just wanted to write down stuff that I found interesting. I set up a Wordpress blog on my crappy Swedish virtual private server.
2012 and 2013 were pretty slow, but a few of my blog posts would occasionally get picked up by some obscure online forum and get a few hundred hits in a day. A few hundred hits in a day! Back in the day when I saw a sudden spike of say 200 users in a day, that was a massive deal. I kept writing stuff for more than two years without really getting many readers. Looking back I'm sometimes asking myself why? But I kind of just wrote random things and was happy about it.
In late 2014, I wrote a blog post about my experiment training a neural network to play chess. It hit Hacker News front page and generated something like 50k page views in a few days. Since then, I've had several blog posts that “went viral” and generated a bunch of traffic.
- Deep learning for chess
- Generating fonts using deep learning
- I believe in the 10x engineer, but…
- Exploding offers are bullshit
- NYC Subway math
- The half life of code
- The eigenvector of “why we moved from language x to language y”
- The software engineering rule of 3
It's not a ton of volume compared to New York Times, but for me it's a lot. My top post (the eigenvector post) is at 128k page views so far.
History of my blog, as told by Google Analytics
This is monthly page views since 2013. I'm now averaging about 20,000 pageviews per month so about 600/day although it's extremely spiky. If I switch to daily granularity it looks kind of silly:
The average (as I mentioned) is about 600 but the maximum is more than 50k. This is clearly not a Poisson but some really fat tailed distribution!
I get about 50 page views per day from Google search results. Not sure if this number should be higher.
I also have 1k+ subscribers on Feedly. I don't know the exact number, since it just shows up as “1K” once I crossed the 1,000 limit. I think you can tell from the User-Agent strings of the access logs but it's not showing up for some reason.
History of my blog, as told by Pingdom
Looking at uptime and page view latency is a bit like understanding volcano eruptions by digging out ice from Greenland:
Almost all the red lines are caused by blog posts going viral. It's honestly something I'm pretty embarrassed by! In total the uptime is 99.85% which I guess isn't terrible, but weighted by traffic volume it's probably far less.
But here's the good news. The uptime since April 2017 is ONE HUNDRED PERCENT 💯 .
I've had a lot of downtime in the past, cause by traffic spikes. The worst one was when my font post landed on Hacker News in the middle of the night. I woke up and my blog had been down all night. It did generate a lot of traffic from other sites, but sadly very little from Hacker News.
Honestly I think the hardest problem about provisioning my blog for traffic spikes is fighting my Swedish modesty that always tells me no one is going to read my blog posts anyway. But some stuff on the technical side I've learned:
- Set up Pingdom to track uptime, with text message alerts.
- Wordpress on a private server is slow as hell. I switched to Jekyll and wrote a conversion script to move everything. Honestly not a big fan of Jekyll, but seems like that's what most people use.
- Jekyll on a private server is also kind of slow. Use something like Github pages or (I do this) Cloudfront+S3.
In retrospect, I should have just used a static site generator and S3+Cloudfront from scratch. Don't run your own server, it's just a recipe for failure. Cloudfront is also nice because it lets you set up HTTPS termination very easily, but if you don't care about HTTPS, you can also just use S3 and run it on HTTP. I've also heard good things about Cloudflare. My AWS bill for Cloudfront and S3 is about ~$5-10/month these days, so not a lot of money.
At some point I also became obsessed with page speed. The choice of the very minimalistic theme made it easy, so after some minor tweaks (like inlining all CSS), I'm now proud to announce that I have a 99/100 score on Pagespeed Insights ⚡.
Some stuff I've learned about writing
- There's definitely some superlinear relationship between how much effort I put into things, and how much traffic I get. Putting in 2x efford can give you 10x or 100x the traffic, if you are writing something people care about.
- As a corollary, I'm fairly sure you end up with far more hits if you spend twice as much on each article but publish half as often.
- The title of the blog post matters a LOT. One of the most interesting blog posts I've written in my own opinion, was called Language pitch. Someone posted it to the Hacker News frontpage, but it fell off almost immediately. Clickbait titles matter! I suspect you get a 5x traffic boost if you put “deep learning” or something similar in the title.
- I added AMP to my site, but not really sure if it was worth it. It's already ridiculously fast, so it's just annoying with the slow updates from the AMP cache, that MathJax doesn't work, etc.
- HTTPS is also not super important for blogs, and it does slow down the requests a bit. But I like the philosophy of always using HTTPS and I think it might give a marginal boost to search engine rankings.
- RSS is a no-brainer, and I baffles me that some blogs don't have it. Without it, you can't subscribe using something like Feedly.
- I think, but have no evidence for it, that meta tags (like OpenGraph and Twitter) matter a lot. Once I set the metadata correctly to get big-ass previews in Twitter, I feel like I'm getting a lot more traffic from Twitter.
- Blog and Twitter sort of reinforces each other. Days when I get a spike of visitors on my blog, I also get a lot of new Twitter followers. Conversely, tweeting a link to my blog generally drives a fair amount of traffic.
- Something similar applies to my Github projects. Blogging about projects and linking from projects back to the blog seems to reinforce and drive traffic to both.
- I set up a Mailchimp email collection form a month ago as an experiment. It automatically sends a email summary of all blog posts every week and took about 20 minutes to set up. I've been pretty surprised with the amount of people signing up. Getting about 2-3 per day, which doesn't seem like a whole lot, but that's potentially 500-1,000 people in a year. I got the idea from Julia Evans.
- I haven't considered adding comments so far. I find the comments of blogs that I read to be mostly a distraction, and I also dread writing posts with few or no comments. But maybe one day.
- Blogging seems to help a bit professionally. I don't think it's helped me directly (it certainly hasn't gotten me a job or gotten me promoted) but it does help me a bit in my current job with recruiting. A large fraction of people I talk to have seen my blog. I hink it acts as some form of compound marketing, where it's sometimes easier to get a foot in the door with a candidates because they have read my blog in the past.
- The original purpose of this blog was to improve my English/writing skills, and I'm fairly happy with it as such. Practicing how to put a thought into a few hundred words succinctly is a good skill to have.
- A really nice side effect is that I can use this blog as a excuse to mess around with new stuff. For instance, writing the deep chess article was a great way to make myself learn Theano. It's a nice motivator for finishing my side projects.
- I probably should focus this blog a bit more. Software engineering? Machine learning? Management? But I honestly wouldn't have written all this stuff it wasn't for the fact that I enjoy writing about whatever I'm thinking about, so regular readers have to live with random side topics… e.g. this particular blog post :)