My goal is to develop the muscle memory for the tool so I can write code quickly. I’m still generally thinking through the puzzles, but being able to just write out plain English logic, get code generated, ask for it to be well documented, quickly refactor things to be generally reusable, etc, is just fantastic and how all software development should be done in this day and age frankly. Such an accelerator to problem solving.
Advent of Code 2024
291–300 of 580 posts
Re: Advent of Code 2024
#292AoC is in this weird place where it's too easy to be fulfilling on its own, but too bothersome to just do it for leisure. I did it once (using Python with no imports for some mild challenge), waking up super early to actually start on time, then golfing my answers if I felt like it. It was a fun thing to do... once. I don't feel the need to repeat that and I don't find it engaging enough to do without time pressure,…
I find no particular pleasure in using an everyday language like Python for it, because as you said it's too easy.
I have used Haskell, Racket, and in some easier cases APL and it's been fun. Treating it more like a puzzle than an actual programming assignment.
When learning new languages, it's best to do something that actually makes you think in a different shape. If you know Python, don't do Ruby. If you know Java, don't do C#.
Re: Advent of Code 2024
#293I haven't completed one before and I have a question for those who have. Can I treat the entire month as one code based which evolves over time, with an evolving set of unit and integration tests? Or do some days require starting from scratch? Lots of people here are talking about completing it in exotic languages but I'm more interested in using it to sharpen enterprise coding techniques.
The main exception is 2019's Intcode VM/interpreter which was used over about a dozen days (I mentioned it elsewhere, he hasn't done anything like that since). Occasionally, beyond basic algorithms there is some continuity between 2-3 days but that's not terribly common, I don't think there were any pairs of puzzles like that last year or the year before.
If you want to make one code base, you'll still have 25 or so separate solutions. You might have some continuity with common algorithms (like A*) that get used a fair bit in search problems or abstracting out the input handling when you identify common structures for parsing.
Re: Advent of Code 2024
#294The past few years I've decided to stick to the same principle I've used in all of my side projects recently. Either I do something in a new language, or I get it done correctly before I get bored. I've found I can't have both.
Re: Advent of Code 2024
#295Last 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.
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.
Re: Advent of Code 2024
#296Last 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 got stuck on the graph-cut puzzle for FOUR MONTHS. I had to write a force-directed graphing engine to find the longest three edges to cut. After I solved it I looked at other people's solutions and they used Meta's proposition solver in about 10 lines. Seemed like a massive cheat to me.
My script still says "TODO: find a real solution". Good times.
Re: Advent of Code 2024
#297Re: Advent of Code 2024
#298Re: Advent of Code 2024
#299This years challenge for me: write it in C without the standard library or an allocator. Has to be runnable on an STM32 with 32kb of SRAM. I tried doing it in Assembly two years ago, ended up spending hours and hours writing an Assembly standard library, then gave up and switched to Rust...
Good luck! Personally, I'm still going with CL but decided to try it in all the languages I "know" for the first day. Including C which doesn't have hash tables (inb4 hsearch)... what a pain, let me tell you. https://git.sr.ht/~q3cpma/aoc2024/tree/master/item/01 If you could post a repo link so I can look at some of the progress, I'd be grateful.
Re: Advent of Code 2024
#300This years challenge for me: write it in C without the standard library or an allocator. Has to be runnable on an STM32 with 32kb of SRAM. I tried doing it in Assembly two years ago, ended up spending hours and hours writing an Assembly standard library, then gave up and switched to Rust...