Update

Running a little late on my coding update for Day 5 but I have 2 ideas. 1 is that the AdventOfCode 2022 is coming soon. As such I thought it would be good to have some short filler exercises to fill my #100DaysOfCode with. Also when AdventOfCode is live for 2022 in December, no doubt some of those days will be advent of code days. As such I have created an AdventOfCode directory and put together a Makefile and a framework of sort to make it easier to solve last year sproblems in a controlled manner. Let’s see how it develops over time.

For the time being I have solution in to my day 1 for 2021 and a way to run it with make/rspec and some shared libraries for reading input files

make

make puzzle-input year=2021 day=1
curl "https://adventofcode.com/2021/day/1/input" \
  	-H "cookie: session=536...956" > inputs/2021_1_input.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9132  100  9132    0     0   7569      0  0:00:01  0:00:01 --:--:--  7661

make all
bundle exec ruby -I lib -e "require 'day_01_sonar_sweep'; \
    puts Day01SonarSweep.new.perform(ARGV[0])" inputs/2021_1_input.txt
1139 # MY CORRECT PART 1 DAY 1 OUTPUT for 2021
bundle exec ruby -I lib -e "require 'day_01_sonar_sweep'; \
    puts Day01SonarSweep.new.perform_pII(ARGV[0])" inputs/2021_1_input.txt
1103 # MY CORRECT PART 2 DAY 1 OUTPUT for 2021

The other idea I had was brought to my attention at a recent October 2022 RoRo (Ruby On Rails Oceania) Meetup. I was presenting my Experimental methods in Sidekiq and someone asked me if you could create a web scraper that runs in sidekiq and what would be the benefit. Not only can you but there are a number of benefits, like being able to have concurrency, retrying and also potentially throttling. This did make me think that you could actually maybe build something in an “Error Drivem Development” way. The idea of Error Driven Development (EDD?) was also raised at the meetup by the other speaker, Justin Tan, in his talk on Errors and Memes. The general gist being to embrace errors and most of the time errors can be good enough to drive out what you need to build next. Let’s see how that goes … well maybe tomorrow