News for hackers. Stuff that matters.
Re:Learn Rust by building real-world examples by raincole on Friday September 22, 2023 @10:42AM (#37612692)
AoC feels like leetcode but with weirder UI so the users can feel more like hackers.
Re:Learn Rust by building real-world examples by garrisonhh on Friday September 22, 2023 @12:08PM (#37613822)
Personally I prefer the leetcode UI, but I find that AoC challenges are usually grokkable problems where leetcode seems to require you to have a ton of very bespoke data structure and algorithmic knowledge that simply doesn't have a purpose for me besides doing more leetcode
Re:Learn Rust by building real-world examples by reducesuffering on Friday September 22, 2023 @01:27PM (#37614911)
Yes, I think this is the major difference. LC are specifically geared to test DS&A knowledge: trees, graphs, DP, BFS, DFS, greedy, etc. AoC are more about iterating fast to solve it however.
Re:Learn Rust by building real-world examples by evrimoztamur on Friday September 22, 2023 @03:42PM (#37616748)
I think I used all of these structures/algorithms for AoC. Post day-16 ends up with these often.
Re:Learn Rust by building real-world examples by jackmott42 on Friday September 22, 2023 @12:26PM (#37614072)
100% it is really well done, fun leetcode problems that get gradually harder.
Re:Learn Rust by building real-world examples by 63 on Friday September 22, 2023 @12:43PM (#37614272)
This is accurate. Maybe it's silly but it really does change the way I feel about the problems. Doing leetcode makes me think "Here I go again, grinding for corporate approval, getting ready to see everyone else's answers that are 10x better than mine and let the imposter syndrome set in" while AoC is more like "I'm so excited to see this year's problems and compare my answers to everyone on Reddit. What day will I make it to this year? What kinds of twists and turns do they have in store?" So for me it feels like AoC is more a community of excited hobbyists learning programming and trying new tech while leetcode is full of corporate bullshit trying to make me feel bad about myself, and part of that is definitely from the UI.
Re:Learn Rust by building real-world examples by IshKebab on Saturday September 23, 2023 @04:50AM (#37621653)
I would absolutely not recommend leetcode for learning Rust. Leetcode has an unreasonable obsession with linked lists and dancing pointers, which are always going to be a bit awkward in Rust. The also used unnecessarily complicated types for some of the Rust code which makes it even worse. When I hit those questions I switch it to C++.

This isn't a knock against Rust. That type of code is more painful in Rust but it's also extremely rare in the real world.

The few AoCs I've done didn't have any of that.