Pages

Sunday, December 01, 2024

Advent of Code 2024

The Advent of Code 2024 challenge started because, well, it's Advent.  Two challenges a day, the second one generally built off the answer / pattern involved in the first.  I've played around with it using Python before and that's fairly intuitive.  However, for purposes of eat-your-own-dogfood / stomp-your-own-grapes / spoke-your-own-wheel / et al the goal as an employee of my current company is to use our own software to complete the challenges.

That can be tough as our software is designed for business analyst types when it comes to prep and blend, so it doesn't act exactly like you'd expect a software language to work.  If you're a business analyst type, that's not really an issue.  The tools are probably your language and mental structure of choice.  If your brain has been saturated over 25 years [cough, or more] with VB, C Sharp, Java, Python, Javascript, SQL, and more...well, it's difficult to make that mental shift to needing to do two or three things with separate tools where you might otherwise use a complex line of code.

So it can get complex, but possible.  However, a new challenge this year is that our cloud-based prep and blend tools are available, so rather than using the desktop designer with all the bells and whistles, I'm using the cloud versions.  Don't get me wrong, lots of bells and whistles.  But it's limited to the roughly 50 prep and blend tools across cloud native [works with cloud data in place] and standard modes [traditional engine, although it was second to production].

I'm a glutton for new tastes.  Day 1a and Day 1b are in the can.  I had to do a little bit of data cleansing and I think, like usual, I made it a little more involved than necessary [make it work, then optimize...if you care to, I always say, because it might not have a shelf life long enough to need optimization], but the answers were both right on the first try.

Day 1a - get some absolutely differences between two sorted lists and sum...


Day 1b...same pattern, but find the count of the matches in the second list and multiply that "id" by the count and sum...



No comments:

Post a Comment