It’s holiday time, and hopefully most of you programmers are home enjoying time with your family and loved ones. But if you’re like me, at some point over the holidays you will escape to your computer for a little diversion. So to keep you in the holiday spirit, here are some Christmas and Santa Claus-related goodies for computer programmers:
Count Down to Christmas on a Website
A Christmas countdown is a useful display for any web site and can be implemented easily, as this short and simple tutorial shows.
Create a Date-Aware Web Page
Christmas Cards Made Easy Using Mail Merge
The wife was stressing out because of the large number of Christmas cards to send this year. She usually handwrites the envelopes, but there are just too many now. I suggested cutting back, or using email, and was prompted put in my place.
So instead I suggested a mail merge, and while the wife is a competent Microsoft Office user, the Mythical Mail Merge is still out of reach. I don’t think I’ve met a non-programmer who has pulled it off. It’s a shame really, especially when it comes to envelopes.
So I developed a process to create and address hundreds of Christmas in about an hour using Shutterfly, Excel and Word Mail Merge.
Programming the 12 Days of Christmas in Java
This is what programmers do during the doldrums of Christmas holidays.
case 12: System.out.print(“twelve drummers drumming, “);
case 11: System.out.println(“eleven pipers piping, “);
case 10: System.out.print(“ten lords a-leaping, “);
case 9: System.out.print(“nine ladies dancing, “);
case 8: System.out.println(“eight maids a-milking, “);
case 7: System.out.print(“seven swans a-swimming, “);
case 6: System.out.print(“six geese a-laying, “);
case 5: System.out.println(“five gold rings,”);
case 4: System.out.print(“four calling birds, “);
case 3: System.out.print(“three french hens, “);
case 2: System.out.print(“two turtle dovesnand “);
case 1: System.out.println(“a partridge in a pear tree.”);
Computer-Controlled Christmas Lights
Be witness to over 200,000 animated Christmas lights connected to over 5-1/2 miles of extension cord. This is their third year using computer control. Every year brings more lights and new surprises.
The Santa Claus Computer Science Problem
We consider the following problem: Santa Claus has n presents that he wants to distribute among m kids. Each kid has an arbitrary value for each present. Let pij be the value that kid i has for present j. Santa’s goal is to distribute presents in such a way that the least lucky kid is as happy as possible, i.e. Santa tries to maximize mini=1,…,m sumj ∈ Si pij where Si is a set of presents received by the i-th kid.
Read more at Annual ACM Symposium on Theory of Computing
Santa Claus Methodologies
By Gail Ollis: I don’t believe in programming methodologies. In this session I will explain why I became a cynic (or realist, depending on your point of view) about methodologies, and how that has been much more constructive than it sounds. Santa Claus takes a title role to help demonstrate that it’s not always necessary to believe in something to make good use of the stories that surround it. Ultimately, this session is really all about problem solving: adopting ideas that fit, setting aside the remainder, and knowing the difference.
Santa Claus Joke
Every computer programmer starts out by being optimistic. Optimistic programmers assume that system calls will always succeed, there is always enough memory and disk space, and there really is a Santa Claus.
Santa Claus is Hacking to Town
Here is a Santa Claus titled “Santa Claus is Hacking to Town.” This is adapted from the classic 1970 Rankin & Bass television production, which used stop-motion animation and nifty puppets to tell the story of Kris Kringle. As a child, this was one of my favorite Christmas TV specials, and I’m thrilled to recast it as an ethical hacking challenge. You don’t need to be familiar with the original TV show to participate in the challenge, of course. Analyze the clues, devise your strategy, and carefully answer the questions to win a prize.
Santa Claus Statistics
Santa Claus has 31 hours of Christmas to deliver gifts, thanks to the different time zones and rotation of the Earth. This works out to 822 visits per second. This means Santa has 1/1000th of a second to park his sleigh, jump down the chimney, fill the stockings, place presents under the tree, eat the cookies and milk left for him, climb back up the chimney, get into the sleigh, and fly to the next house.
To keep this pace, Santa’s sleigh must move at 650 miles per second or 3,000 times the speed of sound. Note that a conventional reindeer can run at a top speed of 15 miles per hour.
Read more amazing Santa Statistics
The ASCII Grinch
-=[ Grinch ]=- 12/98 __ .' '-. / '. / / | / | | / ( / '. )'. .'```--'`'-.__.-" / ` / | | | '. / ) )_.' /'--""-...-'-.__/ '-/ , ;_ )`-. .( ."`` ` | ` / | ; ; _| | _| '-. | '.(_/ (_/ | __ | ; `'.__.- (._.) ._. / ) | /` `'. '. ( / ; '. `'-'-._` _.' / `. '-' / |`-. _.' _| `. '--;` _.-""` `"=. .-._| / ` `-""-. ) `;-.__.--._ ._ .' / `""` `--` /
The 12 Bugs of Christmas
For the twelfth bug of Christmas, my manager said to me:
“Tell them it’s a feature,
Say it’s not supported,
Change the documentation,
Blame it on the hardware,
Find a way around it,
Say they need an upgrade,
Reinstall the software,
Ask for a dump,
Run with the debugger,
Try to reproduce it,
Ask then how they did it and
See if they can do it again.”
A Programmer’s Christmas
‘Twas the night before Christmas, and all through the shop,
The computers were whirring; they never do stop.
The power was on and the temperature right,
In hopes that the input would feed back that night.
The system was ready, the program was coded,
And memory drums had been carefully loaded;
While adding a Christmasy glow to the scene,
The lights on the console, flashed red, white and green.
‘Twas the Night Before Implementation
‘Twas the nite before implementation and all through the house,
Not a program was working, not even a browse.
The programmers hung by their tubes in despair,
With hopes that a miracle soon would be there.
The users were nestled all snug in their beds,
While visions of inquiries danced in their heads.
When out in the machine room there arose such a clatter,
I sprang from my desk to see what was the matter.
And what to my wondering eyes should appear,
But a super programmer (with a six-pack of root beer).
Article published on December 24, 2008
|If you like this article, please share it:|