Advent of Code with OpenRefine

The Advent of Code is an annual challenge where small fun programming challenges are set. They make nice little puzzles to test your reasoning, logic, analytical thinking and programming - and hopefully help you learn something while having some fun.

I’ve decided to try solving the puzzles this year with OpenRefine! I’ve know idea if I’ll keep it up through the whole period, or if I’ll be even able to solve all the problems with OpenRefine, but if you are interested in seeing me put my OpenRefine skills to the test, I’ll be recording my progress on my blog… starting with Advent of Code with OpenRefine | Overdue Ideas

4 Likes

I am simultaneously amazed and a little bit horrified, to be honest. This has the potential to be pretty mind-boggling! :crazy_face:
Although you will likely push our beloved tool way beyond its intended comfort zone I am sure you will find plenty of legitimate things to improve in the process, so I am happily bracing for the influx of issues and design discussions!

For instance, wow, in your video the expression dialog consistently overflows… I thought we had fixed that for ages already - hopefully it’s in 3.7 at least?!

1 Like

Well… solutions to Day 2-Day 4 now done and posted if you want to see me really abusing the record mode!

http://www.meanboyfriend.com/overdue_ideas/tag/adventofcode2022/?orderby=date&order=ASC

1 Like

Day 5 was a lot of fun to work out Advent of Code with OpenRefine Day 5 | Overdue Ideas - pretty pleased with myself on this one :santa:

1 Like

Day 6 was trivial, but day 7 almost broke me :wink: Advent of Code with OpenRefine day 7 | Overdue Ideas

1 Like

My first failure … Day 9 Advent of Code with OpenRefine Day 9 | Overdue Ideas

Maybe someone has a bright idea of how to do it, but I can’t work out a way that doesn’t involve just doing many many cell transformations

In the end I ran out of steam after Day 10 Advent of Code with OpenRefine Day 10 | Overdue Ideas - I just couldn’t find the time and energy to go further.

Overall there were some interesting lessons and I hope I can follow up with a blog post on this at some point. The two things that leapt out were:

  1. Advent of Code often requires some sum/calculation to be carried out to prove you’ve solved the problem - this is a pain in OpenRefine and is slightly frustrating as it isn’t really about the problem you are trying to solve, but rather just the way that Advent of Code checks your solution.
  2. Any problem where you had to chain together steps or calculations were especially painful - there was no easy way of saying ‘repeat this same process N times’ or ‘repeat this process until X outcome’ - basically FOR or WHILE loops

These sort of issues can be completely expected - the Advent of Code challenge is exactly what it says - a Coding challenge. Using OpenRefine was always just an experiment and a bit of fun to see what happened and what could be learnt. What we really need is an Advent of Data :slight_smile:

2 Likes

Congratulations for going that far - it is really impressive!
I am looking forward to catching up on your later solutions when I find the time. And I like your Advent of Data idea a lot! :slight_smile: