My 2023 attempt at the https://adventofcode.com/ challenge.
Competing against my colleagues at the very group, although this year, again, I don't really have the time or headspace to do it properly. Don't expect nice or smart code, this is panic coding at its finest. I will however build on last year and unit test (with ts-jest) as much as possible.
I always forget how to get there so, for the record
npm i typescript --save-dev
npm i --save-dev @types/node
npm i --location=global ts-node
npm i ts-node --save-dev
npx tsc --init
npm i --save-dev ts-jest
npm i --save-dev @jest/globals
npx ts-jest config:init
ts-node aoc2023-fn.ts 7 1 test
ts-node aoc2023-fn.ts 7 2
npm test -- day00/Day00.test.ts
I'm not being particularly smart with TS, but using strong types saves me from pretty stupid mistakes.
I've created hygen templates.
Once hygen is installed (npm i -g hygen
) adding a new day is as simple as typing:
hygen day add --day 6
Easy enough, just wish it hadn't been a Sunday. Ended up doing it at bed time. But at least this new repo is ready