Funny code

The geek forum. PHP, Perl, HTML, hardware questions etc.. it's all in here. Got a techie question? We'll sort you out. Ask your questions or post a link to your own site here!

Funny code

Postby MyrrhLynn » Mon Oct 27, 2003 9:05 pm

I'm sure all you computer geeks have come across "fake code" that would never really work but is changed to be funny. So share with us! (I think there is a technical word for this like Codglish or something but I can't think of it.)

Here is mine that a friend made for me when I didn't want to do my Java homework:

if(myJavaAssignment.getHoursRemainingUntilDue() > 12)
{
student.setSlacking(true);
}
Image

:x:Anti Yaoi Fans :x: Daystar Design :x: MyrrhLynn.NET :x: Need an avatar? Then Click here!

"Another Sane Sig brought to you by MOES."
User avatar
MyrrhLynn
 
Posts: 777
Joined: Sun Jun 29, 2003 12:00 pm
Location: USA

Postby TheMelodyMaker » Mon Oct 27, 2003 9:46 pm

Trying my hand at some quick Visual Basic:

Code: Select all
Sub Redundant()

Call Repetitive()

End Sub


Sub Repetitive()

Call Redundant()

End Sub



(How long until we get a stack overflow here? ^_~ )
[color=RoyalBlue]@)}~`,~ [/color]Carry this rose in your signature as thanks to Inkhana, for all she has done for us in the past.Even though she is no longer a moderator, she has done an awful lot for us while she was and she deserves thanks. ^_^
TheMelodyMaker
 
Posts: 1904
Joined: Sun Jul 20, 2003 10:13 pm

Postby LorentzForce » Mon Oct 27, 2003 10:04 pm

10 print "I'm an idiot"
20 print "/me smacks himself with a hammer"
30 goto 10

and it works.
Image
User avatar
LorentzForce
 
Posts: 1263
Joined: Sun Jun 01, 2003 3:18 am
Location: Between B and E

Postby Mithrandir » Wed Oct 29, 2003 7:59 am

I have a friend who writes poetry in perl (I'm not making this up) and it's actually pretty good stuff. It was published to the clpm group by Larry one april fools day.

edit: btw, this code works in all versions of perl up to 5.8 (I think).

Code: Select all
 #!/usr/bin/perl
 
 APPEAL:
 
 listen (please, please);
 
 open yourself, wide;
     join (you, me),
 connect (us,together),
 
 tell me.
 
 do something if distressed;
 
     @dawn, dance;
     @evening, sing;
     read (books,$poems,stories) until peaceful;
     study if able;
 
     write me if-you-please;
 
 sort your feelings, reset goals, seek (friends, family, anyone);
 
         do*not*die (like this)
         if sin abounds;
 
 keys (hidden), open (locks, doors), tell secrets;
 do not, I-beg-you, close them, yet.
 
                             accept (yourself, changes),
                             bind (grief, despair);
 
 require truth, goodness if-you-will, each moment;
 
 select (always), length(of-days)
 
 # listen (a perl poem)
 # Sharon Hopkins
 # rev. June 19, 1995
User avatar
Mithrandir
 
Posts: 11071
Joined: Fri Jun 27, 2003 12:00 pm
Location: You will be baked. And then there will be cake.

Postby Straylight » Wed Oct 29, 2003 8:02 am

Wow, that's quite amazing, lol!
[align=center]
Image
Banner above created using my avatar generator tool.
You know you want try it.
User avatar
Straylight
 
Posts: 2346
Joined: Mon May 26, 2003 12:00 pm
Location: Manchester, UK

Postby TheMelodyMaker » Wed Oct 29, 2003 9:49 am

What does it do when it's actually run?
[color=RoyalBlue]@)}~`,~ [/color]Carry this rose in your signature as thanks to Inkhana, for all she has done for us in the past.Even though she is no longer a moderator, she has done an awful lot for us while she was and she deserves thanks. ^_^
TheMelodyMaker
 
Posts: 1904
Joined: Sun Jul 20, 2003 10:13 pm

Postby Mithrandir » Wed Oct 29, 2003 9:53 am

Sorry. By 'works' I mean it does not generate any error messages. Feel free to try and run it if you like. On a linux box, save it, chmod 700 it, and ./ it.

The execution of the code is left as an excersise for the reader... :evil: Can you tell I work in education?
User avatar
Mithrandir
 
Posts: 11071
Joined: Fri Jun 27, 2003 12:00 pm
Location: You will be baked. And then there will be cake.

Postby uc pseudonym » Thu Oct 30, 2003 5:52 am

This is just an idea... I'm not too sure quite how to put it best. So I'll do it in QBASIC, the one language I'm actually proficient in:

PRINT "No monitor detected."
User avatar
uc pseudonym
 
Posts: 15506
Joined: Tue Jun 10, 2003 4:00 am
Location: Tanzania

Postby TheMelodyMaker » Thu Oct 30, 2003 9:36 am

I see that that's along the same line as "No keyboard detected; press any key to continue." Or "If you're having trouble with your internet connection, please visit our website for help."
[color=RoyalBlue]@)}~`,~ [/color]Carry this rose in your signature as thanks to Inkhana, for all she has done for us in the past.Even though she is no longer a moderator, she has done an awful lot for us while she was and she deserves thanks. ^_^
TheMelodyMaker
 
Posts: 1904
Joined: Sun Jul 20, 2003 10:13 pm

Postby Mithrandir » Thu Oct 30, 2003 10:07 am

I bought I CD drive one time. The packaging says, "Great to replace your current drive."

The drivers were on a CD-Rom.
User avatar
Mithrandir
 
Posts: 11071
Joined: Fri Jun 27, 2003 12:00 pm
Location: You will be baked. And then there will be cake.

Postby uc pseudonym » Thu Oct 30, 2003 1:11 pm

Oh... man. I'd definitely believe it.
User avatar
uc pseudonym
 
Posts: 15506
Joined: Tue Jun 10, 2003 4:00 am
Location: Tanzania

Postby Fsiphskilm » Wed Nov 05, 2003 4:40 pm

Program=Forever
Last edited by Fsiphskilm on Sat Jan 14, 2017 6:53 pm, edited 1 time in total.
I'm leaving CAA perminantly. i've wanted to do this for a long time but I've never gathered the courage to let go.
User avatar
Fsiphskilm
 
Posts: 3853
Joined: Mon Nov 03, 2003 12:00 pm
Location: USA

Postby shooraijin » Wed Nov 05, 2003 4:44 pm

Since Myrrh originally posted in Java, here's one allegedly seen at JavaOne:

if(you.CanRead(this)) you.CanGet(new Job(!problem))
"you're a doctor.... and 27 years.... so...doctor + 27 years = HATORI SOHMA" - RoyalWing, when I was 27
"Al hail the forum editting Shooby! His vibes are law!" - Osaka-chan

I could still be champ, but I'd feel bad taking it away from one of the younger guys. - George Foreman
User avatar
shooraijin
 
Posts: 9927
Joined: Thu Jun 26, 2003 12:00 pm
Location: Southern California

Postby Mithrandir » Thu Nov 06, 2003 8:42 am

Actually, shoo, I saw that one when I did a stint there. At the time, I thought it was part of an add campaign. It may have just been some clever programmers, however...
User avatar
Mithrandir
 
Posts: 11071
Joined: Fri Jun 27, 2003 12:00 pm
Location: You will be baked. And then there will be cake.


Return to Computing and Links

Who is online

Users browsing this forum: No registered users and 92 guests