|Think about Loose Coupling|
Running a Perl Quiz Nightby eyepopslikeamosquito (Bishop)
|on Apr 25, 2007 at 13:02 UTC||Need Help??|
Last month Sydney.pm ran its first ever Perl quiz night. It was a lot of fun so I thought I'd share the experience here.
In addition to offering some tips on running your own Perl Monger quiz night, I present below the sets of questions used, along with the answers from each team, to allow you to have a go at the quiz yourself and see if you can beat any of the teams.
We'll be running more quiz nights in the future, so your feedback, especially suggestions on how to run a quiz night and your ideas for quiz questions, are most welcome.
A common problem we've had at our Perl Monger meetings is "breaking the ice", getting people talking and mixing, especially with shy new members. So I was hopeful that a quiz night would help here and I'm delighted to report that it did. We had a couple of newbies along and putting them in teams with some oldbies had everyone mixing, talking and having a lot of fun together discussing the questions. Tip No. 1: When choosing teams, try to split up friends/workmates and make teams of people with varying levels of Perl experience.
Of course, the pizza and beer helped a great deal, generously donated by adamk in response to Chris Williams, aka bingos, winning the The Sydney.pm Less-Than-A-Metre-Of-Beer Challenge, where adamk clarified an important prize condition: "I will force Sydney.pm to toast your name for every beer they open, all night". I can confirm that adamk did indeed enforce this condition and that every single beer opened on the night was accompanied by a loud and raucous "Cheers, Chris Williams!", even a hip-hip-hooray at one point ... which also helped to break the ice. Tip No. 2: Provide free food and refreshments (preferably beer).
I prepared seven sets of ten questions and kept a running score of each team on the whiteboard, with a small prize awarded to the winner of each round and a bigger prize for the overall winner. This took about two hours (about right for us) and proved exciting, with two teams tied for the lead going into the final round. Tip No. 3: Award a small prize after each round. Make sure everyone gets a prize.
After each round, I got each team to swap their answers with another team for marking. Then I wrote the round's answers on the whiteboard. This worked well, sparing me the bother of marking each team's questions -- and generating some teasing and banter between teams when easy questions were answered incorrectly. Tip No. 4: Get other teams to do the marking. Keep a running leaderboard.
I chose a mix of about half Perl and half non-Perl questions. This turned out to be a good balance: plenty of Perl for the hard-core mongers, with non-Perl questions to make it attractive to non-Perl attendees (family, friends, etc.). Tip No. 5: Have a mix of about half Perl questions, half non-Perl questions.
In addition to the seven sets of ten questions, I prepared a short list of "table questions", harder questions that the team could mull over during the night, especially during the breaks between rounds. This set of questions stayed on the table all night. Tip No. 6: Provide a set of "table questions".
Now to the questions. Though I enjoyed writing most of these myself based on my own personal bias/knowledge/experience, I got some great ideas from grantm's Wellington.pm quiz night and adapted some of the questions from there. Though we started with a round of ten Sydney.pm-specific questions, some of them relentlessly teased certain Sydney.pm members (who shall remain nameless), and are of little interest to a general audience, so I won't present them here. Below are the other six rounds of the contest, along with the answers from each of the teams -- and the "table questions". If you want to have a go yourself, simply answer each set while resisting the temptation to peek ahead at the answers. Enjoy!
Set 1: Perl Trivia
1. What was the release date of Perl 1.0?
2. Who voted against the formation of a separate comp.lang.perl newsgroup in 1989?
3. The L in Randal L Schwartz stands for:
4. Which Perl celebrity formally changed his/her name featuring a middle name of döt?
5. Who was the founder of Perl Mongers?
6. Who invented the JAPH?
7. Who was the primary pioneer of Perl Poetry?
8. Who founded the Perl Monks web site?
9. Perl is the name of a small town in which country?
10. Which movie featured a snippet of code from the Perl FAQ?
Set 1: Perl Trivia Answers
Set 2: Software
1. Which programming language was invented by Brian Kernighan, Alfred Aho and Peter Weinberger?
2. Which language was released first?
3. Which one of the following languages supports “list comprehensions” in the language core?
4. Three of the four languages below allow an assignment inside an expression, such as: x * (y = a + b). Which one of the following gives you a syntax error if you attempt this?
5. Three of the four languages below are happy to automatically convert a boolean to a number in an expression, such as: x * (a < b). Which one of the following gives you a type coercion error if you attempt this?
6. According to Linus Torvalds, Linux should be pronounced:
7. The B in Linus B Torvalds stands for:
8. Richard Stallman has stayed in which Sydney.pm member’s house?
9. Which company transferred ownership of Xenix (a System V compatible Unix for Personal Computers) to SCO in 1987?
10. Who wrote the following?
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. In the case of a well-known conversational programming language I have been told from various sides that as soon as a programming community is equipped with a terminal for it, a specific phenomenon occurs that even has a well-established name: it is called "the one-liners." It takes one of two different forms: one programmer places a one-line program on the desk of another and either he proudly tells what it does and adds the question, "Can you code this in less symbols?"---as if this were of any conceptual relevance!---or he just says, "Guess what it does!". From this observation we must conclude that this language as a tool is an open invitation for clever tricks; and while exactly this may be the explanation for some of its appeal, viz., to those who like to show how clever they are, I am sorry, but I must regard this as one of the most damning things that can be said about a programming language.
Set 2: Software Answers
Set 3: Perl Coding
1. What command line switch would you use to run a syntax check on a Perl source file?
2. Given an array @fred, you can access the last element with $fred[$#fred]. Write down a shorter expression that does the same thing.
3. Perl provides the hex() function to convert a hex string into a decimal integer. What built-in function would you use to convert the other way?
4. To push an element onto the end of an array, you use the Perl built-in push() function. What built-in function do you use to push an element onto the front of an array?
5. Rewrite this code:
more elegantly without using a for loop.
6. What does this Perl program print?
7. Given a file handle $fh, you can set auto flush on $fh via:
Using a Perl core module, write down a clearer way to do it.
8. In a regular expression:
uses capturing parens. Write this using non-capturing parens.
9. If instead you wanted pattern to be a positive look-ahead assertion, how would you write it?
10. Each file in the Perl C sources starts with an inspiring quote from which author?
Set 3: Perl Coding Answers
Set 4: Science
1. Which is the only planet with such a low average density that it would float on water?
2. What is the name of Pluto's moon?
3. In what year did Einstein publish his General Theory of Relativity?
4. Who discovered that the Universe is expanding?
5. Who coined the term "Big Bang"?
6. Who formulated the quantum mechanical "exclusion principle"?
7. Who launched the world's first liquid-fueled rocket?
8. Who invented dynamite?
9. What was the first audio recording successfully made and played back? (by Thomas Edison testing his phonograph)
10. Who invented the Hoover vacuum cleaner?
Set 4: Science Answers
Set 5: CPAN
1. In what year was the CPAN formed?
2. Who founded the CPAN?
3. When it was being founded, which of the following was NOT suggested as a possible name for the CPAN?
4. Who is the author of the CPAN DBI module?
5. Who is the author of the CPAN libwww Distribution?
6. Who is the author of the CPAN Compress::Zlib module?
7. Which one of these is NOT a real CPAN module?
8. Which one of these is a real CPAN module?
9. Which one of these is NOT maintained by a Sydney.pm member?
10. Who was the inventor of the CPAN Acme namespace?
Set 5: CPAN Answers
Set 6: Sport and Games
1. What was the first successful computer video game?
2. Which Russian Grandmaster succeeded Bobby Fischer as World Chess Champion?
3. Who has won the most "major" Golf championships?
4. Who has won the most "major" Tennis championships?
5. Who has won the most gold medals in swimming at a single Olympic games?
6. Who has scored the most double centuries in Test cricket?
7. Which city hosted the 1936 Summer Olympic Games?
8. Which team won the 2006 Soccer World Cup?
9. Which game did Paul Fenwick patch Perl sort to play when called in scalar context? (feature requested by Randal L Schwartz)
10. Who won the Christmas 2006 Fonality Perl Golf Challenge?
Set 6: Sport and Games Answers
Perl "Table" Questions
1. Write down as many three-character Perl built-in functions as you can.
2. Write down as many four-character Perl built-in functions as you can.
3. What is the longest Perl built-in function name?
4. Write down the titles of as many Perl books as you can.
5. What animal/s is on the front cover of these O'Reilly books:
6. Compiling the Parrot C sources pays tribute to two well-known Perl identities via creative use of gcc compiler switches. Who are the two identities and what compiler switches were used?
7. Write down the Perl Monks nicknames for:
Acknowledgements: I'd like to thank stennie of Sydney.pm for helping to organize the quiz night and being so patient with me, grantm of Wellington.pm for giving us the idea of running a quiz night and for generously sharing his experience and questions and adamk for the free beer. Oh, and Cheers Chris Williams! :-)
Update 26 Apr: Fixed a couple of typos in the answers and where I misspelt Williams as Winters.