Skip to content

Joxter/advent-of-code

Repository files navigation

Advent of Code 2022

https://adventofcode.com/2022

It is an interesting experience. It looks like a different codding style: you need to get the answer. The code should solve only one specific problem only once. You don't have to worrying about performance, reliability and maintainance.

Result (25-12-2022)

image

Some late tasks have to be optimized for performance because a raw bruteforce solution is very slow. Sometimes a slight improvement can reduce time from decades to seconds - the best feeling ever.

I decided to spend a maximum of one day to solve problems.

Some remarks

  • Day 1. The only task I solved the next day. Because I just started the challenge on the 2d December.
  • Day 5. The first day I hardcoded a part of the input.
  • Day 7. The first task I was debugging a lot. Also, I did not write a proper solution for part 2.. so, I just printed an intermediate results and find the correct answer manually. We only need to find the one answer, remember?
  • Day 9. This day was a turning point. I was so mad on 10+ screens of description, I missed several important details, and the first time I checked Reddit to find out what was wrong! And even after all spoilers, my code for second part did not work properly, whereas it worked perfectly on test examples. It was the first day I wrote a visualization to debug. I almost gave up the Advent. The only day, I submitted the solution was not retrieved from my code. I promise, I will come back to this task!
    • UPD FIX. Nothing special, the first implementation of follow function was wrong despite the correct result for the test data. I discovered this after debugging by printing every movement of every knot
  • Day 11. I was pissed off at this "find another way to keep your worry levels manageable".. like how dare a task hides essential requirements from me!
  • Day 15. The first one-star day. Just because I hung out with friends and got drunk.
  • Day 16. One-star day. I wasted too much time on the first part and didn't start the 2 part.
  • Day 17. Achievement "Tetris has been written" unlocked. Visualisation first approach is also nice.
  • Day 19. There is some veeeery obscure bug in my solution. Even the first part was not solved. Nevertheless, I was happy to solve the problem
    • UPD DONE. I was very close to solving the first part, I had different optimizations and one of them was wrong. I also came up with an optimization to help solve the second part, but I thought that in most cases it is useless
  • Day 22. CUBE! IT IS A CUBE! Despite several iterations of debugging, my answer for the second part was not correct. Stockholm syndrome in action - I really like the advent
    • I DID IT! my knowledge of English does not allow me to fully describe my emotions from solving this problem, you can evaluate the level of madness by the quality of the code here
  • Day 25! I spent much more time I expect on the last day. I used to be good at math. I was a bit upset that for the second star I had to get 2 stars for all the previous days:(

It was my first Advent of Code. I expected way easier tasks, way more compact descriptions, and more fun/cute reward.

Anyway, I'm very glad I got involved. I discovered a whole new style of coding, realized that I like these puzzles more than my current tasks at work..

Now my further plan includes:

  • Finish Advent of Code 2022 and understand my mistakes (DONE 18-01-2023).
  • Solve previous years in different new languages for me.
  • Better understand the algorithms, because it seems that I like it!

Thank you, Advent!

About

Advent of Code 2021-2022, JS/Rust/Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published