SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Programming to shoot yourself in the foot

    How to write a program to shoot yourself in various languages. I have to admit that I blatently lifted this from another site.

    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.

    BASIC:
    Shoot self in foot with water pistol. On big systems, continue until entire lower body is waterlogged.

    C:
    You shoot yourself in the foot.

    C++:
    You accidentally 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."

    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_.

    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.

    English:
    You put your foot in your mouth, then bite it off.

    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.

    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...

    ML:
    You create a list of feet, and with a recursive function you shoot them all.

    Modula II:
    After realizing that you can't actually accomplish anything in the language, you shoot yourself in the head.

    PL/I:
    You consume all available system resources, including all the offline bullets. The Data Processing & 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.

    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.

    sh, csh, etc.:
    You can't remember the syntax for anything, so you spend five hours reading manual 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.

    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).

    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.

  2. #2
    SQA Knight
    Join Date
    Jan 2002
    Location
    Highlands Ranch, CO, USA
    Posts
    2,860
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    Geez Darrel, that was a blast from the past (dBase IV 1.0? - 1989). I saw this a while back (like years ago), glad to see it still gets some mileage. Really scared me when I saw Forth on the list (I started to learn it for a project, but then it got 'reappropriated' and I experienced my first layoff in the industry. Good thing at that time I was doing testing on the side for a roommates company and they hired me in in the Test group, and 17 years later I'm still doing this.)

    How about we update it for Java, C#, VB, J2EE and .NET? Any takers?

    Jim
    Jim
    -------------------------------------------
    For all the general stuff to know about QA/Test go here http://www.softwareqatest.com/

  3. #3
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    I think you are right - it needs updating.

    I posted it here because I am currently heavily involved with a cobol project (my first). I got a kick out of the cobol method.

    I'm also a former APL programmer, so got a hoot out of that one too.

    I'm thinking in VB you write a module to instantiate the gun, then another module to fill it with water, then an event which dips your foot in the tub when you pull the trigger.

  4. #4
    Moderator
    Join Date
    May 2001
    Location
    Michigan, USA
    Posts
    1,330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    What? No RPG? Come OOOOOONNNNnnnnnnn.... Here I was thinking you (Darrel) wuz OLD.

  5. #5
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    Well, I could go all the way back to my first program in BASIC - 1969.

    10 Let N$ = "Water pistol"
    20 Let I = 0
    30 For I = 1 to 10........

  6. #6
    Moderator
    Join Date
    Mar 2004
    Location
    West Coast of the East Coast!
    Posts
    7,756
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    Gee, is that Tandy Basic? If so, don't forget to back it up on your cassette after every line!
    Personal Comment

    Success is the ability to go from one failure to another with no loss of enthusiasm.
    ~ Winston Churchill ~


    ...Rich Wagner

  7. #7
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    Actually, in 1969, that was on an HP mainframe. I think it was HP anyway.....

    On an old 110 baud tty with an acoustic modem.....clunk, clunk, clunk

  8. #8
    Moderator
    Join Date
    Sep 2005
    Location
    Dublin, Ireland
    Posts
    1,878
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    VB:

    Take the smart looking chrome finished gun out of it's bejewelled leather holster. Remove the safety catch. Turn the gun around in your hand such that you are now holding the barrel. Repeatly club yourself in the foot with the muzzle until your toes are bloody and sore.

  9. #9
    Moderator
    Join Date
    Mar 2002
    Location
    Tampa Bay
    Posts
    7,673
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    Nice. Though the lisp example misses the opportunity to demonstrate the acronym "Lots of Isolated (or sometimes Irritating) Silly Paretheses." I don't have time to flesh out a really good example (indeed, the last time I looked at lisp was about 10 years ago), but the following is the general idea:
    fire(aim(identify(foot)))

  10. #10
    Senior Member
    Join Date
    May 2003
    Location
    Austria
    Posts
    1,480
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Programming to shoot yourself in the foot

    I just can add WinRunner:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">if (obj_exists(&quot;PistolAimingAtFoot&quot;,3) == E_OK)
    {
    move_locator_abs(triggerX, triggerY);
    mtype (&quot;&lt;T61&gt;&lt;kLeft&gt;-&lt;T100&gt;&lt;kLeft&gt;+&quot;
    if (obj_check_bitmap(&quot;Foot&quot;, &quot;bloodyFoot&quot;, 3) == E_OK)
    tl_step(&quot;ShootFoot&quot;,0,&quot;foot was hit!&quot;
    else
    tl_step(&quot;ShootFoot&quot;,1,&quot;missed due to unnkown failure!&quot;
    }</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Regards,
    Juergen

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.38%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:56 PM.

Copyright BetaSoft Inc.