News for hackers. Stuff that matters.
Re:Learning Rust via Advent of Code by initium on Monday February 04, 2019 @11:46AM (#19077793)
What is HN-users view of learning a programming language through this kind of problem-solving?

Is it limiting?

Should this be used as a complement to a larger toy project?

Re:Learning Rust via Advent of Code by didymospl on Monday February 04, 2019 @12:24PM (#19078312)
It depends on the things that you want to learn and amount of extra work you want to put into it. For instance, I used Go for the most of AoC 2018 problems and I had always been using C/C++ in algorithmic contests when execution time mattered. And yet, I wouldn't say I know any of these languages good enough to write a production-grade system because I only learned usage patterns common for small, write - run once - throw away applications.

On the other hand, the author of that post seems to have used a lot of more complex language features, did profiling, debugging, made use of many libraries etc - a lot of extra stuff that wasn't necessary to give correct answers but is crucial in 'real world' programming.

Re:Learning Rust via Advent of Code by mcguire on Monday February 04, 2019 @01:13PM (#19078899)
A long, long time ago, I used Haskell to reimplement the examples from Software Tools (https://crsr.net/Programming_Languages/SoftwareTools/). It was how I got over the How-do-I-write-real-code-in-Haskell hump.

I strongly recommend it.

Re:Learning Rust via Advent of Code by jihadjihad on Monday February 04, 2019 @11:54AM (#19077904)
I've been starting to learn Rust and found the post quite useful. I think the inherit constraints with these sorts of challenges allow for time to think of creative ways to use a language's fundamentals, rather than focusing too much on architecture. It forces learning through immersion, akin to being dropped in a foreign land without knowing the language.
Re:Learning Rust via Advent of Code by antjanus on Monday February 04, 2019 @12:26PM (#19078342)
It depends on your style of learning tbh. I enjoy going through a language's basics in docs (Golang playground and Rust's docs are fantastic) and then solving a problem.

My first "app" in Golang was a discord bot. I have to do maintenance on it occasionally and it's been a great learning experience.

Re:Learning Rust via Advent of Code by jgforbes on Monday February 04, 2019 @11:57AM (#19077935)
I would say it depends on what you are trying to learn.

These types of problems will give you a good intro to a language, but won't introduce you to the more advanced libraries which you'll likely need in a professional context (e.g. threading/mutexs, tcp/udp, etc).

Re:Learning Rust via Advent of Code by ragona on Monday February 04, 2019 @12:45PM (#19078578)
I think this kind of learning is great. One of the benefits of this type of exercise is that tackle certain types of problems that are not that common in day-to-day coding, and you do it over and over, so you become quite comfortable with areas that you might otherwise not use frequently.

Building larger projects is of course also a great way to learn!

Re:Learning Rust via Advent of Code by abecedarius on Monday February 04, 2019 @06:03PM (#19081566)
I lean towards keeping to one kind of challenge at a time. If the problems wouldn't be hard in your favorite language, mostly, then this is a great way to exercise a new one. It's fun and you can learn more by checking other people's solutions afterwards.