Welcome to the Advent of Code1 Kotlin project created by rhaendel.
In this repository, rhaendel is about to provide solutions for the puzzles using Kotlin language.
I started this repository in december 2024 using the Advent of Code Kotlin Template delivered by JetBrains. Since I solved all the puzzles of year 2024, I continued with the first ones, the year 2015, and restructured the project iteratively.
I'm solving the challenges for fun, but not only. It's a good possibility to learn - about the programming language of my choice, about algorithms in general, about when it's time to throw code away and start over again with a totally different approach.
Over the time, a small library of helping functions, classes and algorithms keeps growing in the extensions package. I try keeping a good test coverage especially there.
While I'm trying to learn and improve my idiomatic Kotlin, I don't stick to that. I try to us a programming style matching to the problem. Sometimes that's more functional, sometimes it's object oriented or even procedural if that's more expressive in a situation.
There is a file template for IntelliJ IDEA that creates...
- A new source file containing a main function and an initial implementation of
AdventOfCode
- An empty text file in resources for the day's puzzle input
- A test class in the test source set containing assertions for part one and two
Using the template
In IntelliJ IDEA, in the the source directory's context menu, choose:
New > Advent of Code
If you're stuck with Kotlin-specific questions or anything related to this template, check out the following resources:
- Kotlin docs
- Kotlin Slack
- Template issue tracker
Footnotes
-
Advent of Code – An annual event of Christmas-oriented programming challenges started December 2015. Every year since then, beginning on the first day of December, a programming puzzle is published every day for twenty-five days. You can solve the puzzle and provide an answer using the language of your choice. ↩