Over the years, I’ve heard from sources up North about how Santa has been a data pioneer.
First, he progressed to NoSQL for more flexibility to manage his list and do his matching in record time. It turns out the Big Syndicate up North was actually an innovator!
Then his team upped his game and invested in semantics to improve his matches. Getting the gifts to the right kids meant nothing if they weren’t the right ones. In fact, when kids didn’t like their gifts, sometimes Santa would get sad. So his team upgraded the system to take into account the context of the kid.
However, transforming your business to be data-centric is never done. Recently my source at the North Pole revealed that Secret Santa, one of Santa’s early crowdsourcing projects, was in need of some help.
Spreading the spirit of Santa to families and workplaces with Secret Santa was a great idea, but the process was getting pretty antiquated. Putting names in the hat and picking them works great … as long as it’s a simple group. But like all social networks, Secret Santa is about mixing together multiple types of people and as it goes digital, scaling it out. Multiple families picking together and not getting their siblings can be complicated—and then enterprise applications like departments in a company, take it well beyond simple paper and a hat.
So, it was back to the keyboard for his programming elves. The goal was simple: start with the list of people that includes their group. Then, for each person, assign a pick that isn’t part of their group and (of course) hasn’t been picked before.
But like all transformations from physical to digital, there were some challenges, the most notable being data security. Santa was early into data, but he was also early into security, demanding that all of his projects not only be run in secure environments, but also properly enforce permissions with appropriate access.
This time around, Santa let each team have a go. And the results are pretty interesting:
- The Old Skool team started with a simple data structure and then used some nice tricks to trim the list based on the picker’s group. But things get complicated with the already-picked list as a global variable needs to be updated with the picks. Fortunately, maps enable you to update data during the processing. Finally, the team noticed what all of those hat pickers have encountered—this problem is a multi-pass problem—a given random match doesn’t always distribute the picks between groups, and it has to be redone until you get a good match.
For all the details, see the really old-skool post on the original XQuery blog.
Once again, Santa is ahead of the curve, enabling groups to automate their Secret Santa and scaling out his crowdsourcing to a new generation!