Programmers are strange people. We build things out of thin air, a part of our sanity and with weird codes that would make any grown sane man cry.

But sometimes, a programmer builds a program that is too weird even by their insane standards.

What program have you created that is weird and strange?

(One program per answer please)


Brain simulator.

I was completely serious, but thanks for the down-vote anyway!
Including more details might have avoided the downvote...
@David: if you had written a successful brain simulator, would you give away the details, or would you just sign the fella up with a StackOverflow account? :)
You can keep the implementation secrets. But some broad detail like which species/age/gender the brain belongs to might be nice.Should we keep an eye out for a SO account of a 3yo Highland Moose who enjoys eating conifers and coding Perl?
@David: you think a moose *enjoys* eating conifers? I'll bet he's actually munching away thinking "I could really go for some Ben and Jerry's". I buy the coding Perl part, though - *anybody* can code Perl. :)
+1  A: 

Mouse emulator for Psion Series 3a

Cade Roux
+3  A: 

My weirdest program ever made was likely a Windows PE (.exe) -> Linux ELF converter, as part of the Alky project. A big chunk of Python code that would convert the exe into a .o and, through some ld magic, would end up producing a binary that would initialize all of the proper libraries to do the Win32 layer.

Cody Brocious
Neat. In Python? Wow.
Lucas Jones
+61  A: 

We are in the custom integration business. We had a customer ask us to put a sensor on the powder room toilet. When someone flushed the toilet during a party a flush sound is played through the whole home audio system. It is a novelty but it made the customer happy.

I don't even know where to begin with this...someone actually PAID for this to happen?
Thomas Owens
if only they broadcasted all the other sounds too
+11  A: 

Right now I'm writing software to track how many times people wash their hands in a hospital setting. Big Brother is here.

This actually sounds like good software. It's scary how bad this still is in the century. Check this: http://www.institute-shot.com/hand_washing_by_health_care_providers.htm
Mladen Mihajlovic
Nice, but you don't need to wash your hands to prevent infection, and in some cases it can be worse (not drying them properly makes it really easy for bacteria to breed, touching door handle on the way out of bathroom after the person before you didn't wash). Unless you're a surgeon (with a dedicated wash area where you don't have touch anything after washing), far better off using hand gels in a hospital setting, as these can be widely dispersed and easilly available close to points of contact.
These were "touchless" hand washing units mounted in the right places in the hospital - not in bathrooms and such where you have to touch the door handle to get out. They had all the literature and test results on why it was more effective than gels. But, I'm no expert on hand washing, I just write software!
The trouble with gels, though, is that they only work on the surfaces they actually contact. The cracks and crevices in your hand won't get cleaned. Running water is better for cleaning your *whole* hand.

An old experimental MS-DOS polymorphic virus that infected COM and EXE files in assembly.

Arthur Vanderbilt
+15  A: 

For one of my Computer Science masters project, I've made a CPU scheduler simulator ...in Microsoft Excel 97.

  • I've got job algorithms implemented.
  • You can simulate one second/tick intervals
  • Currently in used in a school somewhere (one of my classmates teaches and used my code to demonstrate CPU scheduling)

The project can be found here: http://github.com/MrValdez/CPU-Scheduler-in-Excel-97

Excel 97 *shudder*
That's really interesting. You should post that some where for everyone to enjoy!
Giovanni Galbo
I've once seen a protocol checker written in Excel...
You should post this.
Vulcan Eager
Ok. I've finally decided to release this as an open source project: http://github.com/MrValdez/CPU-Scheduler-in-Excel-97. This is the first time I've open sourced one of my code, so please be gentle. :p
+4  A: 

I wrote a DNS server that used SOCK_RAW sockets to issue responses to queries, because I wanted to run two DNS servers, one for privileged users and one for unprivileged users, based on rules in the firewall.

Doing an iptables -j DNAT --to-port $highport allowed the secondary DNS server to receive the UDP DNS query packets, but when the response was issued, because of the way things worked, the response would come from the highport instead of the domain port that it was originally sent to, and the querying host would discard it.

As a result, I had to take requests via a normal UDP socket, construct the packets, do manual ARP requests and have an internal representation of the routing table, in order to send the response to the correct place from the correct port and to the correct port.

It was honestly the nastiest hack I've ever written.

+9  A: 

I wrote a duplicate file detector in Python using only lambda, no def, to prove it could be done and still be somewhat comprehensible. I'll leave it up to the reader to decide whether I succeeded:

import sys
import os
import hashlib

check_path = (lambda filepath, hashes, p = sys.stdout.write:
  (lambda hash = hashlib.sha1 (file (filepath).read ()).hexdigest ():
    ((hash in hashes) and (p ("DUPLICATE FILE\n"
                              "   %s\n"
                              "of %s\n" % (filepath, hashes[hash])))
     or hashes.setdefault (hash, filepath)))())

scan = (lambda dirpath, hashes = {}:
  map (lambda (root, dirs, files):
    map (lambda filename: check_path (os.path.join (root, filename), hashes), files), os.walk (dirpath)))

((len (sys.argv) > 1) and scan (sys.argv[1]))

I've also written a working GUI calculator similar to calc.exe with a main that consisted only of:

int main () { return 0; }
John Millikin
That's some awfully nice LISP you have there ;)
Cody Brocious
Let me guess, the calculator program was for the DailyWTF programming contest?
+1  A: 

The shortest SQL code which does a word wrap on "Hello World" is what I wrote and here it is:

select 'World' as Hello

+21  A: 

Microsoft Excel Minesweeper

I was being under-utilized at a temporary job I had during a summer several years ago. Unfortunately, they didn't have a minesweeper game on my workstation. I made one from an Excel spreadsheet and VBA. Because it was work-product, I can't post the code publicly- it remains the property of my former employer.

I cannot foresee any circumstance that would compel me to do that again.

I should have mentioned that I had no internet access. I relied heavily on the VBA editor's context sensitive help.
Under-utilized? No internet access? It sounds like they tossed you in a hole and left you for dead. (Unless it wasn't a programming job. In either case, no internet is no fun.)
Cristián Romo
Yeah- it was an accounting/data-entry job in 1999, I think.
+13  A: 

Our receptionists would send out the Daily Birthdays email every day, an email to the entire company to announce who has their birthday that day (including weekends on Friday's email). This made everyone feel a little loved by this human touch.

They got a little tired of this, and since everyone's birthday is in the staff HR database already, it became my task to implement this in code. My nickname for it? Automated Love.

Mark Glorie
I think you're the main character from "Player Piano". Removing the human touch via automation!
Mike Robinson
Now all that's needed is for everyone to add e-mail filter rules to automatically ignore the automatically generated emails. Then their will be no human involvement in a system intended to make people think other people care about them.

A friend and I wrote a worm called "traveller" written in shell script on an Apollo Domain network. It was harmless, but it would stamp a "passport" file whenever it arrived at a particular machine. We wanted to see how often it would zip around our small network (about 30 nodes).

+1  A: 

I used Inline::Java to help test a vendor's application server. Even though it was supposed to emit plain XML over HTTP, it did so using a DataOutputStream, and I had already written the test harness in Perl. There's nothing quite so weird and wrong as mixing Perl and Java in the same source file.

Marcel Levy
+2  A: 

As a project in College I had written a game in VB that read in student marks, adjusted the speed of the avatar representing them, then forced them to race from one end of the screen to the other.

+4  A: 

I took the phonetic model from the Festival text to speech engine (when it was still in Scheme, SIOD) and turned the tree inside-out to produce a dictionary of homophones. The intent was to use it as a Phonetic Human Interactive Proof to help protect data on a web-site from being scraped. The normal site had an image based HIP (CAPTCHA), and the mirror-site that compiled with the American's With Disabilities act used the phonetic HIP.

Kyle Burton

Someone very close to me wrote a Sudoku game in BASIC. Nice challenge.

Pascal Paradis
+7  A: 

'The Wardrobe'. A database for clothing. Depending on wheather, mood, occassion etc it outputs the perfect combination for the day.

+2  A: 

I did a calculator that had no conditional code. Everything was done with goto's using array lookups into tables of label pointers.


Good work - just read about that competition and it sounds hilarious. I also liked the calculator where every mathematical operation caused a memory leak, and the answer was the total amount of memory leaked - very creative!
John Sibly
You are truly an evil man.
Earlz: Thank you. :)
+7  A: 

I decided to use the Y-combinator pattern to reduce factorial in JavaScript down to the Peano axioms. That is I wrote factorial as a recursive function in terms of multiplication which was written recursively in terms of addition which was written recursively in terms of the functions +1 and -1. For some reason I got too much recursion when calculationg 8!. Pity.

The code is kind of long so I'll just provide a link.

Oddly enough my attempts at nice indentation don't seem to have made it very readable. Since I'm using a functional technique, maybe it would be better translated into Lisp?

Again the code is long, so I'll just provide another link.

Hmmm. People might not prefer it, but MIT Lisp proved it was better at recursion than JavaScript. It handled 8! successfully and failed at 9!. Should we consider this proof that Scheme is a better language than JavaScript? Or should we prefer Ruby for looking at the Ruby translation and deciding that no program could legitimately have that many braces open at once?

Obviously this is not a useful factorial algorithm. In the factorial thread I posted a far more efficient version of factorial.

You lost me at the fifth word ;)
Lucas Jones
+1  A: 

Template VooDoo to build an arbitrary precision int type that used asm add & carry and friends to do addition subtraction, multiplication and division. It was so nasty I had to disassemble the result just to tell if I got it right.


+5  A: 

I'm into home automation, mostly using X10 modules. I'm also into theater lighting, sound, and special effects, so Halloween is a big deal to me.

One year I put it all together and ran my Halloween special effects from my computer. Not only did I have certain lights get brighter and dimmer at random, but I wired a relay into the switch of my fog machine, and had my computer randomly trigger the fog machine. But the fog machine would spittle if you let it on for too long without firing, so it would also have hard minimum and maximum cycle times. Best of all, I had a motion sensor on the stairs that would trigger a pair of strobe lights.

Second best is, before I built my MythTV box, I had an infrared transceiver on my server that could send channel commands to the cable box, and start/stop/record commands to two VCRs. I had my recording schedule in my crontab file, and at the correct times, the program I wrote would send the codes to turn on the cable box, change to the right channel, turn on one of the VCRs (load balanced), and start recording. At the end of the show it would shut everything down again.

Gotta love cron jobs :).
+1  A: 

No Spam, I was tired of people that send chain mail, because you now that emails in the forwards are gathered by spammers, so i made a site where you copy&paste the whole email and the system adds all emails addresses into a public list and give you the chance to send an email to all that people pointing the one that send the chain mail in the first place.

After that no one send me chain email, and now the list 335,386 emails :D.

+12  A: 

I made a llitte php spcrit taht mix wodrs folliwong the legned abuot taht invtietgasion taht seatts that if you scrmable the txet idsine a wrod, levinag the fsirt and the last ltteer unthocued you can stlil read it.

They siad that is bscauee we raed wlhoe wrdos, not ltteer by lteter.

Taht aeiorsstn is ceellmopty naceinnossl. (You might be able to puzzle that sentence out, but I bet you couldn't read it at first glance.)
I know, I spend a lot of time ironing the system until it become somehow usable, that investigation of course don't exists at all, that's way the system can't really nail it down. If your read the FAQ cand learn more about hoe the system processes the strings.
I did the same thing but as an Outlook macro. I'd annoy my friends by running it on email before sending it to them.
Steve Hiner
I did this too as my first programming project, but in Java. I made a whole bunch of methods to manipulate strings that were already in the API (like split) because I didn't know that. I'm one of those people on The Daily WTF who reinvents the wheel over and over. The code was awful.
I did this in lex for a perl golf competition:%%[A-z]+/[A-z] printf(strfry(yy_bp+1)-1);
Alex Brown
+24  A: 

My father was in radio communications on submarines in the British Royal Navy when he was younger. He's in his mid 60s now, but about 10 years ago he came across a defense job opening with ASIO (the Australian spy agency) keeping tabs on the radio chatter coming out of Indonesia. This was pre-Bali Bombing, so maybe ASIO knew something was going on back then.

I wrote a Pascal application that converted text strings into Morse code and played it out the PC speaker so he could check his Morse abilities. He could also use the spacebar as an input to "send" messages.

He didn't end up applying for the job, but he got a chance to show off his skills to us kids. He was proud that I could program the computer to talk Morse; I was proud of him for talking Morse without a computer.

+1  A: 

Final year CS project:

"The Post Room Computer" (A type of little man computer, but far more complicated and realistic). Full assembly system which complied the "assembly" code into machine code which could then be executed by an emulated computer. All fronted by a lovely GUI. I got paid over £600 to finish it off so they could use it to teach low-level computing concepts.


Run-time executable decryptor. Some functions would be encrypted (using a strong algorithm, such as CAST5) within the executable itself, and the decryption routine would, at run-time, decrypt single instructions and single-step them. The decryption key could be supplied externally from the program.

+3  A: 

When I was in seventh grade I played around with VB 6.0. I decided I would make a "cheese database" which was a bunch of forms with cheese images, descriptions, and wine paring. I even had an easter egg in the app which played a sound of Homer saying "Mmmm... cheese".

+24  A: 

I once wrote an assembly interpreter in python for a fake assembly language our teacher was pestering us with. He would give us these ultra long, ultra complicated code listings and dare us to find out what it produced and what the "machine" looked like after each instruction. Then he would brag about how we were all too stupid to understand the machine and that Java was rotting our minds (it was!)... But I showed up with an Excel sheet with the machine state after executing each instruction per row :)

Daren Thomas
Dunno if you deserve thumbs down for positively reinforcing this aggravating teacher or thumbs up for bad attitude. I guess I'll give thumbs up because of the use of Python :)
+1 for taking the teacher on. Sometimes, they just deserve it.
+16  A: 

I built an online poker bot in C++ and it made a tidy profit, and only took 3 years to build! Woot!

+1 Excellent post
Andreas Grech
Wow that is great. Goes to show anything is doable if you set your mind to it.
+1 but I don't think it's strange or weird, it's awesome!
+1  A: 

DOS TSR (terminate and stay resident; for youngsters - a kind of background task in an inherently single-tasked single-threaded OS) that sleeped for 10 minutes and then displayed (in ASCII, of course) a single dot in the center of the screeen, which then expanded into a horizontal line. Then two circles appeared on that line and expanded into eyes. Eyes looked left and right and then closed back into a line which contracted into a dot which disappeared.

It was called "Big Brother is watching you" (inspired by 1984, not by reality show which didn't exist back then) and I did install it as a joke on few computers with great results (oh, no, we have a virus!).

+46  A: 

I once made a perl script to insert ascii art into other people's web server logs.

dr. evil
pretty hilarious.I just hope people were reading those logs...
Out of interest, any particular art?
brilliant! (15characters)
+4  A: 

A C interpreter in Prolog (it handled a subset of C (with memory management)).

A simple web browser in Prolog.

+8  A: 
Did anyone actually use it in production?
I convinced a friend of the family (farmer) to try it out, but alas he preferred the old fashioned way :(
Hey.. we wrote a Turkey Ordering Guide last year - we should do business together :o)
+7  A: 
AH, the Jupiter Ace. I cut my teeth on one of those...
Jimmy J

'Random Artist'

This was an automated VB application that randomly drew shapes on the screen, simulating art.

Wasn't much, but I loved it!

Wild Thing

A program for a graphical calculator that displays HAM moving from left to right, and CHEESE moving from right to left. When ever you stopped it, it took the position values, and worked out a vector product of the locations.

Found this whilst looking through my old stuff from school recently...

Rich Bradshaw
+80  A: 

This one wasn't me, but it was my friend Scott Anderson. He had a problem. He had 7 cats, who all thought it great fun to climb the Christmas tree. Which destroyed the tree. He taught them not to do it when he was around, but he was generally asleep at 2 AM so that didn't protect the key.

He therefore bought a motion sensor and (after some experimentation) wrote a program so that when it sensed motion it would run the vacuum cleaner for 30 seconds. After a week of random, "WHIRR!" "Mrow!" and then a mad cat dash, often resulting in thumps of collisions, the cats learned that the Christmas tree was not to be trifled with.

Bonus points for when his wife forgot the system was there and was caught trying to sneak presents under the tree!

"so that didn't protect the key" What key?
Vulcan Eager
Aren't there motion detectors that directly switch on an outlet (e.g. lights)? If so, you wouldn't need a computer in the loop -- unless the specification to shut it off after 30 seconds is what motivates the requirement for a computer (and a programming language).
+12  A: 

Oh yes, forgot to mention the Dancing Steve Jobs that can be run in iTunes as an visualizer. Some ideas just have to be realized :)


A protection scheme where the password was actual a string of bytes that got casted to a function pointer that would allow access. If you pasted the correct string of bytes, the program would function as normal. If not, it would crash (if you were lucky!)

wow, that sounds rather hackable... You actually let your user choose where he wants to jump to next?
Daren Thomas

A long while back(10ish years), I was working on a game, and I wanted it to have unique character names in it.

So I created a simple name creation program in VB6. You chose the length of the name, and it would make one up from random letters. It did have some rules though. Like it wouldn't make a name with the same 3 characters in a row.

It also had options that could be set. You could tell it which letter combinations to not accept.

+1  A: 

I wrote a program in Scheme that translates normal English text into egg language. I just put it up on Google Code.

Joe Lencioni
+5  A: 

My most recent weird project: A word processor that threatens to destroy what you've written.

Write Attack!

It's for NaNoWrimo 2008.

That's...*horrifying*. Though I bet that at this revision, at least, you can defeat it by typing, say, "oh god oh god oh god please no" repeatedly.
Robert Rossney

Sudoku solver. both in excel and in C#

+2  A: 

In high school I wrote a program that wrote the appropriate commands to a programmable sound generator and printed four random letters on the screen at the same time. This was on a custom 6809 system.

The first time I demonstrated it to the deputy principal, the (random) sound it made was a sort of a sucking sound and the letters (again, random) were FCUK.

Thankfully, the deputy was amused. ;-)

Peter K.
French Connection UK?

After the canteen services were finally closed and replaced with expensive vending machines, one of my co-workers started running a tuck-shop. As this was around the .com bubble (circa 2001-2002) we nick-named it "Craig's Tuck Shop .com"

During a week's break visiting my Brother in London I knocked up a simple ordering and sweetie suggestion and voting website in PHP using flat-files, and registered the domain www.CraigsTuckShop.com

Alas it is no more ;o)

Craig - if you're on here, "happy days, man" :o)

+1  A: 

Many years ago whilst bored at work, I wrote a space invaders game in Attachmate! Basic using a SNA console style client meant to be used to view customer's accounts :)

+9  A: 

Not too intense on the programming angle, but I setup an RSS feed for the coffee machine in our building so that folks could make a quick post when they started up a fresh pot. We were spread out enough that I thought having a little notifier would be handy, without coding from scratch, but everybody looked at me a little funny 8^D


Scroll text intro with bouncing balls and "music" with Awk on a VT300 terminal.

Back in 1994, I wrote an Awk script that would take a text file as input and display a scroll text intro. The input text would be scrolled at the bottom of the screen with a large font. I had several "balls" of different sizes ("O", "o", "." characters) bounce around the screen, to the beat of "beep beep beep-beep-beep". All this was through the use of the VT300 control codes. At times when I wasn't killing time with stupid things like this, I was busy playing frisbee. College was fun.

Ates Goral

I once wrote a little "name generator" program in Microsoft Basic for the Dragon computer which randomly put together (theoretically) pronouncable syllables, thus creating names. Thankfully, it was put out of use long before my first-born arrived :-)

Ola Eldøy
+3  A: 

In order to get out of bed in the morning, I wrote a wake-up program which produced endless beep sounds. The pitch for each beep was random, and there were 5 beeps every second. The sound was extremely unpleasant, and with the volume turned sufficiently up, it effectively achieved the desired result - a shocked, but nonetheless awake version of myself.

Ola Eldøy
+1  A: 

I got bored one day while doing Y2K testing and wrote a 2D hourglass simulator in VB where every grain of sand was simulated individually. It was fun watching it 'count down' as I waited for 5:30pm to come around.

A few weeks later I modded it to alter the amount sand in the hour glass, color etc.

Every now and then I revist the code and have been 'tweaking' this little toy ever since.

We want teh codez
Vulcan Eager
+1  A: 

I've come to this thread a bit late, but in a Computing class in high school, I wrote a BASIC program which ran an indefinite loop where it used the lprint command to continually print long lines of asterisks to the dot-matrix tractor-feed printer.

I put the compiled program into the autoexec.bat file of every computer. The computers were switched off at the end of the day, meaning that when the classes started the next day and everybody turned their computer on, the printers started randomly spewing out wads of paper.

Ahhh, the hilarity.

Did you get caught?
Lucas Jones
No - that was the genius of it!

I wrote a y-combinator in python... it was because of a lack of a scheme implementation while I was doing my homework. It looks like this:

makerec = lambda p: \
          (lambda mkfact: mkfact(mkfact)) \
          (lambda f: \
           (lambda arg: (f(f))(arg)))

fact = makerec(lambda f: lambda n: (n==0) and 1 or (n * f(n - 1)))

(Of course you can use it for things besides fact).

+5  A: 

One of the first things I do to learn a new programming language is to write a program that analyzes a source text and then uses a Markov-chain analysis to generate random gibberish that's somehow written in the style of the source text. I think I've done this in six or seven languages now.

Why I love Python: It took me about two hours to get it working. And that two hours included building a little IDE in C# that executes the program using IronPython, because I didn't realize I could just use IDLE or grab Eclipse.

It's actually not a bad program, for one written by someone who doesn't know Python (it's importing clr so that it can use the CLR's Random class; making this work in vanilla Python is an exercise for the reader):

import sys
import clr
from System import Random

r = Random()

def buildmap(text, size):
   map = { }
   for i in range(0, len(text)):
      if i + size < len(text):
         word = text[i:i + size]
         next = text[i + size]
         overlap = (i + size + 1) - len(text)
         word = text[i:] + text[:overlap - 1]
         next = text[overlap - 1]
      if not map.has_key(word):
         map[word] = [ ]
   return map

def producetext(map, length):
   word = map.keys()[0]
   output = [ ]
   for ch in word:
   count = 0
   while True:
      count = count + 1
      if count > length:
      char = map[word][r.Next(len(map[word]))]
      word = word[1:len(word)] + char
   return "".join(output)

text = sys.stdin.read()

map = buildmap(text, 6)

print producetext(map, 1500)

Not bad, though not as Pythonic as it could be. Here's some sample output. Determining what the input was is another exercise for the reader:

Open your hat get your hat get your hair
Your face like a Cuban plane
My love is like ribbons
And the swamplands
From the hillside struggling to the casements
Rip the Florida coast to the searchlights up
Turn the helicopter passes
We're pretty sure they're here will walk again
Put on the wind stopping
Feel the way down with a broadsword
Robert Rossney
+1  A: 

I once wrote a Mandelbrot fractal generator using Excel. I resized the cells so all 256 columns fit on screen and shrunk the rows down so the cells were square. The in VBA code I calculated the bailout value and color for each cell and changed the cell background color. Basically it turned each cell in the spreadsheet into a pixel for a 256x256 Mandelbrot fractal image. I still have it laying around on my computer somewhere.

Steve Hiner
+1  A: 

Recursive descent parser of boolean expressions involving 0,1,and,or,not, and parentheses - in one line of SNOBOL.

Liudvikas Bukys
+2  A: 

Back in the mid-80s I wrote a very basic C++ interpreter on the Commodore 64 in Commodore Basic. If I recall, it would take as input some very limited C++ code and then step through the code. Not sure why I did it and it wasn't very useful, but interesting none-the-less.


I used XSLT to interpret a stylesheet language.

I'll break that one up a bit.

  • I defined with a document model inspired from docbook, then started implementing XSLT stylesheets to render it to HTML and LaTeX.
  • Then I found I wanted a template language too, so I could have separate web page templates in which to inject my XSLT-generated HTML.
  • So I designed a simple template language with injection points for predefined values.
  • Then I found that I wanted to have factorized and reusable widgets to attach to the injection points. Such as fancy table of contents, indices, outliner-style site maps, etc.
  • So I designed a widget language that was interpreted in XSLT to generate content to inject into the templates.

I learned a few things from this venture, but one most of all: young enthusiastic students in software engineering have almost unlimited hacking energy. What they need most of all, and too often lack, is an experienced mentor to help them make good use of it.



+9  A: 

My teacher told us to write a useful program using recursion. I wrote a zombie apocalypse simulation program that would figure out how many humans would be converted into zombies and how many zombies would be killed each day.

By my calculations, my town would survive a zombie attack, but only 6 people would survive.

Jason Baker
I could use that. I'm about to start working on a zombie computer game. How long ago was this program written?
Chris Lutz
+1  A: 
+86  A: 

I'm not sure if this qualifies but....

In college, I had a professor who was trying to make a joke (I'm quite sure nobody laughed). But, as we were handing in our latest programming assignments (a .Net GUI app that drew some things on the screen - nothing fancy) he said, 'For extra credit - you can write a program that will grade all of these!' (referring to the 30-something assignments sitting on his desk).

Naturally, being somewhat a class clown; I took him at his word. This was a Tuesday and our next class met on Thursday.

My program would run through all of the .exe's in a particular folder, 'test' and 'grade' them. The directions for the assignment were obnoxiously direct; to the point of telling you exactly what to name each control on the form. I was able to use Win32 API calls to determine if those buttons really did exist. Then it would perform a mouse click and verify that the shapes that were supposed to be drawn on the screen were actually being drawn by using 'GetPixel' along with some logic to determine what shape it was.

It was certainly hack-ish; and rushed - but I was quite proud of myself.

I cleaned up the code and printed the source and put it in one of them 'I spent $1.00 on plastic, therefore whatever paper is in here must be important' things from the student center.

I showed up to class on Thursday after pulling an all-nighter to get it finished. If I'd only spent that much time working on actual assignments. Class began...after about five minutes I interrupted and asked if he would be collecting the Extra Credit assignment today? He looked confused and asked, 'What extra credit'. It was pretty classic. I said, 'The assignment grading program!'.

He took the assignment and continued on with class. That evening I received an e-mail from him asking me to stop by his office on Friday. I did, and he offered me a graduate assistanceship (IE - no tuition to go to graduate school + monthly stipend to assist a professor).

In terms of 'dollar per hour' it was the most productive programming I ever did.

Rob P.
Wow... That is amazing!
this the best one great work !
That's quite amazing!
Maiku Mori
Inspiring story indeed! +1

A web-controlled lava lamp, with live webcam. This was 1998, so this wasn't exactly revolutionary, but it was fun.

I emailed the link out, and was near-instantly greeted by a violent flurry of clicks from under my desk; the switch that drove the lamp contained a mechanical relay.


A program that did HTTP GET in Dell Outlet page and sought cheap notebooks!


I guess for me it would be a little "game" I made called "Be The Wumpus." It's pushing things to call this a game, it's really just a goofy liitle project I did for fun. The game has no text or graphics, only audio. You're a blind, cave dwelling wumpus. By means of sound alone, (and, ok, a little xbox 360 gamepad rumble effect as well) you seek out and devour the unlucky wumpus hunters who fall into your lair. bethewumpus.sourceforge.net


Back in the mid-80's I was doing a school project for an algorithms class, and found myself wanting three different sorting algorithms to emphericaly test and plot the runtimes of. Given my penchant for doing things the hard way, I wanted each to have a different time behavior.

O(n^2) and O(nlgn) are easy (bubble sort and pick your nlgn sort), but I was totally stuck for a third. I didn't want to just write the program to do busy work, I wanted an actual productive sorting algorithm that was worse than O(n^2).

The idea I finally hit on was writing an algorithm that systematicaly goes through every permutation of the ordering of the input ( O(n!) IIRC), then checks it to see if it is sorted. I believe I called it "Permutesort" in the paper. I figured it is probably the worst possible algorithm for sorting (that doesn't do non-sorting work), but as an undergrad I had no interest in doing the math to prove that.

I turns out these days someone has done the math with a related concept (random sorting) and proven it. They now call that algorithm bogosort. Bogosort isn't systematic though, so I still think my horrible sorting algorithm is far superior. :-)


A few years ago I wrote an Applescript that made QuarkXpress construct a Photo Mosaic (an image made of tiny images).

+1  A: 

This is not me, but I think this kid will go places: The Upside-Down Ternet

Suvesh Pratapa

In high school I had to write a Foxpro manual. The assignment was to make us enhance our touch typing skills... I didn't wanted to write that much, so I opened word and wrote a neat VBA script to open a help file, open the index, copy the content of every section and paste it on the current document. After that, remove all the soft carriage returns and apply some formatting.

All I had to do after that was put the header and footer. And wait one week until the due date :-D

The Disintegrator
+17  A: 

When I was in college, one of the other CS students claimed to have found a vulnerability in the way Novell authenticates passwords on the network, and backed it up by telling me (correctly) my network password, which I promptly changed.

But a while later, I noticed that, on some of the computers in some of the computer labs, my first login attempt would always fail, no matter how carefully I typed my password.

I did some poking around. This was back in the DOS-and-Windows-3.11 days, and the Novell login app was a text-mode DOS app. I found that what he had really done was to write his own DOS app that looked like Novell's login screen, and added it to Autoexec.bat on some of the computers. After you typed in your username and password, his app would say "bad password", then exit back to Autoexec.bat, which would continue on to the real Novell login app. But not before his app had saved your login and password to a hidden, semi-ROT13-encrypted file.

So I wrote an app of my own, saved it in my home directory on the network, and set it to run every time I logged in from any computer in the network. My app would look for his password file on the local hard drive, hunt through it looking for my login name, and replace my ROT13-ed password with characters that, when decrypted, would be a long sequence of BEL characters.

Never did hear if he found my app, but I like the mental image of him frantically hitting Ctrl+Break so that everyone else in the lab, looking to see why his computer is making all that racket, doesn't catch him with his list of hacked passwords onscreen...

Joe White
+1 for proper use of ASCII 7 :)
Awesome man-trap!
+1  A: 

Two, actually, in the same vein.

The Data General Nova minicomputer (in 1969) had lights showing the 16 bit address and data on the bus during each clock cycle. This was great for debugging with a single step switch. Normally these lights were on in rather random patterns for each step. When the machine ran full speed, you got a smear in the lights from the analog integration of the digital bits as the incandescent lights tried to switch on and off at 1 Mhz, the machine clock speed.

There were also switches on the front panel, so one could toggle in a boot strap loader program in binary. To get the machine to work, you typically had to toggle in about 10-12 16 bit words, which was enough to read in a bigger program from the paper tape reader, etc. To use the machine, you had to be pretty good at toggling in these boot programs. When truly bored, we toggled in small programs to make the machine do odd things (can you believe I got paid to do this? Boy, was 1970 fun). The contest that kept our wasted attention was toggling in programs whose sole purpose was to zero out memory completely, including the boot program toggled in. If you succeeded, the 0 words everywhere was interpreted as JMP 0, and all the lights went out, which made the machine look like it had died. Nobody won the contest, but I succeeded in zeroing out all but one bit, leaving just one bit in the data register display smeared on. There just had to be a way to get that last bit off, I thought.

My real job was building a 16 user timesharing system for the machine. That's a whole story in itself that might qualify for this contest because we only had 8k words of memory and a 200Kb hard disk to swap to, but I'll let this pass. The timesharing system I built, when running, would produce a smear in the address and data lights on the front panel. You could tell what the OS was doing by the nature of the smear: this smear, idling in scheduler, that smear, loading a program, changing smear, doing work. Of course, as you got further away from the machine it was harder to tell what the smear was.

The zero-all-of-memory bootstrap contests suggested it might be possible to turn out all the lights, and in a 2 am burst of madness, I implemented this idea for when the scheduler was idle. (The way this worked, was when idle, the scheduler parked a 0 word in location 0 and jumped to location zero. A 0 word conventiently turned out be a "JMP TO 0" instruction. Consequently, the address and data lights all contained zero, so all the front panel lights went out. Interrupts with work got it out of this state). Having gotten it to work at 5 am I went home. Didn't tell anybody what I had done (yawn!)

I recieved a panicked phone call from the computing facility operator at 10 am the next day (the reward of the devils' work, so much for sleeping). He was frantic, because the machine lights were all ought, but the system appeared to be working. He thought he was going crazy.

I explained the trick, and he was greatly relieved.

I modified the code to toggle the carry bit every one second, so people could see some life.

I did get another call from the operator, who understood the basic trick, but I never did tell him how I got the carry bit to blink. He could never figure out how that JMP 0 instruction could do that. It didn't; I used the clock interrupt. Cheaters prosper.

But it was thereafter easy to tell when the machine was idle. The front panel blanked, with a blinking carry bit.

Too bad we have spend most of our work time doing more constructive things. That was a fun job for a geek.

Ira Baxter

Bloons Pop 3 game analyzer. It's not unbeatable, but I can generally get the month's highest "legitimate" score (no protocol or memory hacking) on the first try. It was a serious challenge in interpreting partial data since its only input is a screenshot of the web browser (just like a user has).

I thought about releasing the source except for the move decision logic as a challenge to see if anyone can beat it. :o

Edit: It took about 3 weeks, with 2.5 being tuning the decision algorithm.


In one of my fits of "what project shall I do next?", I once decided to clone the major applications in Microsoft Windows... wait for it.... 3.1. Yes, that included a fully working calc, calendar, clock, rolodex, notepad, etc clone army.

I have to admit: most did look pretty similar/identical to their predecessors.

Andrew Szeto
+2  A: 

I once played a LPmud called Genesis, and in this mud I was a fearsome priest of Takhisis (a really evil queen from the Dragonlance books).

All those priests used to mail really fancy ASCII art letters to each others by mail, and it really was a lot of work to create the same letters. But hey, thats what roleplaying is all about..

Being the lazy person I am, I said to myself.. I can code my own ASCII art editor.. Saves me a whole lot of trouble, and I can reply really fast as a priest in game, with a really fancy mail!

So I coded a crappy Java app with the letter design the priests used:

    /'\                                                          \
   |   |                      Letter example                      |
   | \/__________________________________________________________/
   |                                                          |
    \                                                          \ 
     \                                                          \
     |                  Greetings Stackoverflow                 |
     |                                                          |
     |                                                          |
     |   Here is an example letter from my ASCII letter         |
     |   creator of old...                                      |
     |                                                          |
     |                                                          |
     |   Greetings,                                             |
     |                                                          |
     |         Arcturus, the Stackoverflow undergraduate        |
     |                                                          |
      \                                                          \
     _ \                                                          \
    / \ |                                                          |

Then it got a bit carried away actually.. I ended up adding 29 other ASCII designs, all which could be used with different headers, bodies, signatures.. you name it..

Here are some of my favorites:

 `=\/\ __...--~~~~~-._   _.-~~~~~--...__
  `=\/\               \ /               \\
   `=\/                V                 \\
   //_\___--~~~~~~-._  |  _.-~~~~~~--...__\\
  //  ) (..----~~~~._\ | /_.~~~~----.....__\\
 ===( INK )==========\\|//====================
||                                                                     ||
||                           Letter example                            ||
||                  --------------------------------                   ||
||                                                                     ||
||                       Greetings Stackoverflow                       ||
||                                                                     ||
||                                                                     ||
||  Here is an example letter from my ASCII letter creator of old...   ||
||                                                                     ||
||                                                                     ||
||  Greetings,                                                         ||
||                                                                     ||
||              Arcturus, the Stackoverflow undergraduate              ||

                                                              /  .  \
                                                             |\_/|   |
                                                             |   |  /|
  .----------------------------------------------------------------' |
 /  .-.                                                              |
|  /   \                                                             |
| |\_.  |                                           Letter example   |
|\|  | /|                                                            |
| `---' |                                                            |
|       |                   Greetings Stackoverflow                  |
|       |                                                            |
|       |                                                            |
|       |   Here is an example letter from my ASCII letter           |
|       |   creator of old...                                        |
|       |                                                            |
|       |                                                            |
|       |   Greetings,                                               |
|       |                                                            |
|       |          Arcturus, the Stackoverflow undergraduate         |
|       |                                                            |
|       |                                                           /
|       |----------------------------------------------------------'
\       |
 \     /

            ^^                   @@@@@@@@@
       ^^       ^^            @@@@@@@@@@@@@@@
                            @@@@@@@@@@@@@@@@@@              ^^
 ~~~~ ~~ ~~~~~ ~~~~~~~~ ~~ &&&&&&&&&&&&&&&&&&&& ~~~~~~~ ~~~~~~~~~~~ ~~~
|~         ~~   ~  ~       ~~~~~~~~~~~~~~~~~~~~ ~       ~~     ~~ ~     |
|  ~      ~~      ~~ ~~ ~~  ~~~~~~~~~~~~~ ~~~~  ~     ~~~    ~ ~~~  ~ ~~|
|  ~  ~~     ~         ~      ~~~~~~  ~~ ~~~       ~~ ~ ~~  ~~ ~        |
|~  ~       ~ ~      ~           ~~ ~~~~~~  ~      ~~  ~             ~~ |
|      ~             ~        ~      ~      ~~   ~             ~        |
|                             Letter example                            |
|                                                                       |
|                         Greetings Stackoverflow                       |
|                                                                       |
|                                                                       |
|   Here is an example letter from my ASCII letter creator of old...    |
|                                                                       |
|                                                                       |
|   Greetings,                                                          |
|                                                                       |
|                Arcturus, the Stackoverflow undergraduate              |
|                                                                       |
|             |    |    |                                               |
|            )_)  )_)  )_)                                              |
|           )___))___))___)\                                            |
|          )____)____)_____)\\                                          |
|        _____|____|____|____\\\__                                      |
|    ~   \                   /  ~    ~  ~                 ~    ~        |
|        ~      ~      ~        ~   ~     ~      ~   ~       ~      ~   |
|~     ~     ~      ~     ~      ~      ~      ~    ~      ~       ~    |
~~~~ ~~ ~~~~~ ~~~~~~~~ ~~ ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ ~~~~~~~~~~~ ~~~~~

   o          <M
  /| ......  /:M\------------------------------------------------,,,,,,
 -\| ^^^^^^  \:W/------------------------------------------------''''''
|  o          <W                                                 | 
|             <W                                Letter example   |
|             (O)                                                |
|                                                                |
|   Greetings Stackoverflow                                      |
|                                                                |
|                                                                |
|   Here is an example letter from my ASCII letter creator of    |
|   old...                                                       |
|                                                                |
|                                                                |
|   Greetings,                                                   |
|                                                                |
|            Arcturus, the StackOverflow undergraduate           |
|                                                                |

                             /   \
 _                   )      ((   ))     (                    _
(@)                 /|\      ))_((     /|\                  (@)
|-|'\              / | \    ( \|/ )   / | \               /'|-|
| | --------------/--|-voV---\`|`/--Vov-|--\----------------| |
| |                    '^`   (o o)  '^`                     | |
| |                           \Y/                           | |
| |                                                         | |
| |                     Letter example                      | |
| |                      -------------                      | |
| |                 Greetings Stackoverflow                 | |
| |                                                         | |
| |                                                         | |
| |   Here is an example letter from my ASCII letter        | |
| |   creator of old...                                     | |
| |                                                         | |
| |                                                         | |
| |   Greetings,                                            | |
| |                                                         | |
| |        Arcturus, the Stackoverflow undergraduate        | |
| |                                                         | |
| |_________________________________________________________| |
|-|'/       l   /\ /          ( (       \ /\   l          `\|-|
(@)         l /   V            \ \       V   \ l            (@)
            l/                 _) )_          \I"

                   _,----,_                      _,----,
             ___,-'     /'  ____________________  `\     `-,___
             |,'       {,-~~-,               ,-~~-,}       `,|
             /       _/',-~~-(\,)         (,/)-~~-,`\_       \
           ,'   ,-,/'{ (     {vv}         {vv}     ) }`\,-,   `,
          , ,-,/      \ \     }{           }{     / /      \,-, ,
          ;/ |         ) }   (^^)         (^^)   { (         | \;
,,,,,,_,-~~-,_,-~~-,_,/ /                         \ \,_,-~~-,_,-~~-,_,,,,,,
''''~-,,-~~-,_,-~~-,_,-'                           `-,_,-~~-,_,-~~-,,-~````
             |                                               |
             |                                               |
             |                Letter example                 |
             |                                               |
             |            Greetings Stackoverflow            |
             |                                               |
             |                                               |
             |   Here is an example letter from my ASCII     |
             |   letter creator of old...                    |
             |                                               |
             |                                               |
             |   Greetings,                                  |
             |                                               |
             |   Arcturus, the Stackoverflow undergraduate   |
             |                                               |

Some even had some random elements, so not every letter would look the same:

/                                                          /__  \
\                                                          |(_\ /
/                                                          \-`-'
|                      Letter example                      |
{                  Greetings Stackoverflow                 }
\                                                          }
{                                                          /
\   Here is an example letter from my ASCII letter         |
/   creator of old...                                      {
/                                                          /
|                                                          }
\   Greetings,                                             /
{                                                          \
|         Arcturus, the StackOverflow undergraduate        {
|                                                          {____
}                                                          |__( \
\                                                          \    /

Some people were on to me eventually, so I shared my little application with fellow guild members.. I think they are still using today.. :)

COMMERCIAL WARNING: Genesis was really nice.. you should check it out ;)

This is clever. You dont have the source posted somewhere do you?
Hmm no.. I could send it to you though! :)

Quick 'n dirty audio delay / feedback effect on a Sun workstation, mildly amusing practical joke as it takes a while for colleagues to work out where the echo is coming from...

cat < /dev/audio > /dev/audio
(defun bp-folgers-crystalize ()
  "secretly replaces the meta-sytactic variable foo with folgers_crystals"
  (let (
    (i (point)))
    (while (search-forward "foo" nil t)
      (replace-match "folgers_crystals" nil t))
    (goto-char i)))


Brian Postow

To relieve boredom at work: wrote an instance message chat-server (many-to-many): the main feature being that it used Microsoft Speech SDK to speak the messages out loud.

It was dead fun; because you leave yourself logged in and listen to music on headphones as normal: then randomly throughout the day, you can trade swear words and insults with colleagues - all spoken faithly in individually parameterized voices...


Wrote few TSR programmes in C for DOS. One of them drops character while using DOS apps.

this. __curious_geek

On behalf of for , I wrote a VBA program; for users to enter text for teletype (yes, clackety-clack-buzz-buzz-teletype) format, and then stored those messages in an Oracle database (which was a backend for a different app, that was being used for the actual sending of the teletype messages to the printout machines). The VBA app also made a copy of the teletype message to an MS Word document, (formatted to a rigorous military spec), and could also parse these documents to read them back; part of the structure of the document went to Oracle, to feed the management app (ran on PPC AIX). The Word document also went to a document management system, managed by a client dll on the Windows side.

Anyway, the teletype format was pretty ancient, and was limited to so many columns and rows, and certain characters were control characters, so you can imagine how awful it was, using just the standard Microsoft VBA rich-text-box control, where the user can enter just about anything, and you can't do a damn thing to stop them or validate-out their control characters (the operators were used to entering them literally, on the physical teletype system - old habits die hard), or enforce any kind of characters-per-row limit (depending on what scaled-font they're using).

So I finally solved all those issues, and halfway through the dd-250 process, the agency decides they want to upgrade to the "new" teletype data standard (which is actually like 30 years old, at that point, as opposed to the 50 year old spec they originally had me coding to).

Oh yeah, and they wanted to be able to email these teletype messages too. Oh yeah - none of these systems were allowed to be connected to any kind of external network for email connectivity anyway. (the ONLY external connection was the outbound serial link to the teletype).

Can you say; "contract management?"


I wrote a program that deleted the binary it was run from, having first overwritten it with 0x55's and 0xAA's to make sure it couldn't be "undeleted".

And I wrote a Brainfuck compiler in 99 bytes. That is, the binary was a 99-byte MS-DOS executable. Well I guess that's not as weird after all.


I got a class assignment to write a shell script - any shell script. So I wrote markov-chain text generator in bash. It was slow, but it worked.


when I was learning TI-BASIC due to being bored in class, I got bored of not being able to do two things:

  1. Can't directly edit strings and convert them to numbers
  2. Can't use pointers.

So, I created my own (limited) character set to solve the string issue. And implemented it with a huge list of IF statements (lists wouldn't work). In the end, I could give it a list of numbers and it'd convert it to a string. (very slowly)

The other thing I did to solve the no pointer thing, I created a project I called SVIS. I can't remember what it stood for, something about super small instruction set though. Basically, it used lists to contain opcodes. And it had multiple segments, so in the end, it was capable of addressing I think like 512 values (floating points of the TI) including imaginary numbers. It was even complete with a stack and call and basic maths. I believe it was Turing complete by the time the school year was over... And then I realized how much time I'd wasted on it and why my Math grade for that year sucked.


The first program I did for fun: A dice thrower for Earthdawn, in VB6. You would tell it the step (or level), it would determine which dices to throw, re-roll on max, and display all individual resolve. The dices per step were (hardcoded):

  1. 1d4-2
  2. 1d4-1
  3. d4
  4. d6
  5. d8
  6. d10
  7. d12
  8. 2d6
  9. 1d8 + 1d6
  10. 1d10 + 1d6
  11. 1d10 + 1d8
  12. 2d10
  13. 1d12 + 1d10
  14. 1d20 + 1d4



A friend of mine (who isn't on SO) did this at a previous job (at an ISP):

  • Hacked the phone system so that tech support could deprioritise clueless callers.
  • Built a system to collect coffee/drink/snack orders from the people in his department using IM, then pinged a person in the department on a round-robin basis using IM to tell them to go and make the drinks. In the kitchen was an old piece of networking equipment with a little blue LCD display on it which would cycle through everybody's orders. About fifteen minutes later, it would ping everyone who had ordered tea or coffee to rank whether or not the person had done a good job preparing them and then produce a leaderboard.

Obviously, the code for the latter may be rather strange. About a year or so after my friend explained this to me, he was made redundant. I like to think it was because management found out about the coffee hack and decided that if they were employing enough people that they spent their time building stuff like that, they could probably downsize. ;-)

Tom Morris

Imagine the following situation:

It's 04:30 am, you are working with a team of RAD - victims at the customers place to fix the last problems (early 2000s, I have to add) - and you find out that you lack one "Ethernet to RS232" - converter.

Hm, the RAD - guys were clueless, there was this smell of "we failed, epically" in the air.

However, I just sat there and created this 5 line of code - program in VB 6.0. Called it "eth2ser" while they still called Cassandra and all that.

Turing Complete

Since there is only one program per answer, here another one.

80s, me doing Turbo Pascal 2.0 (or was it 3.0, not sure...), trying to understand Charles Darwin.

So, what I wrote was a program where you enter a string and the program iterates through characters, position by position, until it gets the string you entered and then tells you the number of iterations.

Added what we would call about 10 years later the "strategy pattern" to implement various strategies for evolution and compared them.

Was quite a show with the r** n*** in my family who claimed "zomg evolution can't be, because life can't be random". Science won. :-D


Turing Complete