Posted on 10/22/2010 5:45:14 AM PDT by Lucky9teen
Blatherskites, mark this day on your calendar. For today is Babbling Day. This isn't a day to remain silent. Tell everyone you know about this special day.




Once upon a time in their marriage, my Dad did something
really stupid. My Mom chewed him out for it. He apologized,
they made up.
However, from time to time, my mom mentions what he had
done. “Honey,” my Dad finally said one day, “why do you
keep bringing that up? I thought your policy was ‘forgive
and forget.’”
“It is,” she said. “I just don’t want you to forget that
I’ve forgiven and forgotten.”

{NOTE: For the non programmers, some exegesis may
be necessary: when a programmer starts to learn a new language,
a typical first exercise is to program the computer to display the
message "Hello World".}
---------------
A compilation of *Hello World programs* designed by
various categories of *developer* follows.
High School/Jr.High
===================
10 PRINT "HELLO WORLD"
20 END
First year in College
=====================
program Hello(input, output)
begin
writeln('Hello World')
end.
Senior year in College
======================
(defun hello
(print
(cons 'Hello (list 'World))))
New professional
================
#include <stdio.h>
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i < 2; ++i)
printf("%s", message[i]);
printf("\n");
}
Seasoned professional
=====================
#include <iostream.h>
#include <string.h>
class string
{
private:
int size;
char *ptr;
public:
string() : size(0), ptr(new char('\0')) {}
string(const string &s) : size(s.size)
{
ptr = new char[size + 1];
strcpy(ptr, s.ptr);
}
~string()
{
delete [] ptr;
}
friend ostream &operator <<(ostream &, const string &);
string &operator=(const char *);
};
ostream &operator<<(ostream &stream, const string &s)
{
return(stream << s.ptr);
}
string &string::operator=(const char *chrs)
{
if (this != &chrs)
{
delete [] ptr;
size = strlen(chrs);
ptr = new char[size + 1];
strcpy(ptr, chrs);
}
return(*this);
}
int main()
{
string str;
str = "Hello World";
cout << str << endl;
return(0);
}
Master Programmer
=================
[
uuid(2573F8F4-CFEE-101A-9A9F-00AA00342820)
]
library LHello
{
// bring in the master library
importlib("actimp.tlb");
importlib("actexp.tlb");
// bring in my interfaces
#include "pshlo.idl"
[
uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820)
]
cotype THello
{
interface IHello;
interface IPersistFile;
};
};
[
exe,
uuid(2573F890-CFEE-101A-9A9F-00AA00342820)
]
module CHelloLib
{
// some code related header files
importheader(<windows.h>);
importheader(<ole2.h>);
importheader(<except.hxx>);
importheader("pshlo.h");
importheader("shlo.hxx");
importheader("mycls.hxx");
// needed typelibs
importlib("actimp.tlb");
importlib("actexp.tlb");
importlib("thlo.tlb");
[
uuid(2573F891-CFEE-101A-9A9F-00AA00342820),
aggregatable
]
coclass CHello
{
cotype THello;
};
};
#include "ipfix.hxx"
extern HANDLE hEvent;
class CHello : public CHelloBase
{
public:
IPFIX(CLSID_CHello);
CHello(IUnknown *pUnk);
~CHello();
HRESULT __stdcall PrintSz(LPWSTR pwszString);
private:
static int cObjRef;
};
#include <windows.h>
#include <ole2.h>
#include <stdio.h>
#include <stdlib.h>
#include "thlo.h"
#include "pshlo.h"
#include "shlo.hxx"
#include "mycls.hxx"
int CHello::cObjRef = 0;
CHello::CHello(IUnknown *pUnk) : CHelloBase(pUnk)
{
cObjRef++;
return;
}
HRESULT __stdcall CHello::PrintSz(LPWSTR pwszString)
{
printf("%ws\n", pwszString);
return(ResultFromScode(S_OK));
}
CHello::~CHello(void)
{
// when the object count goes to zero, stop the server
cObjRef--;
if( cObjRef == 0 )
PulseEvent(hEvent);
return;
}
#include <windows.h>
#include <ole2.h>
#include "pshlo.h"
#include "shlo.hxx"
#include "mycls.hxx"
HANDLE hEvent;
int _cdecl main(
int argc,
char * argv[]
) {
ULONG ulRef;
DWORD dwRegistration;
CHelloCF *pCF = new CHelloCF();
hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
// Initialize the OLE libraries
CoInitializeEx(NULL, COINIT_MULTITHREADED);
CoRegisterClassObject(CLSID_CHello, pCF, CLSCTX_LOCAL_SERVER,
REGCLS_MULTIPLEUSE, &dwRegistration);
// wait on an event to stop
WaitForSingleObject(hEvent, INFINITE);
// revoke and release the class object
CoRevokeClassObject(dwRegistration);
ulRef = pCF->Release();
// Tell OLE we are going away.
CoUninitialize();
return(0); }
extern CLSID CLSID_CHello;
extern UUID LIBID_CHelloLib;
CLSID CLSID_CHello = { /* 2573F891-CFEE-101A-9A9F-00AA00342820 */
0x2573F891,
0xCFEE,
0x101A,
{ 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
};
UUID LIBID_CHelloLib = { /* 2573F890-CFEE-101A-9A9F-00AA00342820 */
0x2573F890,
0xCFEE,
0x101A,
{ 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
};
#include <windows.h>
#include <ole2.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "pshlo.h"
#include "shlo.hxx"
#include "clsid.h"
int _cdecl main(
int argc,
char * argv[]
) {
HRESULT hRslt;
IHello *pHello;
ULONG ulCnt;
IMoniker * pmk;
WCHAR wcsT[_MAX_PATH];
WCHAR wcsPath[2 * _MAX_PATH];
// get object path
wcsPath[0] = '\0';
wcsT[0] = '\0';
if( argc 1) {
mbstowcs(wcsPath, argv[1], strlen(argv[1]) + 1);
wcsupr(wcsPath);
}
else {
fprintf(stderr, "Object path must be specified\n");
return(1);
}
// get print string
if(argc 2)
mbstowcs(wcsT, argv[2], strlen(argv[2]) + 1);
else
wcscpy(wcsT, L"Hello World");
printf("Linking to object %ws\n", wcsPath);
printf("Text String %ws\n", wcsT);
// Initialize the OLE libraries
hRslt = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if(SUCCEEDED(hRslt)) {
hRslt = CreateFileMoniker(wcsPath, &pmk);
if(SUCCEEDED(hRslt))
hRslt = BindMoniker(pmk, 0, IID_IHello, (void **)&pHello);
if(SUCCEEDED(hRslt)) {
// print a string out
pHello->PrintSz(wcsT);
Sleep(2000);
ulCnt = pHello->Release();
}
else
printf("Failure to connect, status: %lx", hRslt);
// Tell OLE we are going away.
CoUninitialize();
}
return(0);
}
Apprentice Hacker
===================
#!/usr/local/bin/perl
$msg="Hello, world.\n";
if ($#ARGV >= 0) {
while(defined($arg=shift(@ARGV))) {
$outfilename = $arg;
open(FILE, ">" . $outfilename) || die "Can't write $arg: $!\n";
print (FILE $msg);
close(FILE) || die "Can't close $arg: $!\n";
}
} else {
print ($msg);
}
1;
Experienced Hacker
===================
#include <stdio.h>
#define S "Hello, World\n"
main(){exit(printf(S) == strlen(S) ? 0 : 1);}
Seasoned Hacker
===================
% cc -o a.out ~/src/misc/hw/hw.c
% a.out
Guru Hacker
===================
% cat
Hello, world.
^D
New Manager
===================
10 PRINT "HELLO WORLD"
20 END
Middle Manager
===================
mail -s "Hello, world." bob@b12
Bob, could you please write me a program that prints "Hello, world."?
I need it by tomorrow.
^D
Senior Manager
===================
% zmail jim
I need a "Hello, world." program by this afternoon.
Chief Executive
===================
% letter
letter: Command not found.
% mail
To: ^X ^F ^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized
% logout
Just too funny! My co-workers in the other cubes are now positive that I’m crazy.
Re:Babbling Day
Ron White, comedian, often tells the story of his arrest in NY City, because he was wearing a hat in a bar that didn’t allow hats. Although he took off the hat at first, after a few drinks he put his hat back on without realizing it.
The bouncer ejects him onto the street. The bar claims a chair was broken by Ron. It was probably broken ON Ron, by the bouncer. But still you could say Ron broke it.Since he refused to pay for it, they called the cops.
Then Ron says, “I had the right to remain silent...but I didn’t have the ability!”.
This is part of his famous “They Call Me, Tater Salad” story.
It's been over five hours, and he's still there -- I'm beginning to think I wasted a 44 cent postage stamp....
Baaaaa....what goes around comes around.
The officer said, "Sir, do you know what the penalty for drunk driving is in this state?"
I thought for a moment and replied, "I don't know . . . re-election to the Senate?"
"I was at a bar nursing a beer. My nipple quite soggy."
"A computer once beat me at chess, but it was no match for me at kick boxing."
"I once had a large gay following, but I ducked into an alleyway and lost him."
"How many people here have telekenetic powers? Raise my hand."
"There was a black out in my neighborhood last night. But the police came along and made him get back into his car."
"My classmates would copulate with anything that moved, but I never saw any reason to limit myself."
"My mother was like a sister to me, only we didn't have sex quite so often."
"I was the kid next door's imaginary friend."
"You don't appreciate a lot of stuff in school until you get older. Little things like being spanked every day by a middle aged woman: Stuff you pay good money for in later life."
"I got some new underwear the other day. Well, new to me."
"When I was a kid I used to pray every night for a new bicycle. Then I realised that the Lord doesn't work that way so I stole one and asked Him to forgive me."
"People always ask me, "Where were you when Kennedy was shot?" Well, I don't have an alibi."
"You know what I hate? Indian givers...no, I take that back."
"New York's such a wonderful city. Although I was at the library today. The guys are very rude. I said, "I'd like a card." He says, "You have to prove you're a citizen of New York." So I stabbed him."
"I was walking down fifth avenue today and I found a wallet, and I was gonna keep it, rather than return it, but I thought: well, if I lost a hundred and fifty dollars, how would I feel? And I realized I would want to be taught a lesson."
"I love to go down to the schoolyard and watch all the little children jump up and down and run around yelling and screaming. They don't know I'm only using blanks."
"I was sleeping the other night, alone, thanks to the exterminator."
"I was in a bar the other night, hopping from barstool to barstool, trying to get lucky, but there wasn't any gum under any of them."
"I got a letter from the IRS. Apparently I owe them $800. So I sent them a letter back. I said, "If you'll remember, I fastened my return with a paper clip, which according to your very own latest government pentagon spending figures will more than make up for the difference."
"Women: You can't live with them, and you can't get them to dress up in a skimpy little Nazi costume and beat you with a warm squash or something..."
"Probably the toughest time in anyone's life is when you have to murder a loved one because they're the devil."
"People come up to me and say, "Emo, do people really come up to you?"
"When I wake up in the morning, I just can't get started until I've had that first, piping hot pot of coffee. Oh, I've tried other enemas..."
"I ran three miles today. Finally I said, "Lady take your purse."
"Well, my brother says Hello. So, hooray for speech therapy."
"I got in a fight one time with a really big guy, and he said, "I'm going to mop the floor with your face." I said, "You'll be sorry." He said, "Oh, yeah? Why?" I said, "Well, you won't be able to get into the corners very well."
"I'm a great lover, I'll bet."
I like it, Ben!
You. Are. Twisted.

Yep...
And yet... you ROCK!!
LOL!
My favorite of Emo’s: I used to think that the brain was the most fascinating part of the body...then I thought...look what’s telling me that!
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.