Discussion thread for day 5 of the Advent of Code - https://adventofcode.com/2021/day/5
@grossal 👏 going the extra step to use a count records instead of being lazy and using browse anywhere to get the total records.
Lulling us into a false sense of security with a relatively easy one on Day 5!
And I've forgotten even if I went to high school, let alone any math I may have done there!
Edit: I guess I did go to high school and something stuck since I used the word "delta" in the spoiler
Dan
I have to pass today, I couldn't understand the problem.
Realise using straight line formula will probably made it easier. Since direction doesn't seem to matter, sort from low value to higher value may simplify things as well.
Have you ever found yourself making a macro for 15-20 minutes on auto-pilot before you realize you don't need a macro? Huh? Oh yeah, me neither...
Ugh, I struggled a bit initially with part 2 until my wife (who teaches math/science) was gracious enough to re-teach me y=mx+b (which she was quite excited to see make an appearance "out in the wild", let me tell you). After thinking about it through this lens, it was frustratingly simple.
My solution is very similar to @afv2688 and @patrick_digan
(oh, and I'm using a few of the shared macros that folk have posted like the downloader and the switcher - thank you!)
From now on I'm building something that works with the example data, then plugging in my data. Saves so much time.
I'm sure there's a more mathematically sound way to do this but it works!