My personal, multi-event solutions for the annual series of programming challenges known as Advent of Code. Currently competing on leaderboards for IndyHackers and Smarty
2022 is the first event I've participated in, naturally the primary focus for me is getting familiar with how things work, and building an efficient workflow for ideating solutions. With that in mind, solutions are primarily written in JavaScript (with JSDoc typing) due to my familiarity. Time permitting, I may explore making my solutions more efficient and elegant.
dotenv
provides a simple way of retrieving the requiredSESSION_TOKEN
variable from a .env file for requesting unique puzzle inputjest
/@types/jest
lightweight testing library for validating solutions against provided examples
NOTE: Currently recommending the Folder Templates extension for quickly generating directory and file structures
- Install package dependencies from npm:
npm install
- (If using VS Code) install recommended extensions if/when prompted
- Create directory structure with Folder Templates for a new event (e.g. "AoC Event => 20XX")
- Create a templated language directory in the respective puzzle directory and fill in the empty content
|--- `"events"`
| |--- `"####"`
| | The yearly event
| | |--- `"#"`
| | | The daily challenge
| | | |--- `"<language>"`
| | | | |--- `"soln.<extension>"`
| | | | |--- `"soln.test.<extension>"`
| | | |--- ...
| | |--- ...
| |--- ...
|--- `".env"`
| Provides a `SESSION_TOKEN` variable for authenticating /input endpoints
|--- ...
Solution files are prefixed with a comment linking to the challenge prompt, two
functions (/^(?<puzzleName>[a-z_]\w+)Part_?(?<N>[12])$/
) to implement a
solution for part N of the challenge, and an end process that will dynamically
retrieve the unique puzzle input and return solutions
More AoC