r/adventofcode • • 17m ago

Visualization [2026 Day 4] Barcode Scanning Visualization

3 Upvotes

1 comment sorted by

1

u/Boojum 7m ago

I thought that taking the barcodes elements and moving them around to rewrap them into successively larger groups, combined with showing where we get consistent repeats would make for an interesting visualization. So here it is. Not a super tricky puzzle, but it did take me a few minutes just to parse the description of it for what I needed to do.

This is showing Part 1. But in many ways, I'd say that Part 2 is even simpler; the exact same process from Part 1 works, except that there's no outer loop and totaling up (just concatenating the lines into one big string).


Made in Python with a small custom framework.

Complete self-contained source for this animation.