Five Hundredth!
This is my five hundredth post on this blog!
🔗 Timeline
As a sort of celebration for this little milestone, here’s a timeline comprising the life of this blog:
- I first created this blog writing ruby, while in Honduras, on a hosted Wordpress on Dreamhost in July of 2007.
- I made a bunch of weird comics. I think this is my favorite.
- I got a job at mitsi.
- My boss convinced me to stick with Perl rather than start using Ruby at work.
- I migrated this blog from dreamhost to linode.
- I got engaged and married.
- I replaced wordpress with Hugo.
- My first son was born.
- I got a job at ZipRecruiter.
- My second son was born.
- I migrated this blog from Linode to S3+CloudFlare.
- I published the source of the blog.
- My boss convinced me to invest in Go rather than Perl.
🔗 Popular Posts
I don’t have a good way to measure impressions of posts these days. The best I have is logs from CloudFront, which is behind CloudFlare. I have, by and by, improved the caching of my blog, so the numbers at CloudFront are not even comparable over time. With that in mind, I’ll just link to the top five posts for each of the three years I have data for, with a brief discussion for some.
🔗 2016
- Install and Configure the MS ODBC Driver on Debian (2013) - It is astounding to me how popular this post is. I even wrote a new version that should be easier to follow, but it hasn’t caught on.
- Building Secure UserAgents
- Open Source Infrastructure and DBIx::Class Diagnostics Improvements - This post is always hard for me to read or look at. What a mess.
- A visit to the Workshop: Hugo/Unix/Vim integration - I am incredibly proud of this post. It was a lightbulb moment for me, and a pleasant return to SQL after wearing an ad-hoc hairshirt for so long.
- Development with Docker
🔗 2017
- Install and Configure the MS ODBC Driver on Debian
- Perl, Linux Namespaces, and Pedestrian Problems (2016)
- Gumbo v1 (2016) - I had no idea this was so popular! I love gumbo and am glad to help people make it.
- Email Threading for Professionals (2016)
- DIY Coffee Roasting and Coffee Setup (2016) - Another non-tech post, which pleases me. Coffee!
🔗 2018
- Install and Configure the MS ODBC Driver on Debian
- A Love Letter to Plain Text - This post is sort of a follow-up to the Workshop one above. Still pleased with it, though I feel like I am having trouble expressing what I feel in my gut on this topic.
- Go Concurrency Patterns
- Investigation: Why is SQS so slow? (2017) - I forgot about this post! Curl is so good.
- GopherCon 2018
🔗 2019
- Ordering Green Coffee with Go and jq - What a fun post to be on top! Coffee!
- Install and Configure the MS ODBC Driver on Debian
- go/types package
- DIY Seltzer, Club Soda, Soda, etc (2016) - Another fun post to be so well read. Who doesn’t like seltzer?
- Generics in Go, via Contracts
🔗 This Post
So this isn’t just a “clips episode,” I figured I’d share the code I used to get the above. It’s nothing amazing but it was fun to do.
Before I write any of this I want to say that I absolutely should have just defined an Athena table first. I am sure that this was both slower and more expensive than using Athena for these reports. Oh well.
First I downloaded all of my CloudFront logs:
$ aws s3 sync s3://logs.blog.afoolishmanifest.com/cloudfront/ cf/
That took like two hours.
Then I built up the following command to find popular posts in a given year:
$ find . | grep 2016- | xargs zcat | awk '{print $8}' |
grep '/posts/' | sort | uniq -c | sort -n
I am sure I could have had find(1)
do the filtering and also the running of
zcat(1)
but I can never remember how to use find
right, and this works
fine.
Here’s the last few lines of that command’s output:
5349 /posts/open-source-infrastructure-and-dbix-class-diagnostics-improvements/
5372 /posts/building-secure-useragents/
11130 /posts/install-and-configure-the-ms-odbc-driver-on-debian/
That took like 30 seconds to run, so I automated the rest:
for year in 2016 2017 2018 2019; do
echo "$year"
find . | grep "\.$year-" | xargs zcat | awk '{print $8}' |
grep '/posts/' | sort | uniq -c |
sort -n > "../reports/$year.txt"
done
Finally, to get the actual values I cared about, I did this:
for f in 2016.txt 2017.txt 2018.txt 2019.txt; do
echo $f
cat $f | tail -5
done
(Useful use of cat if I do say so myself!)
I hope this was at least a little interesting to you. I am pleased to have a body of work that I can look back on and pin to various major life events, and indeed be a little proud of.
(The following includes affiliate links.)
These books are non-technical but the kind of thing I’d like to be able to put my name on one day.
Overqualified is a hilarious and painful novella about trying to find the right job. I have read it more than once and I think you should too.
Master of Reality (33 1⁄3) by John Darnielle is a book about an angry kid who found solace in Black Sabbath. Not quite as funny as Overqualified, but still great.
Posted Mon, Jan 6, 2020If you're interested in being notified when new posts are published, you can subscribe here; you'll get an email once a week at the most.