From b5e822aaf1ba61134c05dc38506c4a4031d7c9c1 Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Wed, 5 Jan 2022 21:00:52 +0100 Subject: article: advent of code 2021 --- 20220105-advent-of-code-2021.md | 18 ++++++++++++++++++ template/index.html | 1 + 2 files changed, 19 insertions(+) create mode 100644 20220105-advent-of-code-2021.md diff --git a/20220105-advent-of-code-2021.md b/20220105-advent-of-code-2021.md new file mode 100644 index 0000000..a35e3e1 --- /dev/null +++ b/20220105-advent-of-code-2021.md @@ -0,0 +1,18 @@ +# Advent of code 2021 + +January 5th, 2022 + +This year, or rather last year, I decided to participate in the [Advent of code](https://adventofcode.com). This post will explain why and how I decided to do it, but also reflect on my progress since it's well over now. + +One of the great things about the Advent of code is that you can participate with whatever language you choose. So instead of coding in a language I'm comfortable with, I decided to go with C, for the following reasons: + +* it's been 10+ years since I last programmed in C, and I wanted to dive back into it +* maybe I can learn some "modern" C features as I will be targeting C11 +* I wanted to develop on OpenBSD and all the tools required for C development are included in the base OpenBSD install +* it's a good way to improve my skills with a terminal-based development environment: tmux, vim, make, gdb... +* C is very portable and it's always good fun to [compile and run on Visual C++ 6.0](https://twitter.com/vdouillet12/status/1468343484717404169) under Windows 98 with a [22 year old CPU](https://www.cpu-world.com/CPUs/Pentium-III/Intel-Pentium%20III%20550%20-%2080525PY550512%20(BX80525U550512).html) + +In the end, I mainly kept pace until day 8, at which point the puzzles started to take a little too much time (that I spent hunting some christmas presents...). You can find my code on my [git repo](http://git.vdouillet.fr/adventofcode2021/). Though at that point I had (re)learnt a good deal about C, and was getting more comfortable at developing and debugging in text mode only. The code is not perfect and there are still some TODOs and shortcuts, especially regarding memory management. But the main point was to get the right result at the end. + +As of today I'm still working on day 9 and maybe will continue to progress in the following weeks. + diff --git a/template/index.html b/template/index.html index 931342f..bfe1927 100644 --- a/template/index.html +++ b/template/index.html @@ -2,6 +2,7 @@

Hello and welcome, my name is Vincent and you've landed on the small space where I ramble mainly about IT and occasionally other topics. You can check my articles below, my git repos or the about page.