The Bike Shed cover image

386: Value Objects Revisited: The `Tally` Edition

The Bike Shed

00:00

How to Solve the Problem of Aggregating the Sums of All the Different T-Shirts Sizes for Each Warehouse

I think some initial implementations that we saw ended up doing either like some kind of reduce block or each with object. But what lives inside of those blocks is what gets complicated. I wanted to do things a little bit more encapsulated, and because I also knew that we're building some more logic around these, I actually wrote a custom object. So a tally object can plus another tally object. And the response from that is you get a third tally object that's gone through all of the keys and sum them together. So it's kind of an aggregate sum.

Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner
Get the app