Rules

maybe more of a manual…​

Prerequisites

If you don’t know about AdventOfCode.com (short aoc) yet, please head over to the website and check it out. It is basically an advent calendar for geeks which reveals an algorithmic challenge for each day.

Here is a video of Eric Wastle himself talking about Advent of Code:

Spoiler Alert!

If you want to solve the aoc problems on your own, do not read any further. This repository contains solutions for the problems in several languages.

Never walk alone

Coding together is much more fun and that is what this site and repository is about. Share your code and check out the shared code. You will notice that there is a lot to learn from other people’s solutions!

Don’t be shy and follow our inventation to our AOC-2019 Slack channel. It is the place to hang around, talk about different solutions and language and get help if you are stuck.

The Goal of this repository

  1. is to

    • have a shared code base. It will be interesting to see how the same problem is solved in different languages with different approaches

    • have a development environment in which all examples run out of the box

How do we ensure that all examples run out of the box?

The best solution will be to use https://gitpod.io. Just prefix the URL of your GitHub fork with https://gitpod.io# e.g. https://gitpod.io#https://github.com/rdmueller/aoc-2019 or click the button:

open in gitpod (if you’ve forked the repository, the button will still open the master)

A webbased IDE will open with the repository already cloned in a docker container.

It would be awesome if we manage to get all solutions up and running in this container!

The standard gitpod.io docker container supports JavaScript, TypeScript, Java, Groovy, Ruby, Python, Go, C, C++, Rust, Perl out of the box.

At least Make, Gradle and Maven are available as build tools.

Repository structure

The structure we start with is the following:

.
├── README.adoc
├── day00
├── day01
├── day02
│   ├── groovy
│   |   └── rdmueller
│   |       ├── solution.groovy
│   |       └── README.adoc
│   └── [language]
│       └── [githubhandle]
│           ├── solution.[extension]
│           └── README.adoc
├── day03
├── day04
├── ...

As you can see, there is one folder per day (create one if you are the first for the day) and underneath there is one folder per language used. Then there is one fodler with your github handle which then contains your solution.

The file structure is quite important, because the build needs it to pick up the day, language and name in order to generate the webpage you currently read. The build will also look for the README.adoc file in each folder which you can use to document your solution.

Please, take a look at the day00 examples. Feel free to submit any kind of hello world code to day00 to see what happens.

If you want to build the web page locally, just make sure that you have java installed ( 8 ⇐ version <13 ) and run

./gradlew generateIndex bake bakePreviw

to generate the site and start a small webserver.

Contributing to this Repository

When you contribute to this repository, you have to adhere to the repository licence:

Licence

By contributing to this project, you accept that your code will be open source under the MIT licence and that you have the needed ownership of your contribution to put it under this licence.

This is not a Competition

Solving riddles is fun but it is X-Mas Time and you probably have more important things to do. So please, don’t get too involved. That’s why I don’t create a private leader board this year. Have fun in solving some puzzles, but please remember it is not a competition and you don’t have to solve all problems.

and now, get you keyboard ready and start coding! If you just want to check out the repository, there is a day00 where you can place your hello world code just to give it a try.

Have fun!

Ralf

PS: if you like adventofcode.com, consider to sponsor Eric Wastl

PS PS: you might have noticed the TIL (Today I Learned) section. Feel free to add a daily statement about your experience. And if you want to, you can also explore the src/site/content/news section and add a blog post!