< up >


The annual advent-of-code challenge is starting again at first of December. Ruby was my last years choice of language, which I also used to do the 2015 event for preparation. This year I go with Go since the majority of my daily projects are Go ones. My goal is to give each puzzle a serious try and write a post about interesting solutions.


All puzzles are based on some kind of data transformation. Each puzzle provides a customized input which needs to be transformed in order to get the solution. Ruby is a good first AoC language since parsing and transforming data are easy to implement out-of-the-box with native regex-support and a lot of map-reduce functions.


Using Go over Ruby for the same kind of data transformation is more complex and time-consuming. Go has no native map-reduce and therefore all transformations have to be done manually with (nested) loops which also get unreadable with higher complexity. On the other side I want to gain more experience with Go, since I’m fairly new to the language while I wrote my first line of code around December 2019.