My (vanilla JS-based, n00b jr dev) solutions for the 2021 Advent of Code puzzles. Don't shoot yer eye out, kid.
Day 4 π² + π¦ s
-
Problem 4.1
- Blather forthcoming!
-
Problem 4.2
- Blather forthcoming!
Day 3 π«π· + π s
-
Problem 3.1
- I don't think anyone can ever adequately reiterate the importance of breaking things down and starting small. I created a tiny test data file with the example values and started by getting my stuff working with only one digit for each. Knowing that all this worked perfectly helped me troubleshoot much more quickly once I added in multiple digits per binary string.
- While taking a break from this problem, I learned how to make collapsible sections in markdown with this neat GitHub Gist and created this twelve days of Christmas-themed nonsense. It was enjoyable.
-
Problem 3.2
- Blather forthcoming!
Day 2 π’ + ποΈ s
- Problem 2.1
- A new-to-me way of getting at my data with Node's fs.readFile() method.
- While implementing the above, an error message led me to rename my JS file to Common JS (.cjs) module format. Then everything magically worked! Woo!
- New-to-me uses of the .map() method for data manipulation c/o this awesome person's repo.
- Problem 2.2
- Blather forthcoming!
Day 1: a π¦ in a π + π³
- Problem 1.1
- I needed to refresh my memory on imports and exports outside of the React/React Native world I usually inhabit. This Stack Overflow question helped me update my package.json to allow me to use
import
syntax. Looks like I could have usedrequire
syntax instead, according to this other Stack Overflow discussion. - Arraythis.com rules! \m/
- I should probably go back and do this without Arraythis later, lol.
- Needed a refresher on how increment (++) vs addition assignment (+=) operators work
- I needed to refresh my memory on imports and exports outside of the React/React Native world I usually inhabit. This Stack Overflow question helped me update my package.json to allow me to use
- Problem 1.2
- The Sliding Window Technique (SWT) is 1. A Thing That Exists 2. A handy tool for solving algorithms.
- Important reminder for programmers of all skill/experience levels: after you've wrestled with something for too long and get frustrated, it's important to take a break. I stepped away, mulled over this, went "huh", sat back down and had a solution within five minutes. Give your brain a break!