top | item 46121166

(no title)

weavie | 2 months 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.

discuss

order

ifh-hn|2 months 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.

Jtsummers|2 months ago

Ask for help explaining it. Check if a similar question has been asked already, but if not post your code to the subreddit and ask for help understanding why it works. The subreddit is friendly, people will answer if they see the question and can understand the code.