topics that matter; ideas worth sharing

share a tip, submit a link, add something new

Programming the Geek Bowl

March 20, 2001, 03:55 PM —  LinuxWorld.com — 



I have the privilege of hosting the first annual Geek Bowl
at LinuxWorld Expo in San Jose, Calif. We have a brilliant panel of
stars lined up: Jeremy Allison, Larry Augustin, Bodo Bauer,
Scott Draeker, Jon "maddog" Hall, Miguel de Icaza, Robert
LeBlanc, Ransom Love, Bruce Perens, Eric Raymond, Jay
Sulzberger, and Bob Young. We're going to test their wits
against a wide variety of trivia questions. It should be a
real hoot, so I hope you'll make every effort to attend Tuesday, Aug. 15, from 2:30 to 3:30 p.m.



I took it upon myself to write the quiz show software that
presents the questions and keeps score. (In case you're
wondering, I will release the source code under the
GNU General Public License if only to give my critics a look at how much my coding skills have degenerated over the years.)



There were a number of problems I had to solve in order to
write the program. Most programmers would consider
them elementary challenges, but I'm so far out of practice that
it's a 3,000-mile trip just to get back into the same country.



During the Geek Bowl, questions and answers may be represented as text or as pictures to identify. The problem is that a quiz show's progress is unpredictable. There are four categories of questions: easy, moderate,
hard, and bizarre, each with its own point value. There are three
rounds to the show. During the first round, questions will
have low point values. The values go up in round two. And
the final round consists of a single difficult question
that has a high point value.



In order to satisfy the above requirements, the program
reads from five text files filled with questions and
answers, one file each for the easy, moderate, hard, bizarre and
final categories. Some of the questions and answers simply
point to a graphics file, which my program loads and
displays on demand.



There is no way to know what categories the contestants
will pick and in what order. I didn't want to predetermine
the number of questions per round because, without knowing what the pace of the show will be like, I might make the show too long or too
short. So I have to load up the questions so that I
(hopefully) won't run out for any category. And I made it
easy to jump between rounds whenever it seems appropriate.



During the pressure of the live event, I'm bound to hit the
wrong key now and then. So I assigned accelerator keys that
are hard to hit by accident. I also tried to write the
program to make it impossible to commit show-stopping
errors like bringing up an answer from the hard category
after someone rings in for an easy question. I also made sure
the program will keep track of the game's progress to

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

More Resources