12
\$\begingroup\$

I'm trying to learn Rust via Advent of Code 2021, and am obviously hitting various roadblocks and solving them via Google. It would be great if someone could review my code to see how to make it fit idiomatic Rust standards.

According to AoC FAQ once you receive no points for the solution - which is after 100 entries have been received on the global leaderboard - it's fine to stream solutions (see bottom of about page). This happens pretty fast, usually within 30mins of challenge posting.

Can I stream my solution? Please try to avoid giving away the solution while people are competing. If a puzzle's global daily leaderboard isn't full yet and you're likely to get points, please wait to stream/post your solution until after that leaderboard is full. If you are unlikely to get points or the daily leaderboard is already full for the puzzle you're working on, streaming is fine.

1

I just want to double check that from the community here, if its okay to post code for a day's solution code asking for review.

1 https://adventofcode.com/2021/about

\$\endgroup\$
12
\$\begingroup\$

Yes

Welcome to Code Review! Thank you for being cautious.

Doing a search on Code Review for questions containing “advent of code” yields 95 results, many of which contain the tag programming-challenge. The tag info for programming-challenge includes adventofcode.com in the list of challenge providers.

While it isn’t the same scenario, it could be considered a similar scenario to reviewing the homework of a student before it is submitted. There is a similar meta question about that- see The ethics of answering a homework question before it is handed in. There are currently four answers to that question and the consensus among most is that there is no right or wrong answer - it could be debated either way. To quote an excerpt from the answer by Peilonrayz

Posting coursework could be classed as unethical. However it can be argued that it's no different than searching Google and finding a Stack Overflow/Code Review post that performs the same task as the coursework and learning from that.

Ultimately this is in a grey area, and is something everyone won't agree on.


I just want to double check that from the community here, if its okay to post code for a day's solution code asking for review.

As long as the code is posted by an author or maintainer of the code there likely wouldn’t be much users on CR would do if they knew that that a solution was being streamed while users are competing, unless those users were also affiliated with AOC. If a user was concerned about the code they could flag it for moderator intervention but bear in mind that before posting ”All contributions are licensed under Creative Commons” (per the Terms of service).

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .