Day 013 - #100DaysOfCode
Update
So I have some half written #100DaysOfCode entries but this is me getting back on the band wagon. I am heading off to RubyConf Thailand 2022 and anyway who said these 100 days have to be contiguous.
It also happens to be AdventOfCode so day 1 it is. I didn’t do well timing wise and got quite bogged down in my “process” I have a make file and a set of sepcs and named files and heredocs for the code to go in but somehow under pressure of coding and pressure of listening out for delayed flight gate changes I lost my ability to write anything. I put my laptop away got a drink and worked out I actually have more time than I thought. Maybe time pressure just does not do my coding all that well. With time on my side I could
export my session key
use my make file to fetch the appropriate puzzle input for my code
update my tests with input and output
test for part I eq 24_000
test for part II eq 41_000
once I wrote some code that mapped with object to keep track of current, max and all “calorie” values for “elves” in the prescribed problem https://adventofcode.com/2022/day/1 j
then I could finally run using the real input
not really that thrilled with my setup for
- downloading puzzle input
- testing on sample
- switching to real data
but if I am not rushing it seems to work well
if you are intrested in my solution it can be found here -> https://github.com/saramic/100-days-of-code/blob/main/AdventOfCode/2022/lib/day_01_calorie_counter.rb