Advent of code reddit

Something is wrong with global snow production, and you've been selected to take a look. The Elves have even given you a map; on it, they've used stars to mark the top fifty locations that are likely to be having problems.

Advent of Code is an excellent annual collection of programming puzzles. It's quickly become my favorite part of the holiday season as a celebration of programming: carefully crafted puzzles, amazing solutions spanning astonishing technical stacks, beautiful visualizations — with a sense of humor and joy around it all. The reason I recommend AoC strongly is because it's simply so much fun : there's a surreal and light-hearted Santa-themed story wound around each year's story, an amazing — and inspiring — community on Reddit ; and the puzzles are generally aimed towards teaching something new. I'd strongly recommend it even if you don't generally enjoy programming competitions like Code Jam or Hacker Cup. Very briefly: a new puzzle unlocks every night at midnight, Eastern time from 1st to 25th December.

Advent of code reddit

.

Instead of looping from For the first couple of weeks I was basically trying to write Python in Rust: not really relying on the typing system, keeping all the "business" logic in my head and simply manipulating plain data structures, advent of code reddit. Avoiding complex irrational numbers meant I could translate things fairly simply into an offset of 2 along the East-west direction, and 1 up and 1 east for the others.

.

One Elf has the important job of loading all of the rucksacks with supplies for the jungle journey. Unfortunately, that Elf didn't quite follow the packing instructions, and so a few items now need to be rearranged. Each rucksack has two large compartments. All items of a given type are meant to go into exactly one of the two compartments. The Elf that did the packing failed to follow this rule for exactly one item type per rucksack. The Elves have made a list of all of the items currently in each rucksack your puzzle input , but they need your help finding the errors. Every item type is identified by a single lowercase or uppercase letter that is, a and A refer to different types of items.

Advent of code reddit

I'm Eric Wastl. I make Advent of Code. I hope you like it! You can find me on Twitter , Mastodon , and GitHub. Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as interview prep , company training , university coursework , practice problems , a speed contest , or to challenge each other. You don't need a computer science background to participate - just a little programming knowledge and some problem solving skills will get you pretty far. Nor do you need a fancy computer; every problem has a solution that completes in at most 15 seconds on ten-year-old hardware.

Nintendo switch lite nintendo store

Excellent solutions As I said earlier, there are some excellent programmers working through Advent of Code — occasionally focusing on readable code instead of aiming at the leader board, and it's a pleasure to look at their solutions. Looking through other people's Rust solutions I've seen several different mechanisms for organizing repos: some people have a Cargo project per day, per part, and some of us including me decided to use Cargo's bin support: Cargo Targets binaries. There are so many new tricks and techniques you might come across during the competition that it's hard to remember them all, let alone apply them when you next see a similar problem. Wielding iterators with more skill It's been extraordinarily tempting to convert all my for loops to iterators and code-golf my solutions away to nothingness; but if I'm perfectly honest abusing iterators often makes the code more unreadable and harder to work with. As satisfying as leaderboard positions can be, it's much more satisfying to truly learn from Advent of Code: depending on the year and the puzzle, I've improved my knowledge of — and fluency with — graph search algorithms, number theory, learning to choose the right data structure, and — yes — trying to program quickly and failing. I ended up writing a CLI to speed me up and stop filling up my Downloads folder with input1. What I learned about Rust For the first couple of weeks I was basically trying to write Python in Rust: not really relying on the typing system, keeping all the "business" logic in my head and simply manipulating plain data structures. And finally I decided to trade off memory for speed and brought it down to 1s by simply using a Vec in the final solution:. I inevitably find that I learn something every time I browse through the solutions — whether it's in the algorithmic approach, how to structure my solution, or some features or libraries that I simply wasn't aware of. Solutions, on the other hand, tend to be single numbers or strings that can pasted in: there's no submission of code required, so you can solve problems however you want. Linked lists inside an array The ideal solution for day 23 involved a linked list: that made the required operations significantly cheaper. Some other tools I picked up along the way.

You're already almost 1. What you can see, however, is a giant squid that has attached itself to the outside of your submarine.

This is as much for me in as for anyone who's somewhat unfamiliar with it; there are a couple of things I would recommend to have the most fun with the contest:. Write about it! Inputs vary and can be large; occasionally involve ASCII art or other sentences that need to be parsed. As I said earlier, there are some excellent programmers working through Advent of Code — occasionally focusing on readable code instead of aiming at the leader board, and it's a pleasure to look at their solutions. Eric provides an excellent and easy to use API to fetch inputs, and submit solutions: so I wrote a small program that would fetch the input and write to stdout — which I could then pipe into my solution. I completely missed out on the fact that operator precedence is a thing parsers have to account for and Day 18 drove that home. Avoiding complex irrational numbers meant I could translate things fairly simply into an offset of 2 along the East-west direction, and 1 up and 1 east for the others. Participating there to learn and have fun is a pretty good use of your time. Using AoC as means to polish up my command of Rust seemed like an excellent opportunity. As they're making the final adjustments, they discover that their calibration document your puzzle input has been amended by a very young Elf who was apparently just excited to show off her art skills. I somewhat annoyingly for any followers tweeted my way through , and regret not keeping a better record for earlier years.

0 thoughts on “Advent of code reddit

Leave a Reply

Your email address will not be published. Required fields are marked *