Heal Your Church WebSite


Teaching, rebuking, correcting & training in righteous web design.

Selecting a Programming Language

Seeing as that I’ve got all these visitors from /. over Shelley’s very cool article entitled “The Parable of the Languages“, I figured I’d throw-down some old-school grins of my own and revive the following article I first posted back in July.

First let me say how much I appreciate you tech bloggers. Not only have you had the patience to deal with me changing servers, but on the one or two instances when you disagree with me on an issue, you do it in a civilized and reasonable fashion. I love you all for that more than you know.

Okay, gushing side. Here is a reward for your patience and professionalism. What you are about to read is a total rip-off of a thread that has been tossed about the usenet for years, originally attributed by everyone’s favorite online author, Anonymous. And like a good bean-burrito, and bears repeating.

So without any further adieu (you’ve just seen the limits of my French), I offer you:

Mean Deans Semi-Definitive Guide to Selecting a Programming Language.
Introduction

With the proliferation of modern programming languages which seem to have stolen countless features from each other sometimes makes it difficult to select a which language appropriate for your task. This guide is offered as a public service to help programmers in such dilemmas.

The key to this guide is to remember its one and only easy-to-remember and abide-by criteria – Shooting Yourself in the Foot.

C:         You shoot yourself in the foot.
 
C++:       You accidently create a dozen instances of yourself and shoot them
           all in the foot. Providing emergency medical care 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."

C#:        The gun fires just fine, but your foot can't figure out where
           the bullets are and ignores them. 

Java:      The gun fires just fine, but your foot can't figure out what
           the bullets are and ignores them. 

Ada:       If you are dumb enough to actually use this language, the United
           States Department of Defense will kidnap you, stand you up in
           front of a firing squad, and tell the soldiers, "Shoot at his
           feet."
 
Algol:     You shoot yourself in the foot with a musket. The musket is
           esthetically fascinating, and the wound baffles the adolescent
           medic in the emergency room.
 
APL:       You hear a gunshot, and there's a hole in your foot, but you
           don't remember enough linear algebra to understand what happened.
 
Assembly:  You crash the OS and overwrite the root disk. The system
           administrator arrives and shoots you in the foot. After
           a moment of contemplation, the administrator shoots himself
           in the foot and then hops around the room rabidly shooting
           at everyone in sight.

80x86 
Assembly:  The gun isn't in the same segment as your feet, 
           so you can't shoot them. 
 
BASIC:      Shoot self in foot with water pistol. On big systems, continue
           until entire lower body is waterlogged.
 
COBOL:     USEing a COLT45 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.
 
dBase:     You squeeze the trigger, but the bullet moves so slowly that by
           the time your foot feels the pain you've forgotten why you shot
           yourself anyway. 
 
dBase IV version 1.0: You pull the trigger, but it turns out that the gun
           was a poorly-designed grenade and the whole building blows up.

XBase:     Shooting yourself is no problem. If you want to shoot yourself in
           the foot, you'll have to use Clipper. 

Clipper:   You grab a bullet, get ready to insert it in the gun so that you
           can shoot yourself in the foot, and discover that the gun that the
           bullet fits has not yet been built, but should be arriving in the
           mail _REAL_SOON_NOW_.
 
Forth:     yourself foot shoot.
 
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-
           processing ability.
 
Modula/2:  After realizing that you can't actually accomplish anything
           in the language, you shoot yourself in the head.
 
sh, csh, etc.:
           You can't remember the syntax for anything, so you spend five
           hours reading man pages before giving up. You then shoot the
           computer and switch to C.
 
Smalltalk: You spend so much time playing with the graphics and windowing
           system that your boss shoots you in the foot, takes away your
           workstation, and makes you develop in COBOL on a character
           terminal.
 
PL/I:      You consume all available system resources, including all the
           offline bullets. The DataProcessing&Payroll Department doubles
           its size, triples its budget, acquires four new mainframes, and
           drops the original one on your foot.
 
Prolog:    You attempt to shoot yourself in the foot, but the bullet, failing
           to find its mark, backtracks to the gun which then explodes in
           your face.
 
PowerBuilder:    
           While attempting to load the gun you discover that the LoadGun 
           system function is buggy; as a work around you tape the bullet 
           to the outside of the gun and unsuccessfully attempt to fire it
           with a nail. In frustration you club your foot with the butt of the
           gun and explain to your client that this approximates the 
           functionality of shooting yourself in the foot and that the next
           version of Powerbuilder will fix it. 

SNOBOL:    You grab your foot with your hand, then rewrite your hand to
           be a bullet. The act of shooting the original foot then
           changes your hand/bullet into yet another foot (a left foot).
 
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...
 
scheme:    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...
           ...but none of the other appendages are aware of this happening.
 
English:   You put your foot in your mouth, then bite it off.
 
SQL:       You cut your foot off, send it out to a service bureau and when it
           returns, it has a hole in it, but will no longer fit the
           attachment at the end of your leg.

pre .Net
Visual 
Basic:      You'll appear to shoot yourself in the foot, but have so
            much fun doing it that you don't care. 

VB.Net:    You write about 100 lines of code to print "Hello, world!" in a 
            dialogue box, only to have a UAE pop up when you click on OK. 
            This shuts down the program manager, leaving you nothing but a
            screensaver. You then fly to Washington where Bill Gates shoots
            you 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 
           % 

Edit/Add to the list

Okay boys and girls, now its your turn. Use the comments section to add, ammend and/or agonize over your favorites. There will be no prizes or awards for the best one, other than the geeky admiration of your nerds-in-arms.

21 Comments

  1. To stick with the theme of your website, should do the same type of list, but for HTML editors. To wit:

    Frontpage: Doubleclick foot image, add bullet hole in Image Composer. Save page and publish site. Professional webdesigner shoots you in the foot.

    Dreamweaver: Click on foot image, click button to edit in Fireworks. Wait for Fireworks to load. Stop waiting, shoot self in foot.

    Notepad: Hand-write HTML including image tag. Save file. Preview. View source of previous version. Edit file. Save. Preview. Repeat until wife shoots you in the foot.

  2. And perhaps with operating systems…
    Mac os X: Click on Shoot foot program even though it’s designed for windows, program runs, gives message “right click to continue”, right click attempt fails due to stupid mouse design. Drop mouse on foot
    Unix: Shoot foot program runs fine, no problems or errors, no one hacks it. It loads much faster than expected, user is making coffee in expected wait. Foot Shoot program misses foot.
    Windows 98: Double click “shortcut to shoot foot” program fails, program crashes, reboot, error in registery, reinstall windows. Give up with whole foot shooting program and go back to using a pen and paper
    Windows 2000: Shoot Foot program fails, Contact Server Adminstrator
    Windows XP: Cannot find Shoot Foot Program. Reveal Hidden Files, Are you sure, yes, Run Shoot Foot Program, are you sure, yes. Shoot Foot requires activation, do you wish to activate, yes. Bill Gates prevents you from doing this. Bill Gates Shoots you in Foot. Any attempt to sue fails due to small print in manual reading, “bill gates can shoot you in the foot if you install this software”

  3. Perl: You shoot at your foot. Or you could put your foot in the way of a bullet. Or shoot up in the air and have the bullet land on your foot. Any way you choose to do it, you’ve shot yourself in the foot.

  4. Verilog: Create a status register. You’ll have to wait until the next clock cycle to determine if your foot has been shot, because the gun fires in parallel with your other modules.

  5. Adieu means “Goodbye forever”…

    Without any further goodbye forever?

    Hummm ;)

  6. You actually think its fun to program in VB?

  7. Caml:
    let rec shoot body_part =
    match body_part with
    foot::tl -> Printf.printf “Foot shot”; shoot tl
    | _::tl -> shoot tl
    | _ -> ();;

  8. C: You shoot yourself in the foot. While you were shooting a buffer overflow allowed a worm to infect your gun causing the other five bullets to fire, hitting guns running on other systems. Repeat until gun name lookups fail because of DDOS attack on root-nameserver-gun.

  9. RISC-type assembler:
    (0) Load R1 with address of gun.
    (1) Load R2 with address of foot.
    (2) Load indirect word in R2 into R3.
    (3) Load R4 with offset of bullets within gun structure.
    (4) Add R4 to R1.
    (5) Check R1 for word alignment. Realize it is not word-aligned.
    (6) Subtract from R1 up to nearest word.
    (7) Load indirect R5 from address pointed to by R1 with indexed address of 0 to select bullet #0.
    (8) Bit shift R5 to put bullet into least significant byte.
    (9) AND mask R5 with $FF to select only bits representing bullet.
    (A) Use one of 78 different methods of indirect addressing to apply R5 to address of foot in R2.

  10. Python:
    You try to shoot yourself in the foot, but the number of tabs is wrong, so you shoot yourself in the ass instead.

  11. PHP:

    <?php

    include (“gun.php”);
    include (“foot.php”);
    global $gun, $foot;
    $gun->fire($foot);

    ?>

    Oops, you forgot to get the bullets from the SQL server.

  12. ASP:
    dim blnFootShot
    set objGun = server.createobject(“Amoury.Pistol”)
    set objBody = server.createobject(“Anatomy.Body”)
    if not objGun.loaded then
    objGun.load(objBullet)
    end if
    for i = 0 to (body.parts.length -1)
    if not body.part.name = “foot” then
    gun.safety = false
    gun.fire
    gun.rackSlide
    gun.load(objBullet)
    blnFootShot = true
    else
    gun.safety = true
    blnFootShot = true
    end if
    If blnFootShot then
    response.write “Your feet have been shot. Thankyou for using our fott shooting service. Please return to our homepage for more servcies”
    else
    response.write “Your foot was not shot. The system could not find you foot. We apologise for any inconvenience casused. If you find that any other body parts were shot by mistake, please contact the webmaster.”
    end if

  13. Red Hat: You try to edit an initialization script, then discover that the gun was installed by default. It shoots you in the foot next reboot.
    Mandrake: You select the “weapons” group. There is no way to avoid selecting the gun without breaking each and every dependancy in the system. Sooner or later you remove a package that causes you to be shot in the foot.
    Debian: You select the wrong calibre during setup. On reboot, your gun explodes, removing your entire lower leg.
    Slackware: You forget to tell the system that you want to upgrade your gun and accidentally install another one over the top of the original. You shoot yourself in both feet in frustration.
    Gentoo: You give a specification to a gun-maker who promises to build you the best gun possible. You get bored waiting and shoot yourself in the foot.
    FreeBSD: You keep loading bullets into the chamber because you can’t see how much space you have left. Eventually the gun jams and you throw it to the floor, breaking your foot on the way.

  14. Delphi: You shoot yourself in the foot with a gun as powerful as C++, but this time you can actually tell what happened.

  15. Eiffel: You would have shot your foot, but since that violates several preconditions, the operation fails.

  16. Erlang: You send a bullet message to your foot, but since your foot was not looking for bullet messages, nothing happens.

  17. AS/400, iSeries

    Load $2000 dollar bullet into $1,000,000 dollar gun. Point at foot and fire. Beautiful, reliable, expensive hole in foot.

  18. Fortran 95/2000/2003
    You compute complex vector sum and discover that having bullet riochet off wall starts the expantion process for your hollow point. You then calculate the optimal angle that takes all angles of incidence, densities, and velocities to calculate the matrix sum that produces the largest possable sized hole in foot.

    oops… forgot to calculate caliber, oh well … within a .005% tolerence range at least…

  19. C++:

    You forget to include ‘gun.h’ where you have created the class ‘Gun’. When you finally do, Gun::bullet turns out to be constant and cannot be passed by reference in Gun::shoot(Bullet &bullet). Compiler shoots you in the foot