Advent of Code 2017

philnash profile image Phil Nash ใƒป1 min read

Is anyone taking part in the Advent of Code this year?

If you've not heard of it before, the site describes itself as:

Advent of Code is a series of small programming puzzles for a variety of skill levels. They are self-contained and are just as appropriate for an expert who wants to stay sharp as they are for a beginner who is just learning to code. Each puzzle calls upon different skills and has two parts that build on a theme.

I feel like I've seen the site in previous years, but I haven't taken part before. I am having a go this year and I am going to be writing my solutions in Crystal after writing a couple of articles on it earlier this year.

I'm also sharing my solutions on GitHub if you want to check them out. A quick search shows up other solutions too.

Are you having a go at the Advent of Code? Have you got your first two stars yet?

Posted on by:

philnash profile

Phil Nash


Developer evangelist for Twilio and Authy. I write JavaScript and Ruby. Probably listening to ska punk right now. console.log('๐Ÿป');


markdown guide

Gave up after 2 day, let's see how it will go this year

I'm using rust btw, thinking about trying something else as well, but unsure what that would be


I was tempted to try in another language too. Rust is very trendy right now, and I have tried to learn it before, but didn't really have much to do with it afterwards. Now that Rust is becoming a great choice for web assembly it might be time to try it again.


That's a problem I have with learning new languages as well, I start learning, but then don't know what to do with them


Advent of code is a really well-made website. Really hits on the right design and then gets out of the way.


It's a site for writing code, why would it need any more than a monospaced text interface?!


Here you go: Github Link

I will be doing everything in Python. I hardcoded the inputs into the files themselves, such that each day is one file. I think I will change that in the future, if the inputs become too big.

I will check out your solutions :D


Thanks for sharing! I wondered what to do with the inputs too, I've settled on a text file for each challenge. If anything, I'll remember how to load files after all of this!


Iโ€™m in! Iโ€™d never heard of this before now, but it looks cool :) Hereโ€™s my solutions.. Thanks for sharing this!


Oh, Array#rotate is perfect! My first version I'd zipped the arrays together like that, but then did it differently for the general case and ultimately converged on that solution. But I think I want to rewrite mine now, since Crystal supports rotate too!


Originally i was just doing it with the index and math, but then I was scrolling through the array docs looking for something neat and found rotate. I didnโ€™t to know about it, but itโ€™s supercool :)


Never tried it before, I'll try to participate too !
Posting my solutions on Github, I think that I'll use Python3


That is a tight solution for day 2! ๐Ÿ‘๐Ÿ‘๐Ÿ‘


Efficient enough to go to day 3! :D


I have taken part in 2015, used PHP to solve the puzzles.
Last year I missed it completely, this year I might just take part again... hmm... maybe use another language too.


It's a great little test to see how you are doing with a new language. I'm enjoying trying it with Crystal because it's still new to me, though familiar since it's like Ruby.

Give it a go! Let us know if you do take part and how it goes.


I just found out about AOC yesterday, so I'm still playing catch-up but it's been a great
Python refresher so far.
Though, I'm considering trying some of the puzzles in one of the many languages that I've been wanting to learn.
Here's my solutions repo.


I'm a bit late to the party this year, but I'll be putting my solutions in my AdventOfCode repo on GitHub! :D


Funny how dev.to challenge kind of predicted the beginning of day 3!