Secret Santa Generator

Started by Charity, Mon 28/11/2011 03:46:13

Previous topic - Next topic

Charity

Hey everyone.  I whipped this up for my own family Christmas celebration this year and thought I would tidy it up and share it.


The Secret Santa Generator


The Secret Santa Generator is a simple, free application designed to generate a list of Secret Santas without revealing who is getting gifts for whom.  Think of it as drawing names from a hat.  Just input a list of everyone participating in your Secret Santa gift exchange, and the Secret Santa Generator will create a simple .txt file for each of the Santas, telling them who they are going to get gifts for.  This has a few key advantages over the age old hat drawing system:

* The Secret Santa Generator works without every participant having to be present for the drawing.  Are your friends and family scattered throughout the country or even the world?  Do busy schedules make it near impossible to get everyone in the same place at the same time?  Just use e-mail, instant messengers, or social networking services to send each of the Santas the .txt file with their name on it.  As long as you don't look in the files you won't know who is getting what for whom.  No need to involve an objective third party to draw names for you.  The corollary of course is that whoever is running the generator has to be someone who can be trusted not to peek.

* The Secret Santa Generator is faster.  When you draw from a hat, there is always the possibility that someone will draw their own name and then you will need to start the whole process over again.  However, the Secret Santa Generator can run up to 1000 drawings in a fraction of the time, and it will never let any Santa draw themselves.

* The Secret Santa Generator's special Rules feature allows you to control who can be a Santa for whom.  Don't want couples drawing each other?  Worried about personal grudges landing someone with a crappy gift?  Want to play favorites and rig things so you can get gifts for someone you really like?  You can do all these things by making Rules that tell the Secret Santa Generator not to allow certain people to be Santas for each other.  Use your own discretion.  This is of course another reason why running the generator is a responsibility best left to trustworthy individuals.


You can download the Secret Santa Generator at the  Game Page.  Note: Don't extract it to Program files or anywhere that requires special permissions to create or edit files, or the .txt generating function won't work.

Instructions are available in the ReadMe.

You can also get the source code here here.  Be warned, though: it is fairly simple, but there aren't many notes.

Enjoy the holidays.

Snake

Very awesome, Lyaer!

I would use this, although my oldest sister has a bit of Christmas OCD and always has this done around Easter ::)
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

Ponch

Neat. Thanks. When the Secret Santa thing kicks off this week at work, I'll have to give this a try.  :)

Charity

#3
Snake -  Thanks.  Well, it's good your people are on top of things, anyway!

Ponch - Awesome.  Let me know how it goes.


Also.
I'm 99.9% positive that the way I coded this means that any errors still present will not ruin Christmas (that is to say, I am quite certain that everyone always gets presents), but if anyone discovers otherwise through use of the program or by fiddling with the source code, I would greatly appreciate hearing about it.  These things are very important.

kconan

#4
Quote from: Lyaer on Mon 28/11/2011 11:29:03
...if anyone discovers otherwise through use of the program or by fiddling with the source code, I would greatly appreciate hearing about it.  These things are very important.

http://en.wikipedia.org/wiki/White_elephant_gift_exchange

You could add options for some of the secret santa variations.  

Charity

Interesting.

It wouldn't be difficult to add a function to number and scramble the Santa list, anonymously or otherwise, for purposes of a White Elephant.  Is anonymity of order actually important in White Elephant, though?  Since it doesn't matter who draws what number in a fair game of White Elephant, and since you don't need to know who you are shopping for in advance, the only advantage I see of using a program like this over a hat drawing is if a) the White Elephant is being played long distance (as it is easy to keep number drawing anonymous when people draw for themselves) AND b) you don't want people to know the order of turns (because otherwise even at long distance a participant with a dual role as a coordinator can easily draw numbers for every one else and just post the list).

Since it would be so simple to add such a feature, I wouldn't mind doing it, but I would like to know that people would actually use it.  Otherwise I might anyway for completeness sake, but it'll be a low priority.

SMF spam blocked by CleanTalk