Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) 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?

  1. 12 March 1987
  2. 12 December 1987
  3. 18 December 1987
  4. 12 March 1988

2. Who voted against the formation of a separate comp.lang.perl newsgroup in 1989?

  1. Larry Wall
  2. Randal L Schwartz
  3. Tim Bunce
  4. Tom Christiansen

3. The L in Randal L Schwartz stands for:

  1. Larry
  2. Law-abiding
  3. Lee
  4. Leon
  5. Lothario
  6. Does not stand for anything

4. Which Perl celebrity formally changed his/her name featuring a middle name of döt?

  1. Adam Kennedy
  2. Audrey Tang
  3. Brian Ingerson
  4. Michael Schwern

5. Who was the founder of Perl Mongers?

  1. brian d foy
  2. Dave Cross
  3. Larry Wall
  4. Michael Schwern

6. Who invented the JAPH?

  1. Abigail
  2. Randal L Schwartz
  3. Sharon Hopkins
  4. Tom Christiansen

7. Who was the primary pioneer of Perl Poetry?

  1. Abigail
  2. Adam Kennedy
  3. Randal L Schwartz
  4. Sharon Hopkins
  5. Tom Christiansen

8. Who founded the Perl Monks web site?

  1. Abigail
  2. chromatic
  3. Tim Vroom
  4. Tye McQueen

9. Perl is the name of a small town in which country?

  1. Belgium
  2. France
  3. Germany
  4. Switzerland

10. Which movie featured a snippet of code from the Perl FAQ?

  1. Casino Royale (2006)
  2. The Lord of the Rings: The Two Towers (2002)
  3. The Matrix (1999)
  4. Sphere (1998)

Set 1: Perl Trivia Answers

AnswerTeam PonyTeam MooseSuper Happy Team
1CCCB
2BDDD
3CFCC
4CCCC
5AAAB
6BBBB
7DDDE
8CBCD
9CADA
10DDDC
Total10683

Set 2: Software

1. Which programming language was invented by Brian Kernighan, Alfred Aho and Peter Weinberger?

  1. awk
  2. C
  3. Lisp
  4. Occam

2. Which language was released first?

  1. Java
  2. PHP
  3. Python
  4. Ruby

3. Which one of the following languages supports “list comprehensions” in the language core?

  1. Perl
  2. PHP
  3. Python
  4. Ruby

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?

  1. Perl
  2. PHP
  3. Python
  4. Ruby

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?

  1. Perl
  2. PHP
  3. Python
  4. Ruby

6. According to Linus Torvalds, Linux should be pronounced:

  1. Lin - ux
  2. Lie - nux
  3. Lin - ooks
  4. Lie - nooks

7. The B in Linus B Torvalds stands for:

  1. Barry
  2. Benedict
  3. Bergland
  4. Bo

8. Richard Stallman has stayed in which Sydney.pm member’s house?

  1. Adam Kennedy
  2. Gavin Carr
  3. Stuart Cooper
  4. Tony Cook

9. Which company transferred ownership of Xenix (a System V compatible Unix for Personal Computers) to SCO in 1987?

  1. Altos
  2. AT&T
  3. Microsoft
  4. Sun

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.

  1. Donald Knuth
  2. Edsger Dijkstra
  3. Guido van Rossum
  4. Larry Wall

Set 2: Software Answers

AnswerTeam PonyTeam MooseSuper Happy Team
1AAAA
2CBCC
3CCCD
4CBBC
5DCCD
6AACC
7BBBC
8CCCC
9CCCC
10BCAA
Total10666

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:

my @sqrt_results; for my $result (@results) { push @sqrt_results, sqrt($result); }

more elegantly without using a for loop.

6. What does this Perl program print?

$x = 'BUZZ'; $x++; print $x;

7. Given a file handle $fh, you can set auto flush on $fh via:

select((select($fh), $|=1)[0]);

Using a Perl core module, write down a clearer way to do it.

8. In a regular expression:

(pattern)

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?

  1. C S Lewis
  2. James Joyce
  3. J R R Tolkien
  4. Walt Whitman

Set 3: Perl Coding Answers

AnswerTeam PonyTeam MooseSuper Happy Team
1-c-c-c-c
2$fred[-1]$fred[-1]$fred[-1]$fred[-1]
3sprintfsprintfpacksprintf
4unshiftunshiftunshiftunshift
5my @sqrt_results = map { sqrt $_ } @resultsdittodittoditto
6BVAABUZ0BVAABUZa
7use IO::Handle;$fh->autoflush()correctuse english;...correct
8(?:pattern)wrong(?:pattern)(?:pattern)
9(?=pattern)(?!.)(?*pattern)(?>pattern)
10CCAC
Total10768

Set 4: Science

1. Which is the only planet with such a low average density that it would float on water?

  1. Earth
  2. Jupiter
  3. Mars
  4. Saturn

2. What is the name of Pluto's moon?

  1. Charon
  2. Ganymede
  3. Miranda
  4. Triton

3. In what year did Einstein publish his General Theory of Relativity?

  1. 1905
  2. 1915
  3. 1919
  4. 1927

4. Who discovered that the Universe is expanding?

  1. Albert Einstein
  2. Sir Arthur Eddington
  3. Edwin Hubble
  4. Werner Heisenberg

5. Who coined the term "Big Bang"?

  1. Albert Einstein
  2. Fred Hoyle
  3. Roger Penrose
  4. Stephen Hawking
  5. Paris Hilton

6. Who formulated the quantum mechanical "exclusion principle"?

  1. Bohr
  2. Bose
  3. Fermi
  4. Pauli

7. Who launched the world's first liquid-fueled rocket?

  1. Chuck Yeager
  2. Robert H Goddard
  3. Thomas Edison
  4. Wernher von Braun

8. Who invented dynamite?

  1. Alfred Nobel
  2. Louis Pasteur
  3. Linus Pauling
  4. Marie Curie

9. What was the first audio recording successfully made and played back? (by Thomas Edison testing his phonograph)

  1. Baa baa black sheep
  2. Mary had a little lamb
  3. Testing, one, two, three
  4. Twinkle twinkle little star

10. Who invented the Hoover vacuum cleaner?

  1. Ives McGaffey
  2. James Dyson
  3. James Spangler
  4. J Edgar Hoover

Set 4: Science Answers

AnswerTeam PonyTeam MooseSuper Happy Team
1DDBD
2AAAA
3BADC
4CCCC
5BBCB
6DDAB
7BDDD
8AAAA
9BBBD
10CCDA
Total10845

Set 5: CPAN

1. In what year was the CPAN formed?

  1. 1992
  2. 1993
  3. 1994
  4. 1995

2. Who founded the CPAN?

  1. Adam Kennedy and Stephen Steneker
  2. Andreas Konig and Jarkko Hietaniemi
  3. Larry Wall and Randal Schwartz
  4. Jon Orwant and Tom Christiansen
  5. Gisle Aas and Malcolm Beattie

3. When it was being founded, which of the following was NOT suggested as a possible name for the CPAN?

  1. CRAP - Central Repository for All things Perl
  2. EYEKAP - Everything You Ever wanted to Know About Perl
  3. REEPH - Where one finds pearls
  4. PAR - Perl Archive Repository
  5. PARK - Perl Archive of Reusable Knowledge

4. Who is the author of the CPAN DBI module?

  1. Dave Rolsky
  2. Gisle Aas
  3. Rocco Caputo
  4. Tim Bunce

5. Who is the author of the CPAN libwww Distribution?

  1. Andy Lester
  2. Gisle Aas
  3. Lincoln Stein
  4. Sean Burke

6. Who is the author of the CPAN Compress::Zlib module?

  1. Brian Ingerson
  2. Jos Boumans
  3. Matt Sergeant
  4. Paul Marquess

7. Which one of these is NOT a real CPAN module?

  1. Chemistry::SQL
  2. HTML::Breadcrumbs
  3. POE::Cycle
  4. XML::Smart

8. Which one of these is a real CPAN module?

  1. Apache::Kangaroo
  2. DBD::MSAccess
  3. Lingua::EN::Fathom
  4. Net::Profit

9. Which one of these is NOT maintained by a Sydney.pm member?

  1. Acme::EyeDrops
  2. CGI::FormFactory
  3. Lingua::EN::Inflect
  4. Imager
  5. Text::Record::DeDuper

10. Who was the inventor of the CPAN Acme namespace?

  1. Adam Kennedy
  2. Damian Conway
  3. Elaine Ashton
  4. Leon Brocard

Set 5: CPAN Answers

AnswerTeam PonyTeam MooseSuper Happy Team
1DDDD
2BBBB
3DDBD
4DDDD
5BBBB
6DABD
7CACC
8C?CC
9CBBE
10BDBB
Total10579

Set 6: Sport and Games

1. What was the first successful computer video game?

  1. Asteroids
  2. Pong
  3. Space Invaders
  4. World of Warcraft

2. Which Russian Grandmaster succeeded Bobby Fischer as World Chess Champion?

  1. Karpov
  2. Kasparov
  3. Korchnoi
  4. Kramnik

3. Who has won the most "major" Golf championships?

  1. Arnold Palmer
  2. Ben Hogan
  3. Jack Nicklaus
  4. Tiger Woods

4. Who has won the most "major" Tennis championships?

  1. Bjorn Borg
  2. Pete Sampras
  3. Rod Laver
  4. Roger Federer

5. Who has won the most gold medals in swimming at a single Olympic games?

  1. Ian Thorpe
  2. Mark Spitz
  3. Michael Phelps
  4. Shane Gould

6. Who has scored the most double centuries in Test cricket?

  1. Brian Lara
  2. Don Bradman
  3. Ricky Ponting
  4. Sachin Tendulkar

7. Which city hosted the 1936 Summer Olympic Games?

  1. Athens
  2. Berlin
  3. Paris
  4. Stockholm

8. Which team won the 2006 Soccer World Cup?

  1. Brazil
  2. France
  3. Germany
  4. Italy

9. Which game did Paul Fenwick patch Perl sort to play when called in scalar context? (feature requested by Randal L Schwartz)

  1. Conway's "Game of Life"
  2. Nethack
  3. Spacewar
  4. World of Warcraft

10. Who won the Christmas 2006 Fonality Perl Golf Challenge?

  1. Abigail
  2. Adam Kennedy
  3. Eugene van der Pijll
  4. Ton Hospel

Set 6: Sport and Games Answers

AnswerTeam PonyTeam MooseSuper Happy Team
1BBBB
2AABA
3CCAC
4BBBB
5BBBA
6BCCA
7BBBB
8DDDD
9BBAA
10DACD
Total10857

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:

  • Programming Perl
  • Learning Perl
  • Perl Cookbook
  • Perl Best Practices
  • Perl & LWP
  • Perl Template Toolkit
  • Mastering Regular Expressions

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:

  • Randal L Schwartz
  • Larry Wall
  • Damian Conway
  • Andy Lester
  • Dave Cross
  • Jeff Pinyan
  • David Landgren
  • Steve Jenkins
  • Jacinta Richardson
  • Paul Fenwick
  • Leon Brocard
  • Philippe Bruhat
  • Dave Mitchell
  • Yuval Kogman
  • Dan Sugalski
  • Mark Jason Dominus
  • Chris Nandor
  • Audrey Tang
  • Stevan Little
  • Adam Kennedy
  • Stephen Steneker
  • Andrew Savige

References

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.


In reply to Running a Perl Quiz Night by eyepopslikeamosquito

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (7)
    As of 2014-07-30 07:15 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (229 votes), past polls