The earliest memory I have of ‘programming’ is in the early/mid 90s when my father brought home a computer from work. We could play games on it … so of course I took the spreadsheet program he used (LOTUS 123, did I date myself with that?) and tried to modify it to print out a helpful message for him. It … halfway worked? At least I could undo it so he could get back to work…

After that, I picked up programming for real in QBASIC (I still have a few of those programs lying around), got my own (junky) Linux desktop from my cousin, tried to learn VBasic (without a Windows machine), and eventually made it to high school… In college, I studied computer science and mathematics, mostly programming in Java/.NET, although with a bit of everything in the mix. A few of my oldest programming posts on this blog are from that time.

After that, on to grad school! Originally, I was going to study computational linguistics, but that fell through. Then programming languages (the school’s specialty). And finally I ended up studying censorship and computer security. That’s about where I am today!

But really, I still have a habit of doing a little bit of everything. Whatever seems interesting at the time!

# AoC 2023 Day 9: Stackinator

## Source: Day 9: Mirage Maintenance

Full solution for today (spoilers!)

## Part 1

Given a list of terms, repeatedly calculate the differences of terms until these differences are 0. So:

0   3   6   9  12  15
3   3   3   3   3
0   0   0   0


Calculate the sum of next terms for each sequence (18 for this one).

# AoC 2023 Day 8: Mazinator

## Source: Day 8: Haunted Wasteland

Full solution for today (spoilers!)

## Part 1

Given a (repeated) sequence of moves (L for left and R for right) and a directed graph where each node has two neighbors (left and right), count how many total steps it takes to get from the node AAA to the node ZZZ. The sequence of moves can (and will) need to repeat.

# AoC 2023 Day 7: Pokinator

## Source: Day 7: Camel Cards

Full solution for today (spoilers!)

## Part 1

Simulate a limited poker game with no suits and break otherwise tied hands lexicographically (AAAA2 beats AKAAA) because the the hands are both four of a kind, the first cards are both A, but the second A beats the K. It doesn’t matter that the first hand’s off card was a 2

Order all hands then calculate the sum of the ordering of hands (1 for best etc) times the bet for each.

# AoC 2023 Day 6: Racinator

## Source: Day 6: Wait For It

Full solution for today (spoilers!)

## Part 1

Simulate charging up race boats with the behavior that waiting X seconds to start means you move at X units per second. Given time allowed and a target distance, determine how many (integer) numbers of seconds will beat the target distance.

# AoC 2023 Day 5: Growinator

## Source: Day 5: If You Give A Seed A Fertilizer

Full solution for today (spoilers!)

## Part 1

You are given a set of initial values (seeds) and a series of range maps (where a range of numbers src..src+len maps to dst..dst+len). Apply each range map in tur, return the lowest resulting value.

# AoC 2023 Day 4: Scratchinator

## Source: Day 4: Scratchcards

Full solution for today (spoilers!). Note: I did slightly change my solutions template after writing this blog post, so the final solution is structured slightly differently than the code in this post. The functionality itself hasn’t changed.

## Part 1

Simulate scratchcards. Given a list of winning numbers and guessed numbers, count how many guessed numbers are in the winning list. Your score is 1, 2, 4, 8, … for 1, 2, 3, 4, … matching numbers.

# AoC 2023 Day 3: Gearinator

## Source: Day 3: Gear Ratios

Full solution for today (spoilers!). Note: I did slightly change my solutions template after writing this blog post, so the final solution is structured slightly differently than the code in this post. The functionality itself hasn’t changed.

## Part 1

Take as input a 2D grid of numbers or symbols (. represents empty space). Numbers will be 1 or more digits written horizontally which should be concatenated (.467* is the number 467 followed by the symbol *).

Sum all numbers that are adjacent (including diagonally) to at least one symbol.

# AoC 2023 Day 2: Playinator

## Source: Day 2: Cube Conundrum

Full solution for today (spoilers!). Note: I did slightly change my solutions template after writing this blog post, so the final solution is structured slightly differently than the code in this post. The functionality itself hasn’t changed.

## Part 1

Play a game where you have some number of red, green, and blue dice in a cup, which you draw and roll (without replacement). Which game is possible with only 12 red, 13 gree, and 14 blue cubes?

Input will look like: Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green

# AoC 2023 Day 1: Calibrationinator

## Source: Day 1: Trebuchet?!

Full solution for today (spoilers!). Note: I did slightly change my solutions template after writing this blog post, so the final solution is structured slightly differently than the code in this post. The functionality itself hasn’t changed.

## Part 1

Given a list of alphanumeric strings, find the first and last digit on each line (they may be the same). Concatenate each pair and sum them.