Advent of Code
So every year on December 1st an advent calendar of the most nerdiest type is created for us to enjoy the winter time in style. This, of course, is Advent of Code. Its a series of festive problem solving inloving Santa in an unusual pickle where his quick wits and problem solving skills helps him navigate his way through the world and ultimately save Christmas.
For me
This is one of the best ways to learn a language. Simple and small problems that are accomplishable.
Yes, Mr Santa himself gave me the thumbs up
Check out Advent of Code for yourself this year!
Problem 1 : Submarine navigation
Without all the fluff and festive fun of advent of code here is th deets.
- Your submarine starts at position 0,0 (x position, depth)
- Parse input to direct your submarine.
- Multiply your depth * x progression to get an answer
Example input
forward 5
down 5
forward 8
up 3
down 8
forward 2
Note
this means that up 3 is actually -3 from the y axis.
Typescript
Very easy. I am going to intentionally over program it, to make it simple and to hopefully show some things that are weird in other languages.
Golang
this should feel surprisingly easy.
Rust
Ok, its hard