/aoc2017

Advent of Code 2017 http://adventofcode.com/

Primary LanguageJavaScriptMIT LicenseMIT

December 2017

My solutions for this year using JavaScript (node.js). Each day's input and solutions are in labeled directories. Initially I'm expecting each day to include a module with functional code and a test.js file which actually runs the code. There's also a top-level package.json file for modules and boilerplate.

AoC is also a great opportunity to learn something new. This year I've got too much going on to realistically tackle a new language, but there are a few things I'm trying:

  1. I'm using AVA test runner to check my results. The shape of these challenges fits well with a unit test framework, and this is a good opportunity to work on better practices. I've never used AVA, so let's see what happens.

  2. The bulk of this year's challenges will be written on a 2017 MacBook I borrowed from work. The little one (12-inch) with the keyboard I don't love. So far, it's been fine. The screen is nice (running at 1920x1200 thanks to QuickRes), the computer is plenty fast for simple scripts, Git and web browsing and the the battery is phenomenal. The keyboard however is really proving to be a bit of an issue for me -- my typing is significantly worse on this.

The package.json file uses two commands:

  • npm start - Watches files and runs the test suite when files change
  • npm test - Just runs the test suite

styled with prettier

Solutions and Explanations