Last year I got stuck on Day 12 for a full week, and thinking about how to solve it consumed my every waking moment. I think this year, I'm going to be kind to myself and not participate so I can really enjoy the winter break from work.
I'm doing this year in K2 (after a long hiatus from K). Is there a K4/5 binary? ATW gave me a K2 binary, but I miss some of the K4 and later functionality):
My limited understanding is that K and J are very different, despite both being in the same language family. I found K a lot easier to grasp when I was playing with both languages years ago.
It ate my life for a few years in a row, I even managed to finish on Christmas eve twice. Now I don't even look, it turns from fun to stress rather quickly.
I re-read the intro and the fact it mentions leetcode and the like was enough for me to decide that it's an ultimately pointless endeavour for me.
I have no interest at all in competitive programming or maths; I spend 40+ hours a week doing programming for work, I want games and challenges that pull me away from that so I continue to have a life outside of my job.
For what it's worth, I hate leetcode with a burning passion, have no real interest in math, and yet I personally find Advent of Code quite fun and enjoyable.
I have found AoC fun, but on some of the later days time constraints make it a little stressful (full time job + kids constrain my time).
I've done it (and completed it) the last five years. I used it to try out a few languages (Haskell, Idris, Lean) and did it in python one year I was feeling lazy. I've got a project going now, and I probably should do that instead.
However, that project is a programming language, so this is a way to test practicality. But solving problems and fixing shortcomings in the underlying language at the same time may be a bit too much. (It's a dependent typed language, so there is a lot of subtlety to deal with.)
I find it useful for trying new languages. The first 10 days usually start very easily and progress quite gradually. The 2nd half definitely gets more brutal, but if you do have the self-control, you can stop whenever it stops being productive.
Solving the puzzles in a REPL in a dynamic language brings a lot of joy to AOC.
My daily grind is like carefully scaffolding and repainting a 50 storey office building made of typed, modular, spaghetti couples Python ML code.
AOC in ipython, by comparison, is like doodling pictures with a brush pen!
It is very enjoyable and also why leetcode is a little silly for interviews: convince me you can I want to know a candidate can flawlessly paint several hundred square feet of wall, not doodle a cat cartoon.
(Or, away from the analogy, the software equivalents. Can you safely progress business goals as a member of a team on a legacy codebase that’s partly evolving on the cutting edge and also partly rotting on the trailing edge? I don’t care if you can build a naive implementation of our trading system… sorry I mean an Elephant Auction… in 90 minutes!)
How about something creative that is at the same time relaxing?
Some time ago I started creating mods for the game stardew valley. It still involves some programming but mainly drawing, creating animations and composing music! It's an absolute blast and so relaxing (like the game itself).
I think by now I could even start working on my own game but I don't yet have a desire to.
Not the OP but as someone with the same mindset as them:
Sounds very fulfilling, but I explicitly want to stay as far away from tech as possible outside of working hours. I'd much rather draw and compose music outside of any tech environment.
Plus, creative hobbies are an amazing way to connect with people, it's half the reason I like them. Tech hobbies are going to make me connect with tech people which isn't what I want: I meet enough tech people at work, I'd end up talking about tech (languages, frameworks, software, AI...) outside of work which have no interest in, and I don't really relate to tech people anyway (as a sweeping statement that obviously isn't an absolute)
I use NeoVim but you can use any editor. It was a bit of a pain to get dotnet going on arch linux but I got it working after some tinkering.
To get started, one can install SMAPI, then unpack the game assets. Then, you can open game maps and assets in the Tiled level editor. I also use Aseprite to make the pixel art tilesets for the maps (LibreSprite would also work). I use a mix of my own tiles and tiles from the game itself for my maps. Music and sound can also be added or patched with ContentPatcher. I make all sound related stuff with Ableton Live. I haven't done much with C# yet but SMAPI provides a pretty nice API so it should be pleasant to use.
(I don't see any reference to leetcode, but people can approach Advent of Code however they like. I'm certainly not waking up at 5:50 to race for a solution.)
I actually made somewhat of an effort this time, made sure I was awake in good coding shape when the problem was released. Had a scaffold set up for running the code based on previous years. And I'm a pretty decent all-round coder, should be by now.
Ended up at around spot 6500.
Boggles my mind to even imagine what it would take.
You can see videos of what it takes; Jonathan Paulson makes the leaderboard often with Python and puts videos of him doing it on YouTube; he made positions 25 and 40 on day 1 this year and here is his video: https://www.youtube.com/watch?v=ym1ae-vBy6g
Sounds sensible. It's important to set boundaries, and enjoy time off.
For me Advent of Code is a slippery slope. The difficulty ramps up so at first it's easy, then it's rewardingly difficult. But then before I know it, it takes wayyyyy too much time. The danger is being emotionally invested by then.
There are some "filter" days for sure, usually those are when the solution needs a major leap in your approach such as concurrency, dynamic programming, or geometry equations.
It's usually not concurrency FWIW, it's almost always algorithmic in nature. On a modern machine, even highly concurrent* code would only execute 10-20x as fast and you could just wait a bit.
One common AoC trick is that you can brute-force part one (e.g. O(n^2) complexity or worse), but part two scales up `n` to make that intractable.
*ignore my sloppy conflating of concurrency and parallelism
I agree with you. I don't think either concurrency or parallelism have ever been necessary. In 2019 with Intcode, it was the simplest approach (use multiple threads, one per VM) for a couple days, but it was never actually necessary. You could do the same thing with purely sequential code, but you had to juggle the state of multiple running systems yourself then. Threads were much easier (or coroutines, go routines, processes, etc.; some concurrency system).
And by design, every problem is solvable on decade old computers in a reasonable amount of time (seconds) so parallelism is great if you're looking to minimize the runtime, but it's never necessary.
I very much enjoy the cat and mouse game of assumptions regarding part 2, it always makes me happy when the second part is just a simple adaptation of the existing solution.
Right, Eric Wastl addresses exactly this in his talk. He considers weekends and burnout in the pacing of the event. I think this is the right video: https://youtu.be/bS9882S0ZHs
Ugh, I hate log scales used arbirarily, every silicon valley nerd things it makes them cool like their EE profs teaching actual science or Ray Kurzweil singularity whatever nonsense.
Ray Kurzweil is indeed full of crap (I have a specific bone to pick with his intentional mis-use of life expectancy among other things), but what makes you think in this case the use of log is arbitrary? Did you look at the data with a linear axis? I just tried it, and the vertical space is dominated by 4 or 5 outliers, and on top of that you can’t see the trend as well when it’s linear and all the data is smooshed at the bottom. Log plots are great when your values span many orders of magnitude. That’s true in this case, and the log plot both uses less vertical space, which is nice, and it more clearly shows the trend and wastes less empty space on the small minority of outliers.
I usually make it Monday 18 or 19 and then I loose the will as the time taken is excessive, and obsessing about it is not good. I've finished a 5 years, but all after the fact. Some I am not sure I'll ever finish....
Oh man, this is my best memory of last year's AoC. After uselessly noodling for a while, I used Graphviz to draw the graph to an SVG file. It drew two messy balls of yarn neatly connected by three edges.
My script still says "TODO: find a real solution". Good times.
This was the day 25 problem: given a graph of ~1600 nodes and ~3500 edges, find the 3 edges that if deleted divide the graph into 2 components. I looked over some of the solutions and it surprised me how few used the simplest method: for each edge with endpoints u, v in the graph, delete it and then find another path P1 between u and v. Then, for each edge e1 in P1, delete it and then find another path P2 between u and v. Then, for each edge e2 in P2, delete it and then try to find another path between u and v. If there is no path, (u, v), e1, e2 is your cut-set. Otherwise, add e2 back and try the next edge in P2. When you've exhausted P2, add e1 back and try the next edge in P1. When you've exhausted P1, add (u, v) back and try the next edge in the graph. It's 3-6 loops deep depending on how you count, but it works. My python implementation completes in under 2 minutes, but it varies because it appears the standard python data structures have some nondeterminism, and I may have had a lucky draw with my puzzle input.
I have a self-imposed goal of not using third-party libraries for any of the solve logic. It feels more satisfying to do it myself, even if it takes longer.
Like Minecraft, everybody should play it however they want, it's just a game.
Which one was the "graph-cut puzzle" ? I've had a few where I couldn't do them on the day, either I was busy or I found them harder than usual or sometimes both.
It looks like in 2023 I took until almost New Year's Eve to finish, but until like the 21st of December I was fine, I got thrown off by travel and other commitments in the last few days as they got more difficult.
What solver are you referring to? I've used z3 and OR-tools, but I find it so difficult to model problems in either one that I seldom get good usage of either one.
It really is such a great game! I got the base game, beat it a few times, then my partner and I played a few mods, currently in an Angels+Bobs playthrough. So much replay value
This is my experience. After the first week I develop an intense hatred of all things Elf and start swearing at my laptop. At which point I give up to stop my mental health deteriorating any further.
One reason I didn't enjoy it was that I felt the days don't build on each other well. So you get little code reuse. It was continually changing requirements, so it was especially like work.
In 2019 he built up about 12 challenges using a VM, for Intcode, you had to construct. It was poorly received because without a working version (developed over the first few Intcode challenges), you couldn't solve the rest of them. He hasn't done anything like that since, though I thought it was probably the more interesting series of challenges.
The problem with continuity across days is that the later days can be blocked by the earlier ones, as they were in 2019. That partly defeats the purpose (or structure) of the challenge, where you can mostly pick any day and try it without regard to earlier days or prior years.
I agree that it wasn't completely well-received, and I think this is a real shame. The stated goal of Advent of Code was always to make better programmers. Extending, maintaining, and testing large systems is an important part of real-world engineering efforts.
I thought the IntCode thing was great and I hope to see something like that again this year.
I agree. Intcode was fun, but completely destroyed the promise of skipping a day and still having fun with later puzzles. I didn't come to enjoy it until much later.
Most years I've skipped a couple days and revisit them later. Usually just because I give myself 1-2 hours limit to avoid staying up too late working on them, and unless it's the weekend I don't always have time during the next day to wrap them up. No reason to stop just because of a single blocker.
I can understand that. I think it just points to that the challenge is not for me. It also comes at a time when I desperately want a break or to work on my own projects, software or otherwise.
There's a lot of potential code reuse between years; whether that's good or bad is up to you, I think. (I would personally prefer if my Chinese remainder theorem solving function got less use, but it seems to be called for every year or two.)
We run a private board for Advent of Code for the Carolina Code Conference. Eligibility for prizes starts after earning only 10 of 50 possible stars precisely for this reason.
Oh cool. I live in WNC and had just missed your last conference in August. Is it possible to join multiple private boards? I usually do one with my coworkers as well
That's awesome. We do the exact same thing for prize eligibility on my work leaderboard. The whole point is for it to be fun and challenging. No need to grind to the end unless you want to.
Likewise. I did it one year in college and it became a life-consuming thing almost immediately. Not AoC's fault - part of it was depression, part of it was the Minnesota winter. Now that I have a full-time job and a wife, I'm trying to be more careful with those things that I know will suck me in.
The year I did it I got lucky and solved them all within a reasonable amount of time until there was one that suddenly involved a lot of nontrivial linear algebra and I immediately spotted that this wouldn't be fun and noped out. Noticed the number of people solving dropped off a cliff on that day.
I think as nerds we need to be quite careful not to get too drawn into this kind of thing. Sometimes it's like a superpower, but other times it just pointlessly consumes your life. Kinda makes me think of gambling addiction: "when the fun stops, you stop".
You can also set a time rule. For me it's 45min, if it takes longer to solve it, I an allowed to quit.
It's totally worth it, though, especially for the first week, when you look up how other people solved the thing you just solved. I always learned (or re-learned) something from that. IMHO there's not that much value in looking up solutions before you solved it yourself, though.
I just have them lingering in the back of my brain the whole year. I solved the last one from last year a month ago. This is much nicer than sudokus or whatever: I sometimes dream about them and I keep finding better (in my mind) solutions for ones from years ago. It's lovely when you sit at another dumb crap meeting/standup so you have something to do in your head.
Ah yeah I've been there! Having done it a few years now, I've found that the approach that works for me is: if it starts looking like I'll be stuck on one for more than a few hours, I'll skip it and move on. Otherwise I'll accumulate an insurmountable backlog that becomes more of a depressing chore to think about, than a fun little christmas tradition. I'd rather have a mostly-complete set of problems by the end of the year that I can come back and clean up when I feel like it.
That said, if you'd have a better holiday season by just stepping back from the computer and relaxing then that sounds great too. Either way - enjoy!
My main complaint the last time I did this (2022) was the havoc it wreaked on my sleep schedule. Advent of Code is not kind to East Coast participants.
Every year except for one has been kind of the same pattern for me:
Day 1: this year, I'm just going to solve the problems. No futzing around.
Day 3: but it would be kind of neat to turn the solutions into a reusable AoC library. Just something minimal.
Day 5: and I should really add a CLI harness for retrieving the problems and parsing the input files.
Day 6: and testing of course.
Day 7: maybe I'll skip today's problem (just for today) and keep improving the framework.
I'm in CET so time-wise it can be ok - problems open at 6am meaning if I get up I have about an hour around before I need to walk my walk my dog and get ready for work. But switching on at that time is really hard, the amount of stupid off-by-one errors, or referring to since-renamed-but-still-present functions in my Jupyter Notebook is not even funny.
But I luckily managed to avoid the "reusable AoC library" problem around 2019 when a week beforehand I wrote down the sort of functions I wanted to have at my disposal (usually things around representing 2D/3D grids of unknown size and pathfinding/debugging therein, but a few other bits and pieces) and made a simple library that I will sometimes add things to after I'm done with the problem for the day.
I was tempted to some functions (similar to those your CLI harness provided) for retrieving test data and submitting answers but I managed to stop myself short of that! But I am sure you're far from the only one to end up down that road.
I'm in CET too, and 6:00 is not an hour where I’m awake, and if I were, my brain functions would definitely not be at a level where I would be capable of coding.
I think you'd be surprised - you'll definitely be capable of coding at that hour. But like me you'd just also be quite capable of making daft mistakes :D
If it's a work day and I don't wake up on time, I'll pick away at it over the course of the day - usually I'll get a chance to think about it on my tram ride to work and complete it at lunchtime
If it's a weekend I'll just do it at my leisure at some point during the day when I have some time - maybe head to a nice cafe or something.
I'm nowhere near the top 100 - closest has been iirc top 200 a few years back - so it's not like I need to start at 6am.
Hahaha...I love this comment. I have just been stuck for a week doing edge puzzles and backstepping recursion, keeping myself awake aye night because it bothered me I couldn't "just" solve it.