advent of code 2023

2023-11-24

I discovered Advent of Code a week ago, just in time to join in this year! I have been wanting to practice my Rust 🦀 skills, and this gave me a good opportunity for daily practice.

What is AoC?

AoC is a fun event around the winter holidays, created by Eric Wastl. Each day starting on December 1st a holiday themed problem is revealed. Each day the story builds on the previous days while you solve problems for some forgetful and rather disorganized elves.

The problem each day has two parts, with the second part building on the solution from the first part. The inputs are given in the form of a text file, and the results are typically a number.

So, Rust 🦀?

I’ve been interested in Rust for a long time, having learned a lot of my early programming knowledge writing C and some C++ in grad school. However, most of my practical applications, either hobby projects or tools built for work were best solved with either Python or JavaScript so I haven’t had a great reason to really dig into Rust.

The few times I have tried, I found it challenging to find what methods are available (the standard library has a lot of great capability baked in!). I haven’t had this issue at all during the first few days of AoC.

GitHub Copilot

The difference is I started using Copilot. No, I’m not just having Copilot write the solution for me, though it may be could. I use it for the excellent auto-completion that it provides. I can write the logic of what I want to do, and if I’m not sure what the correct method is, it has reliably offered up a valid method that usually is what I’m looking to do.

This is a similar experience to having a good IDE with type-aware auto-complete, which is also something new for me. This slight nudge along with the excellent feedback from the Rust compiler and after a few days I’m able to spend more time actually implementing a solution and less time combing through documentation!

Follow Along!

You can find my AoC23 repository on (GitHub)[GitHub.com/alexjbuck/AoC23]