Home > stockings

stockings

Stockings is a project mainly written in ..., it's free.

Learning github. Python script to help assign each Beseda family member to a stocking.

This is a script written a few years ago by myself and Matt Waddell (http://there.ath.cx/~matt) to help my father's side of the family with a traditional Thanksgiving / Christmas task.

I am including it mostly to get familiar with adding repositories and code to github and I don't mind sharing it even though it serves no utility for anybody outside of my extended family. I also present it unedited (I'd probably add some comments and additional style if I were wanting to truly show it off.)

Each year on Dad's side of the family, each member of the family is randomly assigned another member whose stocking they must fill. Ideally, you do not fill the stocking of any member of your immediate family. There were three immediate family "sets" to impose this rule on: the John Beseda, Jim Beseda, and Baggs family. Since my aunt took care of the shopping for Grandpa, he was also included as part of the Baggs family. For years, we just drew out of a hat and threw the ticket back in if it violated the immediate family rule. But the Baggs family is just under half the size of the total pool of recipients, so the rule became very difficult to follow.

Also, all of the children in the family are now at the age where drawing out of a hat has lost its mysticism. So we created this script to take care of the random pairings while also following the immediate family rules. I am leaving a photo of the youngest cousin sobbing over the demise of a family tradition in the name of technological efficiency (which really does suit us better) out of this repository for her sake. She got over it but would not get over me sharing that photo!

Like any sort of family gift-pairing, certain family members are often more sought-after than others (even though my cousins should know better by now; I exploit my status by giving them gag gifts that serve the sole purpose of bringing the lulz) so when we run this script there have been immediate demands for "RE RUN!" I solved this problem during Christmas season of 2010 by piping the output to a file and then emailing the file to the entire family, unread. Anarchy ensued nonetheless.

One of the interesting problems posed by choosing from two smaller sets and one larger set is that most results look "about the same", especially since there is usually one person in each family set who does the shopping for all members of that set. So I've been told that this year's run is a repeat of last year's run, when really, there's only a very small number of family-to-family pairings that can go on here (only one member of the Jim Beseda and John Beseda pools will not be assigned to the Baggs pool in any given year, for instance.)

More than you ever wanted to know about a simple script!

Previous:WikiUml