About a month ago, at a LAN party, I was getting a bit bored (and tired as hell), so I decided to make a quick "update" program for my parents' computer. Often they'll ask me for help, and yell at me when they're confused. So, I decided to plan an April Fool's prank on them in advance. The program starts with "Upgrading Win98x -- Do not abort -- Do not abort -- Hard drive failure may result after abortion. Press any key to continue."

The program then continues to follow an algorithm to pick fairly plausible file name (my parents don't need real file names to believe it), and "update them", full with a percent counter. The thing is, it is in an infinite loop. So far, I've had my dad waiting for it to finish for an hour. I predict he will be waiting for quite some time longer.

The gig is up. I finally told my father after 5+ hours of running the program, and him not using the computer.

Source code in C++ (feel free to reproduce):

#include <iostream.h>
#include <time.h>  //gets time
#include <stdlib.h>
#include <conio.h>  //getch function

int rnd(int range);
void seedrnd(void);
void anykey();  //my own anykey fuction

void main()
	int lets;
	char consonants[22]="bcdfghjklmnpqrstvwxyz";
	char vowels[6]="aeiou";
	char letters[27]="abcdefghijklmnopqrstuvwyxz";
	char ext[34]="datexebatdllsyscfgpwlreghlpinisav";
	int name;
	int start;
	int percent;
	// starting message:
	cout << "----------------\nUpgrading Win98x -- Do not abort -- ";
	cout << "Do not abort\nHard drive failure may result after abortion";
	cout << "\n----------------\n";
	cout << "Press any key to continue";
	anykey();  //here's the quick anykey
	cout << "\n\n";
	while(;;)  // infinite loop
		cout << "Updating: ";
		lets=rnd(7)+3;  //how many letters will the filename have?  3-7
		for(int i=0; i<lets; i++)
//randomly picks the letter.
//First, third, fourth, seventh, and eighth letters are consonants
				cout << consonants[name];
//second, fifth, and sixth are vowels
//(for easy pronunciation of "filenames", and you don't get "gjwp.exe")
				cout << vowels[name];
		lets=rnd(3)+1; // 1/3 chance of adding numbers
			lets=rnd(2)+1;  // either one or two numbers
			for(int i=0; i<lets; i++)
				name=rnd(9)+1;  //numbers 1-9
				cout << name;
// If the numbers are displayed,
//there is an additional 1/2 chance of additional letters
// 1-5 additional letters, these can be either consonant or vowel
				for(int i=0; i<lets; i++)
					cout << letters[name];
		cout << ".";
		lets=rnd(10);  // 10 different file extentions.
			// Some might even be known by my parents!
		cout << ext[lets] << ext[lets+1] << ext[lets+2];
		cout << "\n     ";
		lets=rnd(5)+1;  // waits 1-5 seconds for next percent update.
//this is the percent counter, doesn't work all that well,
//I'm thinking because of the speed of today's computers.
			cout << percent << "%"; // displays percent
			while(time(NULL)-lets<start) //waiting
				cout << "\b\b";  // backspace (if you didn't know)
				cout << "\b\b\b";
		cout << "\n----File update complete\n";

int rnd(int range)
	//do: int rnd(int range);
	//and: void seedrnd(void);
	//when I'm ready to call up a random number,
	//do it like this:
	//in main when declaring int, etc, put: seedrnd();
	int r;


void seedrnd(void)

void anykey()
	cout << endl;

Thanks to Magenta and OldMiner for pointing various things out to me to fix this writeup.