Constructing a Purity Test

A purity test is an HTML form, with each question on the test set up as a checkbox. In order to allow anyone to make tests that can be processed by the Armory scorer, tests are self-contained; all parameters for the tests are passed as hidden fields. You can make a purity test either manually using the information here, or by using the automatic test generator. The test generator will also let you generate just an outline that you can enter questions into by direct editing.

Here is a template for a minimal purity test:

<TITLE>Title For Your Purity Test</TITLE>
<h2>Header For Your Purity Test<br>
Check all boxes for which your answer is "yes".<br>
The "submit" button is at the bottom.</h2>
<INPUT TYPE=hidden NAME=start>
<INPUT TYPE=hidden NAME=Name VALUE=[ShortName]>
<INPUT TYPE=hidden NAME=NumQuest VALUE=[Number of questions]>
<LI> <INPUT TYPE=checkbox NAME=q VALUE=1>First Question</li>
<LI> <INPUT TYPE=checkbox NAME=q VALUE=2>Second Question</li>

.... More questions, using the same format ...

<LI> <INPUT TYPE=checkbox NAME=q VALUE=[NumberOfQuestions]>Last Question</li>
<INPUT TYPE=submit Value="Submit your test for purity calculation">
<INPUT TYPE=reset Value="Reset all questions">
<INPUT TYPE=hidden NAME=end>

In order to use the above template, you must make the following changes (NOTE: In all cases, you replace the brackets ([]) as well as the value between them; the brackets should NOT appear in the final test document):

That's it. When you're done, everything in bold above should have been replaced. Try loading the purity test with your web browser, check some boxes, and submit it to see how it works. Even if you intend to make a fancier test, you should probably make a simple version using the above format first.

Explanation of obscure items

The purpose of some of the parameters in the template is not obvious.
The reason for the start and end hidden fields is to allow the scorer to know whether the form data has been truncated either by the web browser or in transport. Some web browsers don't deal well with the huge number of checkboxes that a large test can have and only post a fraction of the data, resulting in incorrect calculations. If the scorer sees a start field, then it also expects to see an end field. If it doesn't, it will return an error to the submittor. So, the start field should be near the top of the form, and the end field should be the very last in the form.
The reason for the integer values assigned to the checkbox fields is to allow the scorer to uniquely identify which checkboxes were selected. This allows the scoring system to compile a database of responses, and tell the submittor how their submission differs from the norm. If you want your test to be added to the database, send me mail with the URL for your test.

Enhancing Your Purity Test

Comment URL

Your test should include a commentURL field, pointing to the email address or comment page of the test's author. The scorer will include this in the page returned to the submittor. Example:
<INPUT TYPE=hidden NAME=commentURL VALUE="">

Name, Purity Domain, Domain Name, Degree, and inyou Parameters

If the longName field is given, it is used instead of the short name as the full title of the purity test in the scoring results returned to the submittor.
If the domain field is given, it is used instead of the short name as the adjective describing the type of purity being measured. It should fit into this sentence:
You are 99% [domain] pure
The domainName, degree, and inyou parameters exist to try to reduce the confusion inherent in the purity scoring. Many submittors take their purity to be the amount of foo (where foo is what the test is measuring) they have in them; that is, how purely foo they are, when in reality it is the inverse of that. Since the notion of purity used here is rooted in the original sex purity tests, the purity the scorer measures is proportional to the number of foo things the submittor has not done. By default, the scorer tries to make that clear by telling submittors that they are "x% [domain] pure ( (100-x)% [domain] corrupt)".
However, this has proven to be insufficient. Therefore, I have added some parameters to allow the meaning of the purity to be made more explicit.
If the domainName field is given, in addition to the [domain] pure/[domain] corrupt text, the scorer will tell them that they are x% pure in the [domainName] domain. If the domainName field is given, one of the degree and inyou parameters may also be given. If degree is given, the scorer will tell the submittor that their degree is (100-x)%. If the inyou parameter is given, the scorer will tell them that they have (100-x)% inyou in them.

<INPUT TYPE=hidden NAME=longName VALUE="Electrical Engineering">
<INPUT TYPE=hidden NAME=domain VALUE=ee>
<INPUT TYPE=hidden NAME=domainName VALUE=ee>
<INPUT TYPE=hidden NAME=inyou VALUE="electrical engineer">
<INPUT TYPE=hidden NAME=degree VALUE=strangeness>

Only one of degree and inyou should be given.

Numbering Parameters

The base field sets the number base (radix) that the VALUE of the checkbox fields will be interpreted in. It defaults to 10 (decimal). This field was originally added so that the question numbers of large tests could be given in hexadecimal to reduce the size of the form data submitted, since some browsers have problems submitting large amounts of form data. It has also come in handy in porting to the autoscorer format some "geek" and "hacker" tests that had question numbers given in binary or hex.
The origin field sets the "starting point" of the question numbers. It defaults to 1.

<INPUT TYPE=hidden NAME=base VALUE=16>
<INPUT TYPE=hidden NAME=origin VALUE=0>

Variable Question Values

The scorer accomodates tests in which some questions count for more than one point. The point value for each question defaults to 1, but can be set to any other non-negative integer value by giving that value as a second part to the checkbox value, separated from the question number by a comma.
Example (from the EE test):

<INPUT TYPE="checkbox" name=q value=10001,3>
10001  Have you ever laughed at a joke about transistors?
       (this question is worth 3 points)

If you use variable question values, you MUST use the maxscore hidden field to set the total number of points. For example, the EE test has 50 questions, but due to using variable question values it has a total of 72 points, set as follows:

<INPUT TYPE=hidden NAME=maxscore VALUE=72>

Scoring Guides

You can include in your test an automatic scoring guide, used to give the submittor a description of what "category" their purity level puts them in. The scoring guide is set up through multiple Map hidden fields. Each Map field includes a numeric value giving the high end of a point range, and a textual description of what the purity level is for anyone whose purity score falls into the range from the given value to the next lower value (or 0, if there is no lower value). In this usage, purity score refers to the number of purity points kept; that is, the sum of the point values for all of the questions that the submittor did not check.
The value comes first, then a colon, then the description. The values are interpreted as decimal by default. A leading 0 causes them to be interpreted in octal, and a leading 0x causes them to be interpreted in hexadecimal. Note that the values given are point values, not percentages, number of questions, etc. The highest-valued Map field should correspond to the total number of points on the test. You can include HTML code in the descriptions.
Here is an example, this time from the hacker test:

<INPUT TYPE=hidden NAME=Map VALUE=0x016:Wizard>
<INPUT TYPE=hidden NAME=Map VALUE=0x040:Guru>
<INPUT TYPE=hidden NAME=Map VALUE=0x080:Hacker>
<INPUT TYPE=hidden NAME=Map VALUE=0x0C0:Nerd>
<INPUT TYPE=hidden NAME=Map VALUE=0x100:Operator>
<INPUT TYPE=hidden NAME=Map VALUE=0x180:User>
<INPUT TYPE=hidden NAME=Map VALUE="0x200:Computer Illiterate">

If the values were given in decimal, this would be:

<INPUT TYPE=hidden NAME=Map VALUE=22:Wizard>
<INPUT TYPE=hidden NAME=Map VALUE=64:Guru>
<INPUT TYPE=hidden NAME=Map VALUE=128:Hacker>
<INPUT TYPE=hidden NAME=Map VALUE=192:Nerd>
<INPUT TYPE=hidden NAME=Map VALUE=256:Operator>
<INPUT TYPE=hidden NAME=Map VALUE=384:User>
<INPUT TYPE=hidden NAME=Map VALUE="512:Computer Illiterate">

In this example, anyone who keeps 385 through 512 purity points (that is, anyone who checked/answered yes to 0 through 127 of the questions) will be described as Computer Illiterate. Anyone who keeps 0 through 22 purity points will be described as a Wizard, etc.

Additional Notes

The format of the test does not affect the results. For example, you can use multilevel lists, ordered or unordered lists, or even preformatted text.

This web page © 1996 and maintained by John DuBois