Re: Does Humor Belong in Programming? (Quips and Quotes)
by eyepopslikeamosquito (Archbishop) on Oct 05, 2015 at 04:25 UTC
|
A random sampling of Perl humor, mostly courtesy of Larry Wall, taken from the links below:
#define SIGILL 6 /* blech */
double value; /* or your money back! */
short changed; /* so triple your money back! */
/* we have tried to make this normal case as abnormal as possible */
echo "Congratulations. You aren't running Eunice."
echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";;
echo "Your stdio isn't very std."
I think it's a new feature. Don't tell anyone it was an accident. :-
+)
Doing linear scans over an associative array is like trying
to club someone to death with a loaded Uzi
cc -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/
+usr/include/gdbm -g -Dan_Sugalski -Larry -Wall -Wstrict-prototypes...
Perl Monks Quips:
Related PM Nodes:
See also:
External References:
References Added Later
| [reply] [d/l] |
Re: Does Humor Belong in Programming?
by johngg (Canon) on Oct 04, 2015 at 14:49 UTC
|
Yes, definitely. I remember an article in the Sun user group magazine a long time ago about amusing compiler messages. This one is my favourite -
"a typedef name was a complete surprise to me at this point in your program"
I just found them again online here.
| [reply] |
|
Thanks for the link John. Some of those were pretty funny. I remember learning many a moon ago about one humorous things the UNIX programmers put into the manpage for tunefs (sp?). "You can tune a filesystem, but you can't tuna fish." I think it was an indirect reference to the band REO Speedwagon's "You can tune a piano but you can't tuna fish."
| [reply] |
Re: Does Humor Belong in Programming?
by choroba (Cardinal) on Oct 01, 2015 at 09:43 UTC
|
When clicking on the title, I expected a funnier poll.
| [reply] |
|
| [reply] |
|
| [reply] |
|
|
|
|
| [reply] |
Re: Does Humor Belong in Programming?
by GotToBTru (Prior) on Oct 01, 2015 at 20:58 UTC
|
Not only humor, but literature 'n culture 'n stuff.
@godot = glob($path);
die "Nothing to be done!\n" unless @godot;
| [reply] [d/l] |
|
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw(say);
use sigtrap qw(die INT);
use subs qw(wait);
sub wait { say qq(Nothing to be done.) while <> }
wait();
END { say qq(To every man his little cross. Till he dies. And is forgo
+tten.) }
«The Crux of the Biscuit is the Apostrophe»
| [reply] [d/l] |
Re: Does Humor Belong in Programming?
by Gavin (Archbishop) on Oct 04, 2015 at 17:40 UTC
|
Q Why did the programmer quit his job?
A Because he didn't get arrays!
| [reply] |
Re: Does Humor Belong in Programming?
by Preceptor (Deacon) on Oct 05, 2015 at 13:18 UTC
|
It depends. A little levity is fine. Doing so at expense of clear/readable code is not. If I have to debug some code with 'comedy' variable names I will get quite grumpy about it, for all the reasons I'd get grumpy if you just used single letters all the way through.
But in comments (as long as you _also_ include the comments that you _need_) it's fine and great. In error/diag messages too (again, provided you're actually producing _useful_ output as well).
| [reply] |
|
This is pretty well my stance. Variable names, sub names or anything that is functional should not be comedic unless the comedic name truly represents what is being used.
For comments, comedic things are fun to read in odd/rare circumstances, and very far edge case warnings as well (so long as the warn/error displays useful info inclusive).
I once patched a module that had a comment such as:
# we don't even know how why this is here,
# nor how it is ever executed, Scotty
I looked at the code after I found that a far away test on CPAN Testers was failing, and realized that this sub was being called ONLY in a test and was never used otherwise. So I fixed the test, wrote a new test, and in the sub in the patch wrote something to the effect:
# this sub isn't ever used; beam it up, Scotty
| [reply] [d/l] [select] |
|
Also, less is more.
-- FloydATC
Time flies when you don't know what you're doing
| [reply] |
|
| [reply] |
Re: Does Humor Belong in Programming?
by vitoco (Friar) on Oct 01, 2015 at 16:05 UTC
|
It isn't funny when you have change something in an old program that only has variables/procedures/labels with just one or two letters or numbers in their names, and no comments!!!
But is funny when you find an easter egg.
| [reply] |
|
"... and no comments..."
Apropos comments:
long john; // silver
Catch (Exception e) {
//who cares?
}
return 1; # returns 1
#define TRUE FALSE
//Happy debugging suckers
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
// drunk, fix later
// I'm sorry.
Many more
Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
| [reply] [d/l] |
|
I make a living writing and using tools to look at other people's code. Sometimes a sense of humor is the only thing that keeps me going.
| [reply] |
Re: Does Humor Belong in Programming?
by Pope-O-Matik (Pilgrim) on Oct 04, 2015 at 02:09 UTC
|
By humor, do you mean blood, sweat, and tears? That's an integral part of coding.
| [reply] |
|
| [reply] |
|
This conversation is going too meta for me. :)
--
Edit: Added the (famous) limerick below and changed to to too too. Two Os are better than one, i guess:
A tutor who tooted the flute
Tried to tutor two tooters to toot;
Said the two to the tutor,
“Is it harder to toot, or
To tutor two tooters to toot?”
| [reply] |
|
|
|
|
|
| [reply] |
|
| [reply] |
|
Re: Does Humor Belong in Programming?
by ExReg (Priest) on Oct 01, 2015 at 14:08 UTC
|
I thought it would be funny to vote no. Sorry, couldn't resist.
| [reply] |
Re: Does Humor Belong in Programming?
by Anonymous Monk on Oct 01, 2015 at 17:18 UTC
|
Needs an option "Perl6 will be released". | [reply] |
Re: Does Humor Belong in Programming?
by Pope-O-Matik (Pilgrim) on Oct 01, 2015 at 17:43 UTC
|
| [reply] |
Re: Does Humor Belong in Programming?
by herveus (Prior) on Oct 01, 2015 at 15:14 UTC
|
Howdy!
Other - Cowboy Neal.
| [reply] |
Re: Does Humor Belong in Programming?
by stevieb (Canon) on Oct 12, 2015 at 19:28 UTC
|
| [reply] |
|
YAP (Yet Another Poet).
Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
| [reply] |
Re: Does Humor Belong in Programming?
by shmem (Chancellor) on Oct 26, 2015 at 10:08 UTC
|
Of course yes! too boring without.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
| [reply] |
Re: Does Humor Belong in Programming?
by RobRod (Initiate) on Oct 30, 2015 at 10:28 UTC
|
No, but i would miss it.
Humor is the best way to break senseless rules.
If humor belongs to programming, it would be a rule, humor couldn't break anymore.
If i get an insight by breaking a silly rule in my mind it is humor. but if i try to force humor it tends to be boring, so i wonder about its source.
Programming appears to be a good hunting ground - hunting bugs - experiencing humor. | [reply] |
Re: Does Humor Belong in Programming?
by Anonymous Monk on Oct 01, 2015 at 21:39 UTC
|
| [reply] |
|
| [reply] |
Re: Does Humor Belong in Programming?
by gloryhack (Deacon) on Oct 29, 2015 at 20:42 UTC
|
Yes, humor belongs in programming. So does profanity, dammit! | [reply] |