Remix.run Logo
StopDisinfo910 7 hours ago

I respect the effort going into making Advent of Code but with the very heavy emphasis on string parsing, I'm not convinced it's a good way to learn most languages.

Most problems are 80%-90% massaging the input with a little data modeling which you might have to rethink for the second part and algorithms used to play a significant role only in the last few days.

That heavily favours languages which make manipulating string effortless and have very permissive data structures like Python dict or JS objects.

f1shy 5 hours ago | parent | next [-]

You are right. The exercises are heavy in one area. Still, for starting in a new language can be helpful: you have to do in/out with files. Data structures, and you will be using all flow control. So you will not be an ace, but can help to get started.

I know people who make some arbitrary extra restriction, like “no library at all” which can help to learn the basics of a language.

The downside I see is that suddenly you are solving algorithmic problems, which some times are bot trivial, and at the same time struggling with a new language.

mhitza 5 hours ago | parent | prev [-]

That's a hard agree and a reason why anyone trying to learn Haskell, OCaml, or other language with minimal/"batteries depleted" stdlib will suffer.

Sure Haskell comes packaged with parser combinators, but a new user having to juggle immutability, IO and monads all at once at the same time will be almost certainly impossible.

PapstJL4U 3 hours ago | parent [-]

Maybe not learning a new language from the ground up, but I think it is good training to "just write" within the language. A daily or twice-daily interaction. Setting up projects, doing the basic stuff to get things running, and reading up on the standard library.

Having smaller problems makes it possible to find multiple solutions as well.