Hello Abnew, I saw you’re working on Advent of Code 2024-looks awesome! I haven’t tried it before but was thinking of starting. Any tips for someone who’s totally new to this? Like, how do you even approach the puzzles?
Hey! I'll give a few responses depending on what you mean by "totally new to this", happy to expand more if you still have questions. If you mean totally new to Advent of Code, but you've done other coding competitions (e.g. USACO, Codeforces): AoC problems tend to not be too bad from an algorithmic sense, so if you know things like Prim's and Kruskal's algorithms you are probably good theory wise. The main tips would be to recognize the differences between AoC and something like USACO, namely the much wider potential output range (it's not guaranteed to be a numeric type, so don't hardcode that in!) and the fact there's only a single, non-hidden input (which means you can and should hard code things liberally and make assumptions you'd never make if you had to solve the general case) If you mean totally new to competition coding, but you've done a good amount of coding in general before (e.g. you majored in CS, or have a job as a software dev): AoC problems tend to have a heavy focus on certain type of problems. www.reddit.com/r/adventofcode/comments/z0vmy0/350_stars_a_categorization_and_megaguide/ is an interesting guide to the different types (it's slightly outdated, but should still be generally relevant). There are very common recurring themes (e.g. dfs/bfs/memoization) that are pretty much guaranteed to happen each year, so knowing how to do those well will help a ton in solving problems. Often each year will add it's new spin, but the new spin is generally a relatively small modification to a known algorithm or solving type. If you mean totally new to coding in general: I'd recommend watching a few tutorial videos about a language of your choice (many people choose Python as their first language, I personally started with Java). Once you have a decent understanding of the very basics of the syntax, you can start chugging through some early day problems and see how far you can get. A general tip regardless of which one you meant: the best tip for starting is honestly just to start. For days where you do figure out the solution, see if you can turn any of the code into reusable code in the future, and for days you can't, you can view the solutions on sites like Reddit (or on my Github!).For days where you view the solution, try to rewrite the solution in your own language and read up on the underlying theory so you are prepared going forward (whether that's the shoelace theorem for some mathy problem, basic grid manipulation and pathfinding with Djikstra's, or simulation shorts via dynamic programming).
Hello Abnew, I saw you’re working on Advent of Code 2024-looks awesome! I haven’t tried it before but was thinking of starting. Any tips for someone who’s totally new to this? Like, how do you even approach the puzzles?
Hey! I'll give a few responses depending on what you mean by "totally new to this", happy to expand more if you still have questions.
If you mean totally new to Advent of Code, but you've done other coding competitions (e.g. USACO, Codeforces):
AoC problems tend to not be too bad from an algorithmic sense, so if you know things like Prim's and Kruskal's algorithms you are probably good theory wise. The main tips would be to recognize the differences between AoC and something like USACO, namely the much wider potential output range (it's not guaranteed to be a numeric type, so don't hardcode that in!) and the fact there's only a single, non-hidden input (which means you can and should hard code things liberally and make assumptions you'd never make if you had to solve the general case)
If you mean totally new to competition coding, but you've done a good amount of coding in general before (e.g. you majored in CS, or have a job as a software dev):
AoC problems tend to have a heavy focus on certain type of problems. www.reddit.com/r/adventofcode/comments/z0vmy0/350_stars_a_categorization_and_megaguide/ is an interesting guide to the different types (it's slightly outdated, but should still be generally relevant). There are very common recurring themes (e.g. dfs/bfs/memoization) that are pretty much guaranteed to happen each year, so knowing how to do those well will help a ton in solving problems. Often each year will add it's new spin, but the new spin is generally a relatively small modification to a known algorithm or solving type.
If you mean totally new to coding in general:
I'd recommend watching a few tutorial videos about a language of your choice (many people choose Python as their first language, I personally started with Java). Once you have a decent understanding of the very basics of the syntax, you can start chugging through some early day problems and see how far you can get.
A general tip regardless of which one you meant: the best tip for starting is honestly just to start. For days where you do figure out the solution, see if you can turn any of the code into reusable code in the future, and for days you can't, you can view the solutions on sites like Reddit (or on my Github!).For days where you view the solution, try to rewrite the solution in your own language and read up on the underlying theory so you are prepared going forward (whether that's the shoelace theorem for some mathy problem, basic grid manipulation and pathfinding with Djikstra's, or simulation shorts via dynamic programming).