back to qz Home Page

qz

Table of Contents

Introduction

qz is a flexible, general-purpose quiz program originally intended for use as a word study program for serious word game players. It is written entirely in Perl, and has been tested on Macintosh, Unix, DOS and Windows systems with versions 4 and 5 of Perl.

Useful features include:

To get started, please continue with the next section.

Getting Started

Here's what you have to do to get started with qz.
  1. Install a copy of Perl, if you don't already have one.
  2. Download a copy of qz.pl. You can rename it if you like, say to just qz.
  3. Download a copy of sample.qz. This sample qz file is set up to test you on the TWL96 words to be found in the top hundred (productive) seven-letter racks.
  4. Download a copy of notes.txt. This file contains commentary on the seven-letter racks that will be displayed after each correct answer.
  5. Run qz.pl:

Taking A Quiz

When you take a quiz, questions will be selected according to the program that you have chosen, and displayed on your screen. Here's an example:
[12] aeilnrs:
The number 12 tells you how many questions you have answered so far: this is the 12th. The rest of the line aeilnrs is the question that you are to answer: in the sample database, the correct answer is the list of TWL96 seven-letter words that can be made from these letters.

At this point, you can do one of several things:

If you enter a correct answer, you'll see a line like:
Correct.  (12 d:68-45)
This means that you got the right answer, the last time you did so was twelve days ago, and that the difficulty rating of this question has been downgraded from 68 to 45. On the other hand, if you get the answer wrong, you'll see something like:
The correct answer is 'aliners nailers renails'  (68-100)
This means that you did not answer correctly, and that the difficulty rating of this question has been raised to 100. In either case, if there's a note attached to the question, it will be displayed on the next line.

Using Multiple Files

New to version 2 of qz is the ability to work simultaneously with multiple quiz files. You can for instance keep your seven-letter words organized by frequency by hundreds, and then ask qz to pick randomly from the fifth, sixth and seventh sets, tossing in perhaps the occasional anamonic or word from a completely different list for a change.

In general, if you run qz and don't tell it what quiz files you want to use, it will use all the quiz files in the current folder (Classic Mac) or directory (OS/X or Unix or DOS). If there are sets of files that you often like to run together, you may like to keep them together in folders. If you want to have the same quiz file appear in different folders/directories, you can use aliases or symbolic links.

To explicitly choose which quiz files you want to run:

As of version 3.0.7 you can also specify folder/directory names (or drag folders) instead of files to quiz yourself on groups of quiz files contained in them.

Using Selection Programs

qz lets you decide how it chooses questions for you. At present, it has the following basic methods for choosing questions, which you can combine in different ratios to make a 'program':
oldest
Pick the question whose last correct answer was longest ago. Picking questions this way makes sure each question gets asked at least once in a while, no matter how easy it is.
hardest
Pick the question that has the highest difficulty rating. Picking questions this way helps you learn new information, so it's more useful when you're first beginning to work with a new set of questions.
random
Pick a question at random, with the chance that a question will be picked being proportional to its difficulty. This is good for reviewing questions, because it concentrates on the questions with which you've historically had trouble.
review
Pick the question which was answered incorrectly least recently in this session. Picking some of these gives you a chance to review your mistakes while they're fresh in your mind.
A 'program' is a name for a set of probabilities describing how often qz will choose which basic method. At present, the default program (jjc) picks the hardest question 30% of the time, the oldest 20%, a random one 40%, and a review question 10%. The programs named oldest, hardest and random each choose 100% according to their respective methods.

To choose a method:

Using Patterns

As of version 3.0.14, you can use regular expressions (or any other Perl syntax) to select questions from a set which match a certain pattern.

Use qz -m pattern to select only those questions whose question text matches the given pattern, or qz -M pattern to select only those questions whose answer text matches the given pattern. Here are some examples, written for the Unix command line. Quoting conventions may differ for other operating systems.

qz -m /q/ words.qz

Quiz the words in words.qz which contain a q.

qz -m '/[jqxz]/' words.qz

Quiz the words in words.qz which contain a j, q, x or z. The quotation marks are necessary to prevent Unix shells from trying to match files in the current directory against the pattern.

qz -m '/q/ && !/u/' words.qz

Quiz the words in words.qz which have a q but no u. This could also be written as qz -m '/^[^u]*q[^u]*$/' words.qz.

qz -M '/\bz/' words.qz

Quiz the words in words.qz which have at least one answer starting with a z. The regular expression element \b matches a word break, so it will catch a z at the beginning of any of the words in the answer.

qz -M '/ing\b/' words.qz

Quiz the words in words.qz which have at least one answer ending with ing.

qz -M '/ .* /' words.qz

Quiz the words in words.qz which have at least three anagrams. The words in the answer are separated by spaces, and this pattern searches for a space, followed by anything, followed by another space.

Version History

I'm still finding and fixing bugs in qz. If you see one or can think of a feature you'd like to see added, let me know. The change log is now in a separate file.