In 1993 stelde Robert A. Hayden van de Minnesota State University1 (Mankato, VS) een eenvoudige code voor waarmee zelfverklaarde geeks elkaar in e-mailhandtekeningen2 en Usenet berichten3 konden informeren over hun interesses, meningen en vaardigheden.

geek code
Omschrijving van persoonlijke voorkeuren in Geek Code.

Bovenstaande Geek Code wordt gedecodeerd5 tot de volgende persoonsbeschrijving:

categorie kwalificatie beschrijving
Type of Geek GTW Geek of Technical Writing.
Dress d-@ Mostly "I'm usually in jeans and a t-shirt," but it varies.
Shape s:+ I'm of average height, I'm rounder than most.
Age a- 25-29.
Computers C++++ I'll be first in line to get the new cybernetic interface installed into my skull.
UNIX UL I have a Unix account to do my stuff in. I use Linux.
Perl P I know Perl exists, but that's all.
Linux L+++ I use Linux exclusively on my system. I monitor comp.os.linux.* and even answer questions sometimes.
Emacs E- Emacs is too big and bloated for my tastes.
World-Wide Web W+ I have the latest version of Netscape, and wander the web only when there's something specific I'm looking for.
USENET News N Usenet News? Sure, I read that once.
USENET Oracle !o I refuse to have anything with that!
Kibo K++ I've read Kibo.
Microsoft Windows !w I refuse to have anything with that!
OS/2 O- Tried it, didn't like it.
Macintosh M- Macs suck. All real geeks have a character prompt.
VMS V- Unix is much better than VMS for my computing needs.
Political and Social Issues !PS I refuse to have anything with that!
Politics and Economic Issues PE- It's ok to increase government spending, so we can help more poor people. Tax the rich! Cut the defense budget!
Cypherpunks Y++ I am on the cypherpunks mailing list and active around Usenet. I never miss an opportunity to talk about the evils of Clipper and ITAR and the NSA. Orwell's 1984 is more than a story, it is a warning to our's and future generations. I'm a member of the EFF.
PGP PGP+++ I don't send or answer mail that is not encrypted, or at the very least signed. If you are reading this without decrypting it first, something is wrong. IT DIDN'T COME FROM ME!
Star Trek t+ It's a damn fine TV show and is one of the only things good on television any more.
Babylon 5 5 I've seen it, I am pretty indifferent to it.
X-Files X+ I've Converted my family and watch the show when I remember. It's really kinda fun.
Role Playing R+++ I've written and published my own gaming materials.
Television tv+ I watch some tv every day.
Books b+ I enjoy reading, but don't get the time very often.
Dilbert DI+ I read Dilbert daily, often understanding it.
DOOM! D+ It's a fun, action game that is a nice diversion on a lazy afternoon.
The Geek Code G I know what the geek code is and even did up this code.
Education e+ Got an Associates degree.
Housing h>---- Friends come over to visit every once in a while to talk about Geek things. There is a place for them to sit. But someday I would like to say: "Married with children – Al Bundy can sympathize."
Relationships r I date periodically.
Sex y+ Male. I've had real, live sex.

Hayden's specificatie van Geek Code6 versie 3.12 werd hier7 gearchiveerd. De code bestaat uit 34 categorieën, elk met een uniek label van één of meer letters of cijfers. De specificatie legt voor elke categorie een verzameling kwalificaties vast die telkens bestaan uit het label van de categorie, mogelijks voorafgegaan en/of gevolgd door leestekens en/of letters (geen spaties).

Om een persoonlijke Geek Code te construeren, moet men alle categorieën overlopen in de volgorde zoals ze in de specificatie vastgelegd zijn en telkens een kwalificatie kiezen die het best de (voorkeur van de) geek beschrijft. Al deze kwalificaties worden samengevoegd tot één regel — met een spatie als scheidingsteken — om andere geeks over de hele wereld te informeren over wat een geweldige nerd de persoon eigenlijk wel is.

Opgave

Een Geek Code begint met de letter G (voor geek) gevolgd door de specialisatie(s) van de geek (type of geek). Zo staat GMU bijvoorbeeld voor geek of music (muziek). Voor geeks met meerdere specialisaties worden de specialisaties van elkaar gescheiden door slashes. Zo staat GMD/TW bijvoorbeeld voor een geek of medicine (geneeskunde) en een geek of technical writing (technisch schrijven8). Er zijn 28 verschillende specialisaties waaruit kan gekozen worden.

kwalificatie beschrijving
GB Geek of Business
GC Geek of Classics
GCA Geek of Commercial Arts
GCM Geek of Computer Management
GCS Geek of Computer Science
GCC Geek of Communications
GE Geek of Engineering
GED Geek of Education
GFA Geek of Fine Arts
GG Geek of Government
GH Geek of Humanities
GIT Geek of Information Technology
GJ Geek of Jurisprudence (Law)
GLS Geek of Library Science
GL Geek of Literature
GMC Geek of Mass Communications
GM Geek of Math
GMD Geek of Medicine
GMU Geek of Music
GPA Geek of Performing Arts
GP Geek of Philosophy
GS Geek of Science (Physics, Chemistry, Biology, etc.)
GSS Geek of Social Science (Psychology, Sociology, etc.)
GTW Geek of Technical Writing
GO Geek of Other. Some types of geeks deviate from the normal geek activities. This is encouraged as true geeks come from all walks of life.
GU Geek of 'Undecided'. This is a popular vocation with incoming freshmen.
G! Geek of no qualifications. A rather miserable existence, you would think.
GAT Geek of All Trades. For those geeks that can do anything and everything. GAT usually precludes the use of other vocational descriptors.

Hieronder geven we nog enkele verzamelingen van kwalificaties voor categorieën die in deze opgave vermeld worden. De categorieën staan opgelijst in de volgorde waarin ze ook in de Geek Code voorkomen. Bij de categorie age (a) die de leeftijd van een geek omschrijft, is het belangrijk om te vermelden dat ook de exacte leeftijd kan aangegeven worden door de leeftijd in jaren na het label a te plaatsen. Zo omschrijft a42 bijvoorbeeld een geek van 42 jaar.

kwalificatie beschrijving
a+++ 60 and up
a++ 50-59
a+ 40-49
a 30-39
a- 25-29
a-- 20-24
a--- 15-19
a---- 10-14
a----- 9 and under (Geek in training?)
a? immortal
!a it's none of your business how old I am
kwalificatie beschrijving
t+++ It's not just a TV show, it's a religion. I know all about warp field dynamics and the principles behind the transporter. I have memorized the TECH manual. I speak Klingon. I go to cons with Vulcan ears on. I have no life.
t++ It's the best show around. I have all the episodes and the movies on tape and can quote entire scenes verbatim. I've built a few of the model kits too. But you'll never catch me at one of those conventions. Those people are kooks.
t+ It's a damn fine TV show and is one of the only things good on television any more.
t It's just another TV show
t- Maybe it is just me, but I have no idea what the big deal with Star Trek is. Perhaps I'm missing something but I just think it is bad drama.
t-- Star Trek is just another Space Opera. William Shatner isn't an actor, he's a poser! And what's with this Jean-Luc Picard? A Frenchman with a British accent? Come on. Isn't Voyager just a rehash of Lost in Space? Has Sisko even breathed in the last two seasons? Come on. I'd only watch this show if my remote control broke.
t--- Star Trek SUCKS! It is the worst crap I have ever seen! Hey, all you trekkies out there, GET A LIFE! (William Shatner is a t---)
t* I identify with Barclay, the greatest of the Trek Geeks.
kwalificatie beschrijving
X++++ I am Chris Carter
X+++ This is the BEST show on TV, and it's about time. I've seen everything David Duchovny and Gillian Anderson have ever done that been recorded and I'm a loyal Duchovny/ Gillian Anderson fan. I've Converted at least 10 people. I have every episode at SP, debate the fine details on-line, and have a credit for at least 2 YAXAs.
X++ This is one of the better shows I've seen. I wish I'd taped everything from the start at SP, because I'm wearing out my EP tapes. I'll periodically debate online. I've Converted at least 5 people. I've gotten a YAXA.
X+ I've Converted my family and watch the show when I remember. It's really kinda fun.
X Ho hum. Just another Fox show.
X- It's ok if you like paranoia and conspiracy stories, but, let's face it, it's crap.
X-- If I wanted to watch this kind of stuff, I'd talk to Oliver Stone
kwalificatie beschrijving
DI+++++ I am Scott Adams.
DI++++ I've received mail from Scott Adams. I'm in the DNRC (Dogbert's New Ruling Class).
DI+++ I am a Dilbert prototype
DI++ I work with people that act a lot like Dilbert and his boss.
DI+ I read Dilbert daily, often understanding it
DI I read Dilbert infrequently, rarely understanding it
DI- Is that the comic about the engineers?
DI-- Don't read it, but I think the dog is kinda cute.
DI--- I don't think it's funny to make fun of managers trying their best to run their organizational units.

Elke regel van het tekstbestand geek.txt14 bestaat uit een woord $$w \in \mathcal{W}$$, gevolgd door een hekje (#) en een patroon $$p \in \mathcal{P}$$. De verzameling $$\mathcal{W}$$ bevat alle woorden die enkel bestaan uit letters. De verzameling $$\mathcal{P}$$ bevat alle mogelijke persoonsomschrijvingen die voldoen aan de specificatie van de Geek Code. De kwalificatie voor de categorie met label $$\texttt{c}$$ uit Geek Code $$p \in \mathcal{P}$$ wordt aangeduid met $$p(\texttt{c})$$. De notatie $$p'(\texttt{c})$$ wordt gebruikt voor de kwalificatie $$p(\texttt{c})$$ waarin het label wordt vervangen door een universeel karakter. Bijvoorbeeld, voor $$p(\texttt{PGP}) = \texttt{--PGP++}$$ wordt $$p'(\texttt{PGP}) = \texttt{--#++}$$ met een hekje (#) als universeel karakter. Gevraagd wordt:

  1. Bepaal zo kort mogelijke reguliere expressies voor de volgende deelverzamelingen van $$\mathcal{P}$$:

    • $$\mathcal{P}_1 = \{\,p \in \mathcal{P}\,|\,p(\texttt{a})\ $$omschrijft een leeftijd tussen 30 en 39 jaar$$\,\}$$

      voorbeeld: GMD d- s+: a C+++ UU+++ P++++ L? E+ W? N+ o- K w+++ O++ M- V++ PS+ PE-- Y+++ PGP- t+++ 5- X++ R++ tv++>- b-- DI-- D+++ G+ e- h--- r+ y-- $$\in \mathcal{P}_1$$
        GCA d- s--:- a35 C- UO++ P L E+++ W+ N---- o K+++++ w+(++++) O? M-- V++ PS PE+++ Y--- PGP+ t++ 5-- X++ R tv- b DI--- D++ G++ e+++ h+ r++ z-- $$\in \mathcal{P}_1$$
        GCC d--- s+++:++ a-- C+++ U++ P-- L- E-- W+++ N-- o+++ K w--- O M$ V PS--- PE? Y+++ PGP++++ t+ 5-- X+ R tv+>$ b++++ DI-- D G+ e h---- r* x-- $$\not \in \mathcal{P}_1$$
    • $$\mathcal{P}_2 = \{\,p \in \mathcal{P}\,|\,p'(\texttt{t}) = p'(\texttt{X}) = p'(\texttt{DI})\ ^{(*)} \,\}$$

      (*) met andere woorden: op het label na heeft $$p$$ dezelfde kwalificatie voor Star Trek (t), X-files (X) en Dilbert (DI); hou rekening met het feit dat er in een kwalificatie zowel karakters (geen spaties) voor als na het label kunnen staan, bijvoorbeeld !t of t+++

      voorbeeld: GMC/PA d--->+ s+++:--- a--- C+++ U--- P- L+ E+++ W N+ o++ K+++ w+@ O+++ M- V++ PS- PE++ Y+ PGP- t++ 5- X++ R* tv+ b++ DI++ D+ G+++++ e++++ h !r x? $$\in \mathcal{P}_2$$
        GED/TW !d s+:+ a-- C UI++++ P--- L--- E+ W++ N---- o+ K++ w++ O--- !M V+++ PS PE-- Y+++ PGP t+++$ 5-- X++ R tv++ b-- DI++++ D G- e+++ h+ r--- !z+ $$\not \in \mathcal{P}_2$$
    • $$\mathcal{P}_3 = \{\,p \in \mathcal{P}\,|\,p\ $$bevat minstens zes kwalificaties waarvan het deel na het label gelijk is aan +++$$\,\}$$

      voorbeeld: GL/MU/IT/PA d- s++:+ a94 C+++ U- P++++ L+++ E W- N+ o++($) K-- w+ O-- M-- V-$ PS PE++ Y-- PGP++++ t+++ 5+++ X+++ R* tv b++ DI+ D+++ !G e++ h++ r- z** $$\in \mathcal{P}_3$$
        GB/ED/M !d s+:+++ a56 C++ U++ P L+ E--- W++ N---- o++ K+++ w++ O---- M? V- PS--$ PE Y--- PGP t* 5++++ X-- R tv+$ b++ DI--$ D---- G-- e++ h- !r z+ $$\not \in \mathcal{P}_3$$
    • $$\mathcal{P}_4 = \{\,p \in \mathcal{P}\,|\,p\ $$omschrijft een geek met juist drie specialisaties, maar geen computer science (CS), information technology (IT), math (M) of science (S)$$\,\}$$

      voorbeeld: GJ/AT/CA d? s+++:- a-- C++ U- P++ L-- E---- W- N o K++ w O+++ M++ V++ PS- PE+ Y PGP t++ 5+ X++++ R++ tv- b+++ DI+++ D++++ G-- e++ h++ r-- y $$\in \mathcal{P}_4$$
        GSS/C dpu s:-- a42 C+++ U+ P+ L+++ E--- W-- N--- !o K+++++ w+++++ O@ M++ V+ PS--- PE+ Y-- PGP-- t 5++++ X R* tv+ b- DI+++ D--- G+++++ e+ h--- r-- z++++ $$\not \in \mathcal{P}_4$$
        GCM/CS/C dpu s++:-- a !C U+ P++++ L--- E---- W+++ N o+ K w- O- M- V-- PS+>--- PE+ Y+ PGP--- t->$ 5++++ X+ R-- tv-->++ b-- DI+(+++) D++++ G e++ h r+ z $$\not \in \mathcal{P}_4$$

    Geef telkens een Unix commando waarin de reguliere expressie gebruikt wordt door een commando uit de grep familie om enkel de regels van het tekstbestand naar stdout te schrijven waarvan het patroon $$p$$ behoort tot $$\mathcal{P}_i\ (i = 1, 2, 3, 4)$$.

  2. Bepaal als volgt de woorden $$w_1\ w_2\ w_3\ w_4$$ van een geheime boodschap:

    • het woord $$w_1$$ staat op de unieke regel waarvan $$p$$ behoort tot $$\mathcal{P}_1 \cap \mathcal{P}_2$$

    • het woord $$w_2$$ staat op de unieke regel waarvan $$p$$ behoort tot $$ \mathcal{P}_2 \cap \mathcal{P}_3$$

    • het woord $$w_3$$ staat op de unieke regel waarvan $$p$$ behoort tot $$\mathcal{P}_3  \cap \mathcal{P}_4$$

    • het woord $$w_4$$ staat op de unieke regel waarvan $$p$$ behoort tot $$\mathcal{P}_4 \cap \mathcal{P}_1$$

    Geef telkens een Unix commando waarin de reguliere expressies voor de verzamelingen $$\mathcal{P}_i\ (i = 1, 2, 3, 4)$$ gebruikt worden door commando's uit de grep familie om het woord $$w_j\ (j = 1, 2, 3, 4)$$ op te zoeken in het tekstbestand en uit te schrijven naar stdout. Hierbij is het niet toegelaten om het woord $$w_j$$ letterlijk uit te schrijven (bv. echo $$w_j$$).