Friday, 2020-02-28

Armageddon: The Battle for Germany, 1944-1945 by Max Hastings

A great book about the tragic and bloody end of World War 2. Hastings excels at switching from grand strategy to the viewpoints of individuals, soldiers, civilians, prisoners.

Friday, 2020-02-14

D-Day by Antony Beevor

Way less dense than I remember his history of the battle of Crete. Maybe he’s become more fluent, or simply slid into the comfortable narrative style of retelling the “Greatest Generation’s” big battles. This is an ok story. The suffering of French civilians in Normandy is highlighted, which usually doesn’t happen.

Ebook maps suck.

Wednesday, 2020-02-12

Advent of Code 2020

This blog post is a work in progress

Project website: Advent of Code 2020.

Previous years: 2015, 2016, 2017, 2018. 2019.

I use Perl for all the solutions.

Most assume the input data is in a file called input.txt in the same directory as the file.

A note on scoring

I score my problems to mark where I’ve finished a solution myself or given up and looked for hints. A score of 2 means I solved both the daily problems myself, a score of 1 means I looked up a hint for one of the problems, and a zero score means I didn’t solve any of the problems myself.

My goals for this year (in descending order of priority):

  • get 40 stars or more (75%)
  • solve all problems up until day 15 without any external input
  • solve all problems within 24 hours of release

Link to Github repo.

Day 1 - Day 2

Day 1 - Report Repair

Day 1 - complete solution

Not much to say about this. I used a hash to keep track of the “rest” of the values when comparing.

Apparently this (or at least part 2) is the 3SUM problem which is considered “hard”. I accidentally implemented the standard solution in part 1 so props for that I guess.

I still believe firing up the Perl interpreter and loading the actual file takes longer than just solving part 2 with two nested loops.

Score: 2

Day 2 - Password Philosophy

Day 2 - complete solution

Despite actually being awake and caffienated when the puzzle dropped, I still managed to mess this up. Extra annoying when it’s basically tailor-made for Perl.

Here’s a partial list

  • messed up the initial regex
  • assigned $min and $max to the same value
  • messed up the comparison range in part 1
  • in part 2, tried to use the sum() function from List::Utils but forgot to use parentheses around the array

Score: 2

Saturday, 2020-02-08

Goodbye, Darkness by William Manchester

Yet another US Marine Pacific War memoir. While Manchester has a great command of language, the combination with a travelogue doesn’t really work. I still think Sledge’s work is the best I’ve read in this genre so far.

Wednesday, 2020-02-05

England’s Last War Against France: Fighting Vichy 1940-42 by Colin Smith

An informative and entertaining account of British conflict with Vichy France. It’s a good overview of the history of that shameful part of French history.

Sunday, 2020-02-02

Deception Well by Linda Nagata

An uneasy melange of Solaris and Herbert’s Destination: Void universe. Not my favorite Nagata novel.