Friday, July 03, 2009


I have found an idea to post things on Fridays. I am going to find a something geeky funny on line and explain it so that other people can appreciate the geeky and funniness. My first post is from The Daily WTF and is called The Program Accelerator. Please take a minute to read it over… you are probably wondering why this is funny right about now or more importantly wondering why she is trying to copy information from a program.

First thing I want to explain is ./a.out. Computers and humans speak different languages. I write a program using code that then goes through an assembler to form the binary data that tells the computer what to do. I have the option of telling the assembler what I want the name to be but if I don't there is no reason for my assembler to not do its job if I don't and a.out
is the default name for assembly output. Lost yet? I am going to get to control-c at the end so if you want to skip over this it's ok. Every time the article mentions a.out he puts a "./" in front of it. The "." at the beginning represents the current working directory. File names can get long and confusing. Instead of making the user type it out every time they want to run a program or work inside the current directory the operating system default of a directory named "." is whatever directory you are typing the command in at the command prompt. Every time the user types ./a.out it they are telling the operating system "try to execute the file name a.out inside the file I am currently inside"

Next the article mentions "cat'd" and I can see people worrying about strange things being done to cats with a computer but I assure you no cats were hurt in the writing of this post. cat is short for concatenate which basically means link things together. When you type cat and then a file name on a command prompt the command will display the contents of the file you specified. cat'd is the action of performing a cat command on a file.

Finally the moment you have all been waiting for what is Control-C doing that makes this joke so funny? At a command prompt the keyboard shortcuts are very different Control-Z will not perform an Undo action like most of your word processors these days it will tell the command that you are running to go into the background (this is kind of like pausing). Control-C on the other hand means stop the program entirely no if, ands, or buts about it. So the reason why the student's % prompt kept coming up quicker after she typed Control-C is because she was ending the program quite prematurely. Thus she got her command prompt "%" back and her output was not fully created.

Well I know a joke isn't funny if it has to be explained but I wanted to see if this would be something fun. If there were other confusing terms or concepts that you would like defined leave a comment about it!

No comments: