Advent of Code 2020 in Go: Week 1 and Week 2
Instead of making a post every other day with all the solutions, here are my approaches for the rest of week 1 and week 2 of Advent of Code 2020.
Tech, life and everything else
Instead of making a post every other day with all the solutions, here are my approaches for the rest of week 1 and week 2 of Advent of Code 2020.
Here are my solutions for Day 3 and 4 of Advent of Code.
I decided to publish my Advent of Code solutions regularly (probably every other day) here on this blog. So there are a few more posts with code to read. After all, code is a big part of my life, so it should be more present here on the blog.
Because ActivityPub instances can go offline from time to time and it’s general best practice to retry failed requests, I just added a new queueing system for ActivityPub requests to GoBlog using this nice library named “dque”. There’s always a bug or sub-optimal solution I need to fix before I want to release GoBlog (or whatever I will name it in the end) to the wide world. But the frequency of the discovery of improvable things is decreasing, so I hope I will be able to write documentation soon.
Regarding the Go-based script I shared in a previous post:
Go is now eleven years old! I’ve only been programming in Go for about 1.5 years, so I’ve only actively followed a small part of those eleven years. Nevertheless I am impressed how simple this programming language is, although new features are added all the time. And instead of getting slower with more features, Go gets faster with every new release.
I recently rediscovered the ability of Visual Studio Code to develop on remote machines. Just connect to a server via SSH and develop there.
Yesterday I teased a new post about how I automated my blogroll generation by writing a Go script and using the Miniflux API. Here it is.
Because I don’t have enough side projects yet, I started programming my own static site generator, with the creative name GoBlog. I doubt it will replace my use of Hugo in the near future, but it is exciting to write a Go program that is designed for high speed. I get to know features that I have never used before. I also learn what to pay attention to when thousands of files have to be parsed and processed concurrently. Maybe I will never be able to use this project for anything useful, but side projects are mainly there to have fun or learn something useful.
The result of the Stack Overflow Developer Survey 2020 has been published and as every year it is quite interesting to take a look at it. But it is also important to note that the survey was conducted in February, before some countries went into lockdown.