4 ms·
I did several of these last year and found them deeply unpleasant. I like puzzles but some puzzles are just...bad. Like the ones that require you to just brute
by javajosh 4y ago
I did several of these last year and found them deeply unpleasant. I like puzzles but some puzzles are just...bad. Like the ones that require you to just brute force a solution, or write lots of detailed code to capture the requirements...that shouldn't be what this is. Just my opinion, of course, but like I said I found last year an unpleasant chore that felt more like work. Hope it's not like that this year.
- xyzelement 4y agoI recently went through the 2021 puzzles and I don't recall having this experience. I also think the choice of language matters a lot. I did it in prolog a few years ago and it was super concise because you just dealt with pure logic at that point. I can see it be more verbose in Java :) but seriously I find these puzzles hard but not in a chore kind of way.
- deleted 4y ago[deleted]
- bmitc 4y agoAre your Prolog solutions public? I would love to take a look!
- xyzelement 4y agoI'd love to but alas I don't have it public. Googling, I found a few other folks like this one: https://github.com/Limmen/Advent-Of-Code16-Prolog https://github.com/Limmen/Advent-Of-Code16-Prolog Don't know if this is "beautiful" prolog but the programs seem pretty short compared to what a typical AoC question is.
- widforss 4y agoI have only solved one puzzle in Prolog, but here it is: https://github.com/widforss/adventofcode/blob/master/examples/2020/7/main.pl https://github.com/widforss/adventofcode/blob/master/example... I choosed Prolog for that one as that meant I didn't have to implement the search algo, just state the problem in logic.
- kazinator 4y agoThere was one about piecing together data from multiple under-water sensors regarding the locations of mines or something. With the data being rotated in various orientations (in right angle increments) thus having to correlate the overlapping data items. I think it was 19. I wrote quite a log of code to brute force this: https://www.kylheku.com/cgit/advent/tree/2021/19 https://www.kylheku.com/cgit/advent/tree/2021/19 Some people's solutions used some linear algebra libraries in ways I don't understand; one day I will revisit that.
- Snild 4y agoEach year does vary slightly in theme and focus, so it's possible you'll have more fun this time if you give it another chance. Or not. But remember that it's never too late to give up. :) My favorite so far is 2019, where several of the problems had you write and extend an emulator for the imaginary (and wacky) "IntCode" computer.
- bdowling 4y ago2019 was excellent. Each day, the puzzle would have you adding new features (new instructions, addressing modes, input/output handling) to the emulator. The early days were fairly simple, but things got progressively more complicated. On one day the puzzle input was code that played a game of Breakout. Your task was to implement an emulated joystick that would play perfectly. The solution was the final score. On another day the puzzle required several virtual machines running in parallel feeding the output of one into the input of the next to get the final answer. Reddit r/adventofcode is also fun. People post not only solutions in various languages, but visualizations of solutions (e.g., an animation of that game of Breakout). Sometimes people post fun things, like a solution to a puzzle in Apple II BASIC and a video of it running on an actual Apple II.
- Crespyl 4y agoOne of the things I really loved about the IntCode problems was best exhibited by that Breakout game. One way of solving the problem was to create a joystick, as you said, but if you had built an IntCode inspector/debugger, you could also dig into the game code itself (your puzzle input) and find out where the blocks were in memory, and how much each one was worth, and just sum it up directly. It reminded me of Wastl's other big puzzle collection (Synacore) which also had a big emphasis on implementing a VM to host further puzzles on top of.
- MereInterest 4y agoI like that solution by code-diving. I had initially rigged up a joystick for it, but programmed it to to play itself to completion.
- bugfix-66 4y agoA different kind of programming puzzle: https://BUGFIX-66.com https://BUGFIX-66.com The idea is that you read and understand a small piece of code (full of useful techniques) and make a small change to demonstrate understanding. Games that require you to write the code are limited to rehashing the same old tired algorithms... reverse a string and other sequence techniques, edit distance and dp variants, optimization by binary search and evaluation, etc., the standard leetcode stuff. Basically, useless wankery you will never use. The competitive programming standards. If you don't have to write it, just understand it, the game can cover some very interesting new algorithmic terrain. It becomes part book, part game. Like Hacker's Delight: The Game.
- californical 4y agoI like this idea! Sounds more relaxing like I could passively work on it while on the train, and also see code examples that I wouldn’t normally be exposed to in my day job. Seems like it might help me get better at code reviews too. Granted, I don’t like doing code reviews (mostly cus it’s usually pretty uninteresting code). But I do like puzzles! I’ll check it out :)
- birdfood 4y agoI felt similar last year. I was trying to do them in Zig and Rust, and it felt like most of the challenge was just writing custom data parsers for poorly formatted data which felt too much like my day job.
- masklinn 4y agoFwiw there’s a few recurring formats, the old hands have a bunch of helpers for that and other things. Sometimes there’s something completely bespoke but the most commons are space-separated lines of things, usually ints, commonly fixed-size.
- dolmen 4y agoFor 2022 day 5, the hard part was parsing the input. https://adventofcode.com/2022/day/5 https://adventofcode.com/2022/day/5
- macshome 4y agoSame feeling for me as well. At a certain point it just stopped being fun and felt like work.
- makeitdouble 4y ago> felt too much like my day job Agree. I think it helps to do it in a language you're not familiar with, or with some artificial limitation on how to solve it (no third party libraries for instance). It takes more time, but felt less like a grind for me.
- seba_dos1 4y agoLast year I have used Python without using any imports and, whenever I felt like it, tried to golf it as much as I could. Turned out easier than I expected, even without any libraries Python is pretty powerful for this kind of tasks: https://gitlab.com/dos1/AoC21 https://gitlab.com/dos1/AoC21 There were only like two or three days that felt frustrating, but mostly because of the problem being poorly specified.
- 4y ago