Skip to content

The Advent of Code 2021 Day 21, Late Night Finish

Posted in Advent of Code

Hello everyone, it’s time for your Advent of Code 2021 Day 21 cruise log. The first log I’m writing in the dead of the night, 1.35 am London time. I figured since I was taking notes to remember what I did when writing the entry I could write the log now. Let’s jump into it then I’ll head to bed. Deal? Deal.

Busy day so today didn’t get a chance to take on the challenge before 7 pm. Only spent about twenty minutes on it which weirdly enough was enough to get part one done. After that, I had to relax so I went out to meet a friend in central London for a drink and a burger. That was nice and it might be my latest outing before heading out to France to visit family for Christmas.

After coming home I got some water then decided to spend five more minutes on the challenge to see if it can be a quick one. Of course, it wasn’t, especially when accounting for the unhealthy food floating in beer within myself. Oh and we’re getting nearer to 1 am.

I even missed a text from my girlfriend as I went back to the challenge mid-chat. Seeing 1.15 am on the clock and knowing tomorrow is leg day and that I gotta work early, I decide to give up get back to it later. I then text my girlfriend about that letting her know that I’ve gone too far and should relax more. She probably won’t reply considering now that her timezone makes it 2.15 for here. Still after lying to myself on giving up the challenge for the night I decided to spend five more minutes on it. Going through the problem and my code, it feels like I’ve done everything right. Still, I’m getting an answer that looks the right shape, with the right magnitude but the unit test still fails.

Then I see it, in my recursion, I was incrementing my score by the sum of throws rather than by the final position. I felt like a moron for a bit then got over it. Turns out my code wasn’t fully right but it took a last-ditch attempt at reviewing an intoxicated me past 1 am to see it. In the end, the surprising thing is that it took me less than an hour to solve that one. A surprise to be sure but a pleasant one.

Thank you for reading my Advent of Code 2021 Day 21 log, I will see you when I see you. You can check out my previous entry right here. And by the way, I’m still pushing code to my AoC 2021 Github repository.

Photo by Dan Green from Pexels

Be First to Comment

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    %d bloggers like this: