PDA

View Full Version : Programming - shooting yourself in the foot.



yanom
September 16th, 2011, 03:05 AM
Someone on some other forum wrote this interesting manual on how to shoot yourself in the foot in various programming languages:

C
You shoot yourself in the foot.

C++
You accidentally create a dozen clones of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."

JAVA
After importing java.awt.right.foot.* and java.awt.gun.right.hand.*, and writing the classes and methods of those classes needed, you've forgotten what the hell you're doing.

Ruby
Your foot is ready to be shot in roughly five minutes, but you just can't find anywhere to shoot it.

PHP
You shoot yourself in the foot with a gun made with pieces from 300 other guns.

ASP.NET
Find a gun, it falls apart. Put it back together, it falls apart again. You try using the .GUN Framework, it falls apart. You stab yourself in the foot instead.

SQL
SELECT @ammo:=bullet FROM gun WHERE trigger = 'PULLED';
INSERT INTO leg (foot) VALUES (@ammo);

Perl
You shoot yourself in the foot, but nobody can understand how you did it. Six months later, neither can you.

Javascript
You've perfected a robust, rich user experience for shooting yourself in the foot. You then find that bullets are disabled on your gun.

CSS
You shoot your right foot with one hand, then switch hands to shoot your left foot but you realize that the gun has turned into a banana.

FORTRAN
You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of bullets, you continue anyway because you have no exception-handling ability.

COBOL
Using a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER. on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied.

LISP
You shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds ....

BASIC
Shoot yourself in the foot with a water pistol. On big systems, continue until entire lower body is waterlogged.

Pascal
The compiler won't let you shoot yourself in the foot.

Unix
% ls
foot.c foot.h foot.o toe.c toe.o
% rm * .o
rm: .o: No such file or directory
% ls
%

Visual Basic
You'll shoot yourself in the foot, but you'll have so much fun doing it that you won't care.

Ada
After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type.

Assembly
You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. After that's done, you pull the trigger, the gun beeps several times, then crashes.

Python
You try to shoot yourself in the foot but you just keep hitting the whitespace between your toes.

dniMretsaM
September 16th, 2011, 03:27 AM
Got a good laugh out of this! :lolflag:

CharlesA
September 16th, 2011, 03:30 AM
Lol. I like the python one.

sammiev
September 16th, 2011, 03:38 AM
Now that's funny! :popcorn:

mmsmc
September 16th, 2011, 03:44 AM
haha, loved the java one :D

Lucradia
September 16th, 2011, 04:41 AM
Apparently Chuck Norris uses PHP.

Pynalysis
October 4th, 2011, 09:33 AM
Liked the Python one.