Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

keirsey test

2 views
Skip to first unread message

Bill Claussen

unread,
Jun 1, 1993, 12:17:15 PM6/1/93
to

This was posted sometime back, and I don't remember who posted it, but
I will re-post it because of all the replys I got.

You will have to compile it in c so it will probably not be for everyone.

Also, if everything works right (it did for me), when you run it, you
may give it a file name after you type keirsey, then all the output of
the test will go to that file.

Good luck
Bill

-------------------------------------------

/*
*
* Keirsey Temperament Sorter... actual code is at the end of the file.
* See startup message for information on obtaining the text
* that explains the results of this test.
*
* 0.0 changed output format, added precentages.
*
* 0.1 an argument supplied to the program will be used to open a file
* to write the output to.
*
* 0.2 small changes for running over the socket.
* needed some forced fflushes() for sockets.
*/

#include <stdio.h>


int e = 0;
int s = 0;
int t = 0;
int j = 0;
char r[20];

#define GETKEY (gets(r))[0] /* macro to get a key from user */
/* if you wanna use getc(har), you'll have */
/* to mess with the input mode on unix. */

/* the structure */

typedef struct _QUESTION
{
char *question; /* question text */
char *opt1; /* option a */
char *opt2; /* option b */
int *ptr; /* pointer to counter */
}

QUESTION;

/* questions data */


QUESTION Questions[] =
{
{ "",
"",
"",
NULL
},
{
"At a party do you",
"interact with many, including strangers",
"interact with a few, known to you",
&e
},
{
"Are you more",
"realistic than speculative",
"speculative than realistic",
&s
},
{
"Is it worse to",
"have your \"head in the clouds\"",
"be \"in a rut\"",
&s
},
{
"Are you more impressed by",
"principles",
"emotions",
&t
},
{
"Are you more drawn toward the",
"convincing",
"touching",
&t
},
{
"Do you prefer to work",
"to deadlines",
"just \"whenever\"",
&j
},
{
"Do you tend to choose",
"rather carefully",
"somewhat impulsively",
&j
},
{
"At parties do you",
"stay late, with increasing energy",
"leave early, with decreased energy",
&e
},
{
"Are you more attracted to",
"sensible people",
"imaginative people",
&s
},
{
"Are you more interested in",
"what is actual",
"what is possible",
&s
},
{
"In judging others are you more swayed by",
"laws than circumstances",
"circumstances than laws",
&t
},
{
"In approaching others is your inclination to be somewhat",
"objective",
"personal",
&t
},
{
"Are you more",
"punctual",
"leisurely",
&j
},
{
"Does it bother you more having things",
"incomplete",
"completed",
&j
},
{
"In your social groups do you",
"keep abreast of other's happenings",
"get behind on the news",
&e
},
{
"In doing ordinary things are you more likely to",
"do it the usual way",
"do it your own way",
&s
},
{
"Writers should",
"\"say what they mean and mean what they say\"",
"express things more by use of analogy",
&s
},
{
"Which appeals to you more",
"consistency of thought",
"harmonious human relationships",
&t
},
{
"Are you more comfortable in making",
"logical judgments",
"value judgments",
&t
},
{
"Do you want things",
"settled and decided",
"unsettled and undecided",
&j
},
{
"Would you say you are more",
"serious and determined",
"easy-going",
&j
},
{
"In phoning do you",
"rarely question that it will all be said",
"rehearse what you'll say",
&e
},
{
"Facts",
"\"speak for themselves\"",
"illustrate principles",
&s
},
{
"Are visionaries",
"somewhat annoying",
"rather fascinating",
&s
},
{
"Are you more often",
"a cool-headed person",
"a warm-hearted person",
&t
},
{
"Is it worse to be",
"unjust",
"merciless",
&t
},
{
"Should one usually let events occur",
"by careful selection and choice",
"randomly and by chance",
&j
},
{
"Do you feel better about",
"having purchased",
"having the option to buy",
&j
},
{
"In company do you",
"initiate conversation",
"wait to be approached",
&e
},
{
"Common sense is",
"rarely questionable",
"frequently questionable",
&s
},
{
"Children often do not",
"make themselves useful enough",
"exercise their fantasy enough",
&s
},
{
"In making decisions do you feel more comfortable with",
"standards",
"feelings",
&t
},
{
"Are you more",
"firm than gentle",
"gentle than firm",
&t
},
{
"Which is more admirable:",
"the ability to organize and be methodical",
"the ability to adapt and make do",
&j
},
{
"Do you put more value on the",
"definite",
"open-ended",
&j
},
{
"Does new and non-routine interaction with others",
"stimulate and energize you",
"tax your reserves",
&e
},
{
"Are you more frequently",
"a practical sort of person",
"a fanciful sort of person",
&s
},
{
"Are you more likely to",
"see how others are useful",
"see how others see",
&s
},
{
"Which is more satisfying:",
"to discuss an issue thoroughly",
"to arrive at agreement on an issue",
&t
},
{
"Which rules you more:",
"your head",
"your heart",
&t
},
{
"Are you more comfortable with work that is",
"contracted",
"done on a casual basis",
&j
},
{
"Do you tend to look for",
"the orderly",
"whatever turns up",
&j
},
{
"Do you prefer",
"many friends with brief contact",
"a few friends with more lengthy contact",
&e
},
{
"Do you go more by",
"facts",
"principles",
&s
},
{
"Are you more interested in",
"production and distribution",
"design and research",
&s
},
{
"Which is more of a compliment:",
"\"There is a very logical person.\"",
"\"There is a very sentimental person.\"",
&t
},
{
"Do you value in yourself more that you are",
"unwavering",
"devoted",
&t
},
{
"Do you more often prefer the",
"final and unalterable statement",
"tentative and preliminary statement",
&j
},
{
"Are you more comfortable",
"after a decision",
"before a decision",
&j
},
{
"Do you",
"speak easily and at length with strangers",
"find little to say to strangers",
&e
},
{
"Are you more likely to trust your",
"experience",
"hunch",
&s
},
{
"Do you feel",
"more practical than ingenious",
"more ingenious than practical",
&s
},
{
"Which person is more to be complimented: one of",
"clear reason",
"strong feeling",
&t
},
{
"Are you more inclined to be",
"fair-minded",
"sympathetic",
&t
},
{
"Is it preferable mostly to",
"make sure things are arranged",
"just let things happen",
&j
},
{
"In relationships should most things be",
"renegotiable",
"random and circumstantial",
&j
},
{
"When the phone rings do you",
"hasten to get to it first",
"hope someone else will answer",
&e
},
{
"Do you prize more in yourself",
"a strong sense of reality",
"a vivid imagination",
&s
},
{
"Are you drawn more to",
"fundamentals",
"overtones",
&s
},
{
"Which seems the greater error:",
"to be too passionate",
"to be too objective",
&t
},
{
"Do you see yourself as basically",
"hard-headed",
"soft-hearted",
&t
},
{
"Which situation appeals to you more",
"the structured and scheduled",
"the unstructured and unscheduled",
&j
},
{
"Are you a person that is more",
"routinized than whimsical",
"whimsical than routinized",
&j
},
{
"Are you more inclined to be",
"easy to approach",
"somewhat reserved",
&e
},
{
"In writings do you prefer",
"the more literal",
"the more figurative",
&s
},
{
"Is it harder for you to",
"identify with others",
"utilize others",
&s
},
{
"Which do you wish more for yourself:",
"clarity of reason",
"strength of compassion",
&t
},
{
"Which is the greater fault:",
"being indiscriminate",
"being critical",
&t
},
{
"Do you prefer the",
"planned event",
"unplanned event",
&j
},
{
"Do you tend to be more",
"deliberate than spontaneous",
"spontaneous than deliberate",
&j
},
{
"",
"",
"",
NULL
}

};


#ifndef True
#define True 1
#endif
#ifndef False
#define False 0
#endif


main (argc,argv)
int argc;
char *argv[];
{
int count = 1;
FILE *output = stdout;
int to_file = False;

if (argc > 1) {
printf("Opening file '%s' for output... ",argv[1]);
output = fopen(argv[1],"w");
if (!output) {
perror("Error");
return;
}
to_file = True;
printf("Ok!\n");
}

printf ("\
\nThe Keirsey Temperament Sorter\n\n\
_Please Understand Me_, David Keirsey and Marilyn Bates\n\
Distributed by Prometheus Nemesis Book Company\n\
Post Office Box 2748, Del Mar, Ca 92014\n");


printf ("At any prompt, type \"q\" to exit.\n\n");
printf ("\n\n\n\Press return to start...");
fflush(stdout);
GETKEY;

while (Questions[count].ptr != NULL)
{
reloop:
printf ("\n\n");
printf ("Question #%d\n\n", count);
printf ("Q: %s\n\n", Questions[count].question);
printf (" A) %s\n", Questions[count].opt1);
printf (" B) %s\n", Questions[count].opt2);
printf ("\n");
printf ("Enter A, B, or Q to quit: ");
fflush(stdout);
switch (GETKEY)
{
case 'a':
case 'A':
*(Questions[count].ptr) += 1;
count++;
break;
case 'b':
case 'B':
count++;
break;
case 'q':
case 'Q':
printf ("\n\nYou sure you want to quit? (type 'y' if so) ");
fflush(stdout);
/******/
switch (GETKEY)
{
case 'y':
case 'Y':
if (to_file) {
close(output);
unlink(argv[1]);
}
exit (0);
break;
default:
goto reloop;
break;
}
/*******/

break;
default:
printf ("Illegal input.\n");
fflush(stdout);
goto reloop;
break;
}
}

if (!to_file) fprintf(output,"\n\n\nYou scored as follows:\n");
else fprintf(output,"\n\n");

fprintf(output,"\
Extroverted (E): %2.2d%% Introverted (I): %2.2d%%\n\
Sensation (S): %2.2d%% Intuition (N): %2.2d%%\n\
Thinking (T): %2.2d%% Feeling (F): %2.2d%%\n\
Judging (J): %2.2d%% Perceiving (P): %2.2d%%\n\
",
e * 10, 100 - e * 10,
s * 5, 100 - s * 5,
t * 5, 100 - t * 5,
j * 5, 100 - j * 5
);

fprintf(output,"\n\nTherefore, %s personality type is ",
to_file ? "the" : "your");

if (e == 5)
fprintf(output,"X");
else if (e < 5)
fprintf(output,"I");
else
fprintf(output,"E");

if (s == 10)
fprintf(output,"X");
else if (s < 10)
fprintf(output,"N");
else
fprintf(output,"S");

if (t == 10)
fprintf(output,"X");
else if (t < 10)
fprintf(output,"F");
else
fprintf(output,"T");

if (j == 10)
fprintf(output,"X");
else if (j < 10)
fprintf(output,"P");
else
fprintf(output,"J");

fprintf(output,"\n\n");
if (to_file) {
printf("\n\nEnd of test.\nOutput to file '%s' completed.\n",argv[1]);
fclose(output);
}
fflush(stdout);
exit (0);

}

Jeff Humphrey [Jeffus]

unread,
Jun 1, 1993, 1:50:53 PM6/1/93
to
In article <1ufveb...@hp-col.col.hp.com> bi...@col.hp.com (Bill Claussen) writes:
>
>This was posted sometime back, and I don't remember who posted it, but
>I will re-post it because of all the replys I got.
>
>You will have to compile it in c so it will probably not be for everyone.
>
>Also, if everything works right (it did for me), when you run it, you
>may give it a file name after you type keirsey, then all the output of
>the test will go to that file.
>
>Good luck
>Bill

The X-Window'd version (xmbti.tar.Z) is still available at netcom.com
in the (/pub/noring/personality/type.info) directory [Thanks Jon].
Known to work in color/b-w on Sun3and4 workstations [unknown otherwise].
Probably wouldn't work with Solaris (?).

Enjoy ...

Jeff (XNTP)

--
_ ___ ___ _ _ ____
| | / _ \ / __| | | | ___| #include "standard.disclaimer" PGP Ready
| |__| |_| | |__| |_| |___ | hump...@hightop.nrl.navy.mil (703)960-1000
|____|\___/ \___|\___/|____| @Naval Research Labs (202)404-8241

Valentin Popescu

unread,
Jun 1, 1993, 8:59:58 PM6/1/93
to
In article <C7yE...@ra.nrl.navy.mil> hump...@hightop.nrl.navy.mil (Jeff Humphrey [Jeffus]) writes:
>In article <1ufveb...@hp-col.col.hp.com> bi...@col.hp.com (Bill Claussen) writes:
>>
>>This was posted sometime back, and I don't remember who posted it, but
>>I will re-post it because of all the replys I got.

I wrote that originally (my name is not on it, cuz after all.. umm.. I
believe it is an infringment of (C) to post it on the net, but whatta
heck. :)

We ran it here for a while connected to a socket.. so if we had
friends who wanted to take the test, we'd save them a lot of work by
just telling them "telnet to thismachine.etc.edu 9000 and answer the
questions".

Maybe someone who has more control over their own machine can provide
that service? And instead of posting and reposting testers and stuff,
we can just tell people to telnet to a certain machine/port and take
the test?

--
|
_________ -+-__ _________
\_____ / |/_ \ \ _____/ Internet: vpo...@calstatela.edu
\_____ \_____/ \____/ ____/ Bitnet: vpo...@csla.BITNET

0 new messages