At some point in mid-2019 I discovered the [advent of code](https://adventofcode.com/) and when it was released for 2019 I thought it would be a perfect chance to play with some code by way of simple(ish) challenge.
I think these next 25 days of puzzles are a perfect place to practice a programming language. I use it partly to keep the creative side of my brain active and to also practice a language that I don’t use all the time (it also makes for a good distraction from work if I’m needing one).
[](https://training.leftlogic.com/buy/terminal/cli2?coupon=BLOG\&utm_source=blog\&utm_medium=banner\&utm_campaign=remysharp-discount)
[READER DISCOUNTSave $50 on terminal.training](https://training.leftlogic.com/buy/terminal/cli2?coupon=BLOG\&utm_source=blog\&utm_medium=banner\&utm_campaign=remysharp-discount)
[I’ve published 38 videos for new developers, designers, UX, UI, product owners and anyone who needs to conquer the command line today.](https://training.leftlogic.com/buy/terminal/cli2?coupon=BLOG\&utm_source=blog\&utm_medium=banner\&utm_campaign=remysharp-discount)
[$49 - only from this link](https://training.leftlogic.com/buy/terminal/cli2?coupon=BLOG\&utm_source=blog\&utm_medium=banner\&utm_campaign=remysharp-discount)
Last year I decided rather than keep things straight forward I would attempt to each the two daily puzzles using the transformation language [JQ](https://stedolan.github.io/jq/). I wasn’t able to solve them every day and tried to avoid the solved any hints, but I did get to [day 16](https://github.com/remy/advent-of-code-solved/tree/master/2019) but I was starting to eat into the start of January so decided I had had enough fun.
This year I’m doing JavaScript (mostly as the prototyping and planning but also to help others learn), jq and possibly (i.e. if I can fit it in) z80 assembly.
For me, JavaScript is reasonably easy and mostly going through the motions. jq is challenging but mostly because it’s not really a programming language and doesn’t have the constructs (or speed) I’m used to. z80 assembly is because I want to practice assembly and I really don’t know how to solve a lot of problems using the language.
I’ve also created a couple of videos introducing the advent of code if you’re a beginner and how I solved it in JavaScript (in real-time) and in jq. z80 will need a bit more time!
Here is the introduction and me working through the JavaScript solution - the aim of the video is to help beginners wanting to learn JavaScript and share my approach to problem solving:
Below is the solution using jq which had some native functions to do the job "easily" and yet the data being consumed was way too much so I needed to rethink the entire approach:
And if you want to poke around my code to see how I’ve done things, here’s the git repo that I’ll update as I go along: https://github.com/remy/advent-of-code-solved/
Published 1-Dec 2020 under #code. [Edit this post](https://github.com/remy/remysharp.com/blob/main/public/blog/the-advent-of-code.md)
👍 6 likes
[](](╯︵ snuoɹɥɔo(/images/no-user.svg "(╯°□°)╯︵ snuoɹɥɔo")](
Comments
Lock Thread
Login
Add Comment[M ↓ Markdown]()
[Upvotes]()[Newest]()[Oldest]()
0 points
21 months ago
Glad to see you doing this again in 2021! I liked solving it on my own before watching your vidoes last year. Will try to do the same and post my solutions at https://github.com/BlackthornYugen/advent-of-code-solved
0 points
3 years ago
Hey ! I found your last year’s post about solving AoC 2019 in jq. This is my first AoC, and I’m also solving it in jq! It’s really nice to find someone else and compare…
If you are interested, I’m posting my code here: https://github.com/Sameesunkaria/advent-of-code/tree/main/2020
[Commento](https://commento.io)