sahaun's blog

By sahaun, history, 3 months ago, In English

Advent of Code 2023!

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as interview prep, company training, university coursework, practice problems, a speed contest, or to challenge each other.

The first puzzles will unlock on December 1st at midnight EST (UTC-5).

Tags aoc
  • Vote: I like it
  • +39
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Context from last year... w/ codes for leaderboards started by gojira and vrintle, exceeding "all nine of us!!1!" by healthy amounts...

Fun thing found in the aftermath: Designing a Programming Language to Speedrun Advent of Code and you might recognize the author (from before my time here?).

New for this year: explicitly asking to not intersect AI usage and top-100 global leaderboard-ing

I saaaaid I wouldn't try to leaderboard last year, but let myself get sucked into essentially gambling over the portion of 'easy/snack' problems... that hurt me later on re: burning out (but also busy time of real life)... that probably just means I'm in no position to give advice beyond 'choose/make a setup that makes things interesting for you' maybe.

Actually what knocked out my completionist tendencies for 2022 were: a) age, really and b) the repeated 'sin' of a 3D-but-locked-to-2D-texture-space style problem that invites hand-coding rather than applying more generally-useful knowledge/copypasta (ie more natural 'camera-space' 'turns' and rotations).

ANYWAY, somewhat different style of problemset than here, don't let the first few days bore you out of the overall journey. See its reddit for 'joy of programming'-style community etc. If you are jobhunting, some of the event sponsors are explicitly advertising that... and some (more than others) build on the problem-solving-first approach, but there might be scope errors and varied mileage there. Good luck either way, and may you consistently choose goals just outside of your comfort zone in order to grow said zone... or whatever.

There was also a Julenøtter hosted by sintef that I wish I had set aside more time for (and didn't lose my password for) -- from what I saw the problems were fewer and meatier with a chance to win mugs...? No idea if they're doing that again, and since part of my lost-pw issue was being unable to email the listed address (gmail from usa rejected?), I'm on zero related mailing lists to know. womp womp...

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +16 Vote: I do not like it

    Global top 100 is indeed a difficult target. Only a few people from the vrintle's private leaderboard (invite code 1047751-f3a5bcf8) managed to score some "global points" during the last year's Advent of Code 2022 by sometimes finishing in the top 100 on some of the days:

    1)   99 *************************  Alex Wen
    2)   33 *************************  Milind Jain
    3)   32 *************************  Berke Inan Tol
    4)    1 *************************  Eldar Bogdanov

    But does it really matter? Trying to score some top 1000 positions in the global ranking on some days may be a valid goal too. Or at least beating the other Codeforces folks on the vrintle's leaderboard ;-)

    The Advent of Code problems differ from what can be found on Codeforces and this may push some competitive programmers out of their comfort zone. For example, the input format is less bland/sterile, so just parsing the input of some problems may become a chore if someone is completely unfamiliar with regular expressions. Additionally, there's no strict time limit, so it's possible to solve some problems using less sophisticated algorithms from the Big-O standpoint.

    I also like the fact that each Advent of Code problem is split into two parts and the second part is only disclosed after solving the first part. Depending on how "futureproof" is the part1 solution, solving the part2 may either require just a trivial adjustment or a complete rewrite. This nicely simulates how requirements change during the product lifetime in the real world.

»
3 months ago, # |
  Vote: I like it +8 Vote: I do not like it

The Advent of Code 2023 tests seem to be weak for the day 5 puzzle. At least the input data given to me could be successfully solved with a buggy code. Here's a hack to catch this kind of bugs:

Spoiler for a testcase

The answer should be 11 for the first part and 5 for the second part. If you already got both stars today, please check your solution against this input.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, my testcase can be solved by just keeping the intersections all the way to the end.