Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/topener/adventofcode
https://github.com/topener/adventofcode
advent-of-code advent-of-code-2020 advent-of-code-2021 advent-of-code-2022 advent-of-code-2023 adventofcode adventofcode2020 adventofcode2021 adventofcode2022 adventofcode2023
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/topener/adventofcode
- Owner: Topener
- Created: 2020-12-02T14:38:03.000Z (about 4 years ago)
- Default Branch: 2023
- Last Pushed: 2023-12-08T13:15:26.000Z (about 1 year ago)
- Last Synced: 2024-07-01T18:19:37.810Z (6 months ago)
- Topics: advent-of-code, advent-of-code-2020, advent-of-code-2021, advent-of-code-2022, advent-of-code-2023, adventofcode, adventofcode2020, adventofcode2021, adventofcode2022, adventofcode2023
- Language: JavaScript
- Homepage:
- Size: 179 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code
Hi all!
My AdventOfCode is `node.js` based.
To run any day, type `node index.js ` and it will execute the day you inputted. Make sure you fill the relevant `input.txt` file with the input for that day if you want to see your own code.
To run code using sample code, type `node index.js sample` and it will execute the day you inputted with the sample input. In case of 2 different sample inputs, like day 1, it will automatically find sample2.txt for part 2.
The current main branch is 2023, but code from previous years is also available.
In any solution you can replace my input.txt with your content and see if it works for yours as well.
I am always curious to better solutions, so feel free to PR on an existing day any improvements to the code. As long as they're actually improvements, not just for the sake of shorter. My code should be production-deployable (in my mind) so they should be easily readable.
For this purpose, also read [my article about 1-liners](https://javascript.plainenglish.io/we-need-to-talk-about-the-one-liners-58f460c05fc5?source=friends_link&sk=102a7a363db7988174bfb87666f63ecb). I would say I prefer longer code as long as it is readable. If something can be faster, then of course it should be.