KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Belief


1 /**
2  * Computer-generated religion is not new -- we've been using it
3  * to help us develop our beliefs for years. For example:
4  * <P>
5  * The Eastern Sikh Faith believes that the Satanic Verses was
6  * written by Walt Disney, and argues that Man will yield to
7  * the Last Trump.
8  * <P>
9  * The Sunni Taoist Church denies that the Koran contains a
10  * direct reference to Mumon, and argues that we should beware
11  * Nirvana.
12  * <P>
13  * The Southern Sub-Genious Affiliation for Aliens suspects
14  * that the Sargent Pepper album proves the divine origins of
15  * David Scott, and explains that man will succeed in avoiding
16  * New Coke.
17  * <P>
18  * To generate YOUR own belief, choose one from each section below
19  *(in best buzzword generator style):
20  */

21
22 public class Belief {
23
24     public static final int COLUMNS_PER_LINE = 79;
25
26 /* null after a group, two null at end of list */
27     public static final String JavaDoc[] LIST = {
28 "The",
29 null,
30
31 "Arian",
32 "Athanasian",
33 "Roman",
34 "Sunni",
35 "Presbyterian",
36 "United Reformed",
37 "Unitarian",
38 "Anglican",
39 "Jehovah's",
40 "Jewish",
41 "Fundamentalist",
42 "Shiite",
43 "Hari",
44 "Shinto",
45 "Zoroastrian",
46 "Christian",
47 "Salvation",
48 "Seventh Day",
49 "Saphardic",
50 "Zen",
51 "Hebraic",
52 "Palestinian",
53 "Galilean",
54 "New Age",
55 "Reformed",
56 "Orthodox",
57 "Southern",
58 "Northern",
59 "Eastern",
60 "Western",
61 "Universal",
62
63 /* MCA */
64 "Bavarian",
65 "Allied",
66 "Brotherhood of the",
67 "Greek",
68 "Golden",
69 "Silver",
70 "Hindu",
71 "Ancient",
72 "Illuminated",
73 "Renown",
74 "Mongol",
75 "Hermetic",
76 "Rockin'",
77 "Aztec",
78 "True",
79 "Asian",
80 "Zombie",
81 "Converted",
82 "Gidean",
83 "American",
84 "New",
85 "Alien",
86 "Rhode Island",
87 "Alaskan",
88 "New York",
89 "Native American",
90 "Young",
91 "",
92 null,
93
94 "Catholic",
95 "Baptist",
96 "Protestant",
97 "Muslim",
98 "Moonie",
99 "Mormon",
100 "Witnesses",
101 "Sikh",
102 "Buddhist",
103 "Krishna",
104 "Methodist",
105 "Fire-worshipper",
106 "Parsee",
107 "Theosophist",
108 "Adventist",
109 "Confucianist",
110 "Shamanist",
111 "Taoist",
112 "Atheist",
113 "Rosicrusian",
114 "Sub-Genius",
115 "Episcopalian",
116 "Secular Humanist",
117 "Revisionist",
118 "Masonic",
119 "Shriner",
120 "Pentecostal",
121 "Charismatic",
122 "Thetan",
123 "Odd Fellow",
124 "PreClear",
125 "Satanic",
126 "Twelve Step",
127 "Druid",
128 "Lutheran",
129 "Four Square",
130 "Bible Thumpers",
131 "Flat-Earth",
132 "Whole-Earth",
133
134 /* MCA */
135 "Paved-Earth",
136 "Star",
137 "Generation X",
138 "Christian",
139 "Thelemite",
140 "Liberation",
141 "John Birch",
142 "Elder Thing",
143 "Trekker's",
144 "Illuminati",
145 "Science",
146 "Discoridan",
147 "Baccus",
148 "Republican",
149 "Democratic",
150 "Libertarian",
151 "Communist",
152 "Socialist",
153 null,
154
155 "Church",
156 "Faith",
157 "Sect",
158 "Heresy",
159 "Liberation Front",
160 "Elder Council",
161 "Lodge",
162 "Society",
163 "Temple",
164 "Army",
165 "Congregation",
166 "Sunday School",
167 "Cult",
168 "Fellowship",
169
170 /* MCA */
171 "Scientists",
172 "Revolution",
173 "Foundation",
174 "Order",
175 "Militia",
176 "Fan Club",
177 "Affiliation",
178 "Movement",
179 null,
180
181 /* MCA */
182 "for a Better Tomorrow",
183 "for a Better Today",
184 "of Latter Day Saints",
185 "for a Better Yesterday",
186 "for Women",
187 "for Men",
188 "for Aliens",
189 "for Lesbians",
190 "for Gay Men",
191 "for Bisexuals",
192 "from Tulsa, Oklahoma,",
193 "of Ohio",
194 "from Wisconson",
195 "of Mexico",
196 "for Eunics",
197 "of Germany",
198 "of Russia",
199 "for a Unified Europe",
200 "",
201 "",
202 "",
203 "",
204 "",
205 "",
206 "",
207 "",
208 "",
209 "",
210 "",
211 "",
212 "",
213 "",
214 "",
215 "",
216 "",
217 "",
218 null,
219
220 "believes that",
221 "denies that",
222 "is strongly divided over whether",
223 "rejects the notion that",
224 "posits that",
225 "preaches that",
226 "insists that",
227 "professes that",
228 "proclaims that",
229 "suspects that",
230 "theorises that",
231 "concludes that",
232 "announces that",
233 "refutes that",
234 "is confused over whether",
235 "agrees that",
236 null,
237
238 "the Bible",
239 "the Koran",
240 "the Magna Carta",
241 "the Kama Sutra",
242 "the Bagavad Gita",
243 "the Talmud",
244 "the Torah",
245 "the Satanic Verses",
246 "the Mosaic Law",
247 "the book of Revelation",
248 "the collection of predictions of Nostradamus",
249 "every Norse saga",
250 "the new, controversial eleventh Commandment",
251 "the Apocrypha",
252 "the Sargent Pepper album",
253 "the Athanasian creed",
254 "the Rosetta Stone",
255 "chapter thirteen of Dianetics",
256 "a transcript of the very first Ramtha channeling",
257 "The Writ of Common Wisdom",
258 "a certain part of \"The Last Temptation of Christ\"",
259 "\"The Prophet\", by Kahlil Gibran,",
260 "\"The Profit\", by Kehlog Albran,",
261 "a secret document hidden in Fawn Hall's underwear",
262 "one of the lesser known Dead Sea Scrolls",
263 "Marquis de Sade's \"Bedroom Etiquette\"",
264 "a cryptic notation on the back of the bar tab from the Last Supper",
265 "Darwin's \"Origin of Species\"",
266 "a particularly crude example of poetry from the men's room wall",
267 "Elvis's Will",
268 "The Pentagon Papers",
269 "Shirley McLaine's \"Out on a Limb\"",
270 "an inscription found on the basement wall in the Temple of Karnak",
271 "\"The Life of Brian\"",
272 "a certain scrap of MVS source code from 1971",
273 "an IBM punch card found on the machine room floor in 1978",
274 "the private diary of Marcia Brady",
275 "the Book of Mormon (with introduction by Charlton Heston),",
276 "grafitti once found on the A-train to Far Rockaway in 1969",
277 "a certain limerick containing a reference to \"Nantucket\"",
278 "Randy Travis' Copenhagen ring",
279 "a mysterious pattern of cat box scratchings",
280 "\"The Yosemite\" by John Muir",
281 "\"No Bad Dogs\", by Barbara Woodhouse",
282 "\"Atlas Shrugged\", by Ayn Rand",
283 "a certain cryptic coding construct of Richard Stallman",
284 "Cher's secret tattoo",
285 "the bumps on the skull of Thomas \"Tip\" O'Neill (if interpreted as braille)",
286 "a particularly obscure pattern of crop circles",
287 "scene II, act V of \"The Search for Spock\"",
288 "a forgotten screenplay by Sidney Sheldon",
289 "the pattern of crows feet around Nancy Reagan's eyes (as interpreted by her astrologist),",
290 "a certain old \"Leave it to Beaver\" script",
291 "Nancy Reagan's \"My Turn\"",
292
293 /* MCA */
294 "Windows '95 document files",
295 "the Necronomicon",
296 "the Principia Discordia",
297 "The Egyptian Book of the Dead",
298 "The Tibetan Book of the Dead",
299 "MS-DOS 3.3 user's guide",
300 "Bill Gate's income tax form",
301 "OS/2's original source code",
302 "a never used function in Word",
303 "a large lump of Spam, moulded in the form of Elvis",
304 "\"Common Sense\" by Adam Smith",
305 "the script to \"Pulp Fiction\"",
306 "Frank Herbert's last, unpublished \"Dune\" novel",
307 "Aleister Crowley's \"The Book of the Law\"",
308 "the pimples on Ronald Reagan's ass (if interpreted as braille)",
309 "\"The Joy of Lesbian Sex\", chapter six",
310 "that greasy stuff Spam is canned with",
311 "Gram Hill's odd birthmark",
312 "the scripts to all of Elvis' movies",
313 "Einstein's tupee",
314 "an old stop sign shot by a buckshot shotgun (if interpreted as braille)",
315 "\"How to Win Friends and Influence People\"",
316 "The Gospel According to Bob",
317 "an abandoned and neglected Mac Classic",
318 "all the world's Giddian Bibles",
319 "a certain Sunday edition of The Family Circus",
320 "the Constitution of the Iriqois Nations",
321 "The Mr. Bill Show",
322 "Gene Simon's chest hair",
323 "the stained blue dress",
324 null,
325
326 /* MCA */
327 ", if read backwards,",
328 ", if held up to strong light,",
329 ", when pasted together in the correct order,",
330 ", when translated from the original Turkish,",
331 ", when played backwards,",
332 ", if rearranged via the I Ching,",
333 ", if spat upon by thousands of green yaks,",
334 ", if decrypted using Jesus's original PGP public key,",
335 ", in reality,",
336 ", if cut apart then reassembled in a certain order,",
337 ", if spoken by James Earl Jones,",
338 ", when arranged in a specific order,",
339 "",
340 "",
341 "",
342 "",
343 "",
344 "",
345 "",
346 "",
347 "",
348 "",
349 "",
350 "",
351 "",
352 "",
353 null,
354
355 "predicts the eventual supremacy of",
356 "contains a direct reference to",
357 "has been misunderstood by",
358 "proclaims the divinity of",
359 "can be read as denouncing the divinity of",
360 "is an insult to",
361 "is a heretical misinterpretation of scripture by",
362 "was inspired by",
363 "denies the existence of",
364 "contains coded messages from the Inner Child of",
365 "was dictated by",
366 "encodes the personal opinions of",
367 "can be deduced from the writings of",
368 "implies the divinity of",
369 "justifies worshipping the sandals of",
370 "explains the holy writings of",
371 "can be interpreted as the memoirs of",
372 "reveals cryptic messages from",
373 "reveals a message from",
374 "follows the teachings of",
375
376 /* MCA */
377 "was comprehended by",
378 "divines a New Testament by",
379 "was revealed by",
380 "was divined to",
381 "sheds new light into the life of",
382 "proves the divine origins of",
383 "predicts the divine birth of",
384 "proclaims the Word of",
385 "suggests the divinity of",
386 "justifies the worshiping of",
387 "conceals the teachings of",
388 null,
389
390 "Salman Rushdie,",
391 "the Ayatollah,",
392 "Thomas Aquinas,",
393 "Billy Graham,",
394 "J. Z. Knight,",
395 "Elijah,",
396 "Elvis,",
397 "Elvis Costello,",
398 "Elvira, Mistress of the Dark,",
399 "Jesus' little known brother Tony,",
400 "the Reverend Al Sharpton,",
401 "Louisiana State Senator Merle Jacobs,",
402 "John Lennon,",
403 "Buddy Holly,",
404 "Andrew Lloyd Weber,",
405 "a certain bombastic revivalist preacher,",
406 "the creature from the Black Lagoon,",
407 "a particular White-Supremacist from Hayden Lake,",
408 "Jerry Lee Lewis,",
409 "a twelve year old stigmatic from Lubbock, Texas,",
410 "Zeus,",
411 "King Tut,",
412 "Ernest Hemingway,",
413 "Mariel Hemingway,",
414 "Ernest Borgnine,",
415 "Ernest P. Worrell,",
416 "Ernest P. Worrell's love-child,",
417 "\"Jake the Snake\",",
418 "Ann Landers,",
419 "Bess Truman,",
420 "a fire-and-brimstone street preacher from Provo,",
421 "the last living Baghwan Shree-Rajneesh loyalist,",
422 "a certain white-shoed car salesman,",
423 "Crazy Eddie,",
424 "Howard Stern,",
425 "a certain Australian footballer named Bubba,",
426 "Father Guido Sarducci,",
427 "the last practicing medicine man of the Mohicans,",
428 "James Randi,",
429 "Our Lady of the White Go-Go Boot,",
430 "Verleen, The patron saint of Big Hair,",
431 "Helga, the patron saint of Unseasoned Food,",
432 "Randy, the patron saint of Big Pickup Trucks,",
433 "Maxine, the patron saint of Press-on Nails,",
434 "Tina, the patron saint of Polyester Stretch Pants,",
435 "Boopsie, the patron saint of Large Dangly Earrings,",
436 "Mahomet,",
437 "Walt Disney,",
438 "Ezekiel,",
439 "Dan Quayle,",
440 "Murphy Brown,",
441 "George Bush,",
442 "Oliver North,",
443 "Thomas Merton",
444 "Leo Buscaglia,",
445 "Marilyn Quayle,",
446 "Ernest Angsley,",
447 "Odin and Thor,",
448 "Adolf Hitler,",
449 "Linus Pauling,",
450 "Pope John-Paul II,",
451 "Bishop Spong,",
452 "Mumon,",
453 "Martin Scorcese,",
454 "Bill Gates,",
455 "Abraham Lincoln",
456 "Daryl Gates,",
457 "Robert Gates,",
458 "Robert DeNiro",
459 "the Mormon Tabernacle Choir,",
460 "Jim Bakker,",
461 "Tammy-Faye Bakker,",
462 "Jimmy Swaggart,",
463 "Susanne Somers,",
464 "Richard Simmons,",
465 "Richard Lewis,",
466 "Cardinal Richelieu,",
467 "Charles Manson,",
468 "James Taylor,",
469 "Tipper Gore,",
470 "Hillary Clinton,",
471 "Dolly Parton,",
472 "Jerry Falwell,",
473 "Robert Bly,",
474 "Joseph Campbell,",
475 "Zig Zeigler,",
476 "L. Ron Hubbard,",
477 "Captain Al Hubbard,",
478 "Jesse Helms,",
479 "Jesse Jackson,",
480 "Jimi Hendrix,",
481 "The Juice Man (tm),",
482 "Clarence Thomas,",
483 "Long Dong Silver,",
484 "a certain paunchy, ex-Chippendale dancer,",
485 "the shadowy leader of a certain gang of biker nuns,",
486 "a spaced out, pot smoking crystal worshipper,",
487 "a certain swarthy wild-eyed, Eastern European anarchist,",
488 "a certain middle-aged bag lady with a personality disorder,",
489 "a certain pornography-addicted TV preacher,",
490 "a certain washed up TV actor that's now doing infomercials on cable,",
491 "a certain philandering, saxophone-playing Southern Governor,",
492 "a certain flamboyant, gender-bending rock star,",
493 "a certain female talk show pop-psychologist,",
494 "a certain truck stop waitress from Cocolalla, Idaho,",
495 "a certain small town sheriff from North Carolina,",
496 "an avowed heterosexual female tennis player,",
497 "a certain absent-minded, father figure ex-President,",
498 "a certain blonde, pointy-bra wearing pop singer,",
499 "David Duke,",
500 "Robert Mapplethorpe,",
501 "Wilheim Reich,",
502 "Kreskin,",
503 "Mahatma Gandhi,",
504 "Abbie Hoffman,",
505 "Timothy Leary,",
506 "Jack Kerouac,",
507 "Allen Ginsberg",
508 "Paul Krassner,",
509 "Marlin Fitzwater,",
510 "Ken Kesey,",
511 "Helen Gurley Brown,",
512 "Tina Brown,",
513 "David Geffen,",
514 "Howard Cosell,",
515 "Cy Sperling,",
516 "Andy Warhol,",
517 "Ferdie \"The Fight Doctor\" Pacheco,",
518 "Madonna,",
519 "The Beatles,",
520
521 /* MCA */
522 "Anton S. LeVay,",
523 "Gautama Buddha,",
524 "Kali, destroyer of worlds,",
525 "Ed Wood,",
526 "David Koresh,",
527 "Aleister Crowley,",
528 "Les Claypool,",
529 "Ben Hur,",
530 "Michael Eisner,",
531 "Erwin Schrodinger,",
532 "William S. Burrows,",
533 "H. P. Lovecraft,",
534 "a gigantic, shiny, red button,",
535 "Frank Zappa,",
536 "the aliens from Alpha Centauri IV,",
537 "Alice Cooper's snake,",
538 "Terrence McKinna,",
539 "Great Cthulu,",
540 "Eris Discordia,",
541 "David Scott,",
542 "Robert Anton Wilson,",
543 "J. R. \"Bob\" Dobbs,",
544 "the face on Mars,",
545 "Adam Wiesaupt,",
546 "William Shatner,",
547 "SUPERMONSTER GAMARA,",
548 "Andrew \"Dice\" Clay,",
549 "Dr. Van Van Mojo,",
550 "John Miller,",
551 "Peyote Woman,",
552 "Yog S'thoth,",
553 "Monica Luinsky,",
554 "Stanley Kubrick,",
555 "Pac-Man,",
556 "George Washington",
557 "The Amazing Randy",
558 null,
559
560 "and",
561 "but",
562 "yet",
563 "and likewise",
564 null,
565
566 "says",
567 "explains",
568 "claims",
569 "believes",
570 "argues",
571 "insists",
572 "refutes",
573 "denies",
574 "professes",
575 "preaches",
576 "suggests",
577 null,
578
579 "that",
580 "that soon",
581 "that after the second coming of Christ",
582 "that ultimately",
583 "that inevitably",
584 "that if we are true and faithful servants,",
585 null,
586
587 "we should strive for",
588 "the world will end with",
589 "we should beware",
590 "we shall see",
591 "the ungodly are about to experience",
592 "only the faithful will achieve",
593 "the chosen people will soon experience",
594 "men will yield to",
595 "women will yield to",
596 "mankind will yield to",
597 "man will succeed in avoiding",
598 "woman will succeed in avoiding",
599 "mankind will succeed in avoiding",
600 "the Seventh Sign will be avoided by",
601 "only the born-again will actually enjoy",
602 "only the chosen people will experience",
603 "the chosen people will be spared by",
604
605 /* MCA */
606 "the doom of humanity shall be",
607 "the fall of humanity shall be",
608 "the world shall be consumed by",
609 "a rebirth of spiritualism will come about through",
610 null,
611
612 "reincarnation.",
613 "Judgement Day.",
614 "the Apocalypse.",
615 "\"Apocalypse Now\".",
616 "Oral Robert's prayer tower.",
617 "nirvana.",
618 "Nirvana (the band).",
619 "Mount Olympus.",
620 "martyrdom.",
621 "the Second Coming.",
622 "the Second Cuming.",
623 "the sound of one hand clapping.",
624 "birth control.",
625 "better living through chemistry.",
626 "human sacrifices.",
627 "cherry pie and damn fine coffee.",
628 "damnation.",
629 "Papal Infallability.",
630 "enlightenment.",
631 "the \"666\" mysteriously found tattooed on your head.",
632 "pinball heaven.",
633 "phallic idoltry.",
634 "pubic hair on your Coke.",
635 "a guilt-free afterlife.",
636 "guilt-free sex.",
637 "guilt-free bingo.",
638 "government, by the people, and for the people.",
639 "remorse for their crimes.",
640 "\"Crimes Against Nature\" (at least in some Southern states).",
641 "the Turin Shroud.",
642 "purgatory.",
643 "premarital sex.",
644 "a feeling of oneness with nature.",
645 "that oh-so-fresh feeling.",
646 "that not-so-fresh feeling.",
647 "shiatsu massage.",
648 "chiropractic treatment.",
649 "ESO.",
650 "tetrahydrocannabinol.",
651 "lysergic acid diethylamide.",
652 "psilocybin.",
653 "quinuclidinyl benzilate.",
654 "phenylpropanolamine.",
655 "Xanax addiction.",
656 "Prozac addiction.",
657 "a life made livable with clozapine.",
658 "colonic irrigation, twice a day.",
659 "self abuse.",
660 "real tears from Michelangelo's \"Pieta\".",
661 "the face of Jesus in a bowl of spaghetti.",
662 "one man, one vote.",
663 "a resurgence of tribbles.",
664 "a Popeil pocket fisherman.",
665 "\"from each according to their ability, to each according to their need\".",
666 "the upcoming Vernal Equinox.",
667 "Buddha Nature.",
668 "the upcoming Summer Solstice.",
669 "trout fishing.",
670 "rolfing.",
671 "engrams.",
672 "utopia.",
673 "the ThighMaster.",
674 "bliss.",
675 "the monolith in 2001 A Space Odessy.",
676 "the writings of Douglas Hofsteader.",
677 "the end of the world.",
678 "the eventual domination of world.",
679 "backward masking.",
680 "megadoses of vitamin C.",
681
682 /* MCA */
683 "fire.",
684 "\"liqui-gels\".",
685 "\"2001: A Space Odessy\".",
686 "assault-style weapons.",
687 "anarchy.",
688 "lemon-scented sprays.",
689 "the Rocky Horror Picture Show.",
690 "Spam.",
691 "a plastic imitation foreskin.",
692 "sex with Ted Kennedy.",
693 "smokin' Dope with the Pope.",
694 "trendy papsmears.",
695 "removal of that dangly thing in the back of your mouth.",
696 "New Coke.",
697 "the death of Bob Dole.",
698 "watching all of Oliver Stone's films, back to back.",
699 "the ATF.",
700 null,
701 null /* and one last null to end the whole list */
702 };
703
704
705 public static void main( String JavaDoc args[] )
706 {
707    int i = 0, l = 1;
708    if (args.length > 0)
709      try {
710         l = Integer.parseInt( args[0] );
711      } catch (NumberFormatException JavaDoc nfe) { l = 1; }
712    for (; i < l; i++)
713    {
714      printRandomSelection( LIST );
715      System.out.println("");
716    }
717 }
718
719 public static void printRandomSelection( String JavaDoc list[] )
720 {
721      int i = 0, j, cnt;
722      String JavaDoc buff = "";
723
724      for (; list[i] != null; i++) {
725         /* how many in the current list? */
726         cnt = 0;
727         for (j = i; list[j] != null; j++) {
728            cnt++;
729         }
730         /* pick a random string */
731         j = (int)(Math.random() * cnt);
732         
733         buff = cat( buff, list[i + j] );
734         i += cnt;
735      }
736      /* print it out, breaking lines */
737      printLines( buff );
738 }
739
740 protected static String JavaDoc cat( String JavaDoc s1, String JavaDoc s2 )
741 {
742    int l1 = s1.length(), l2 = s2.length();
743    char c, c2;
744
745    if (l2 <= 0) return s1;
746    if (l1 <= 0) return s2;
747
748    c = s1.charAt( l1 - 1 );
749    c2 = s2.charAt(0);
750    if ( (!Character.isLetterOrDigit(c)) && c == c2 )
751    {
752      s2 = s2.substring(1);
753      c2 = s2.charAt(0);
754    }
755
756    if (c != ' ' && c2 != ',')
757      return s1 + " " + s2;
758    return s1 + s2;
759 }
760
761 protected static void printLines( String JavaDoc text )
762 {
763    String JavaDoc tmp;
764    int cnt = 0, j;
765    boolean firstOnLine = true;
766
767    while (true) {
768       j = text.indexOf( ' ' );
769       if (j < 0)
770       {
771         j = text.length();
772         if (cnt+j+1 < COLUMNS_PER_LINE)
773           System.out.println( " "+text );
774         else
775           System.out.println( "\n"+text );
776         return;
777       }
778       tmp = text.substring( 0, j );
779       text = text.substring( j+1 );
780       if (cnt + j < COLUMNS_PER_LINE) {
781         cnt += j + 1;
782         System.out.print( " " + tmp );
783       } else {
784         cnt = tmp.length();
785         System.out.print( "\n" + tmp );
786       }
787    }
788 }
789
790 }
791
792 /*
793 --
794 Selected by Brad Templeton. MAIL your joke (jokes ONLY) to funny@clarinet.com.
795 Attribute the joke's source if at all possible. A Daemon will auto-reply.
796 If you don't need an auto-reply, submit to rhf@clarinet.com instead.
797 */

798
799
Popular Tags