5 comments

  • tomalaci 25 minutes ago

    I usually give myself 30-60 mins to solve. If I can't do it by then I will look up solutions and -study- them (also break it piece by piece and see if I can generalize it for future problems). I would look at solutions even after solving it by myself.

    I find that to be the best balance between challenge and learning something new. You will mentally burn yourself out if you keep bashing against the wall for hours or more, not quite a healthy thing to do :)

    Meanwhile, people who actually try to compete on this stuff have already developed rich library of specialized algorithms to leap ahead of average programmer. Well, I guess nowadays a lot of it is LLM assisted too.

    • ifh-hn 4 minutes ago

      Yeah, I definitely think there's benefit in seeing others solutions, and in this situation I want to learn from it, if I can ever reason out why it's working.

      Certainly using nushell means anything beyond the true basics seems to be beyond most LLMs.

      When I first started programming it used to get me down if I couldn't solve these things. But as I've got old and a little more experienced, I can now admit things like AoC are just not my thing. It's like crossword puzzles or low level algos. I find them extremely hard to reason about.

  • weavie an hour ago

    The more you struggle at something the more you will learn. That works up to the point where the struggle is beyond your capacity for struggle - then you just get stuck. So ideally (assuming you are doing this because you want to learn something) you want to reduce the amount of struggle to just below your capacity.

    Just copying someone else's solution, or getting an LLM to fix it for you will be very low struggle, so you won't learn much.

    To add some struggle, maybe look up a solution in a different language and translate to your language? You could choose a solution in a language similar to your language, so if you are solving in C, perhaps look up a C# solution or to make it harder look up a solution in a different paradigm. Find a Haskell solution or a Prolog one and see if that gives you enough hints.

    • ifh-hn 9 minutes ago

      I can see the benefit of the struggle, but in relation to Day 1 Part 2 I literally had no clue why what id written wasn't working or what I needed to do to fix it.

      I'm using nushell this year for AoC. It's functional by nature though you can make it imperative, so it's out of my comfort zone.

      However the problem is math based whatever language you're using, involving modulo and int division. I had an hunch it was about that but no sense of what to do or how to approach.

      Having looked at multiple ways of doing it I still have no clue what's going on, only that it works.

  • red_Seashell_32 an hour ago

    It’s better to look at other solutions, analyze and understand them to learn something new rather than giving up and not learning something new