DEV Community

Phil Nash
Phil Nash

Posted on

Advent of Code 2017

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?

Top comments (18)

Collapse
 
hrmny profile image
Leah

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

Collapse
 
philnash profile image
Phil Nash

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.

Collapse
 
hrmny profile image
Leah

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

Collapse
 
ben profile image
Ben Halpern

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

Collapse
 
philnash profile image
Phil Nash

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

Collapse
 
r0f1 profile image
Florian Rohrer • Edited

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

Collapse
 
philnash profile image
Phil Nash

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!

Collapse
 
rpalo profile image
Ryan Palo

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

Collapse
 
philnash profile image
Phil Nash

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!

Collapse
 
rpalo profile image
Ryan Palo

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 :)

Collapse
 
pbouillon profile image
Pierre Bouillon

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

Collapse
 
philnash profile image
Phil Nash

That is a tight solution for day 2! 👏👏👏

Collapse
 
pbouillon profile image
Pierre Bouillon

Efficient enough to go to day 3! :D

Collapse
 
stephanie profile image
Stephanie Handsteiner

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.

Collapse
 
philnash profile image
Phil Nash

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.

Collapse
 
tterb profile image
Brett Stevenson • Edited

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.

Collapse
 
kmcginn profile image
Kevin McGinn

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

Collapse
 
pbouillon profile image
Pierre Bouillon • Edited

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