maybe more of a manual…
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:
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. |
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 invitation to our aoc-2022 Slack channel. It is the place to hang around, talk about different solutions and language and get help if you are stuck.
... 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
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-2022
or click the button:
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.
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
./dtcw generateSite
./dtcw previewSite
to generate the site and start a small webserver.
It should also be possible to just view the generated site by opening the build/microsite/output/index.html
file in your browser.
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