The Code Crunch

Name:
Location: Orange, CA, United States

Saturday, September 23, 2006

Microsoft gets serious about new peripheral devices...

Tuesday, September 05, 2006

The Evolution of Code...

High School / Junior 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 Profesional :

#include
void main(void)
{
char *message[] = ("Hello ", "World.");
int i;

for (i = 0; i <>
#include
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 << operator =" (const" size =" strlen" ptr =" new" str = "Hello World." msg="Hello World.\n">= 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)
}
l;

Experienced Hacker :

#include
#define S "Hello World.\n"
main() {exit (printf(S) == strlen(S) ? 0 : l);}

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 :

% mail 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

Bill Gates dies and goes to hell. Satan greets him, "Welcome Mr. Gates, we've been waiting for you. This will be your home for all eternity. You've been selfish, greedy and a big liar all your life. Now, since you've got me in a good mood, I'll be generous and give you a choice of three places in which you'll be locked up forever."

Satan takes Bill to a huge lake of fire in which millions of poor souls are tormented and tortured. He then takes him to a massive colosseum where thousands of people are chased about and devoured by starving lions. Finally, he takes Bill to a tiny room in which there is a PC in the corner.

Without hesitation, Bill says "I'll take this option." "Fine," says Satan, allowing Bill to enter the room. Satan locks the room after Bill. As he turns around, he bumps into Lucifer.

Lucifer: That was Bill Gates! Why did you give him the best place of all?

Satan: That's what everyone thinks!

Lucifer: What about the PC?

Satan (laughing): It's got Windows 98! And it's missing three keys!

Lucifer: Which three?

Satan (screaming): Control, Alt and Delete!

And YOU have integration issues...

Darth Vader took two giant strides toward the immense view screen that occupied the forward wall of the bridge of his flagship Imperial Star Destroyer. "We have them now," he rumbled. Whirling on the technicians cowering at their consoles, Vader snapped, "Tractor beam!"

"Yes, Lord Vader," replied one, bending attentively to his task. Then he looked up hesitantly. Vader gestured dramatically at the screen, indicating the fleeing spacecraft. "I want a tractor beam on that ship," he declared. "Now!"

The technician busied himself with switches and dials." Where's that tractor beam?" roared Vader, his voice dark with menace. The other technicians turned frightened eyes on their peer. They knew what happened when Darth Vader's instructions weren't executed instantly.

"The tractor beam seems to be down, sir," quavered the technician

"What do you mean down?" Vader inquired with a disturbing silkiness to his voice.

"It's not accepting commands, sir," the technician explained. Another technician leaned over and examined the console. "That's odd. The beam itself is showing green," he pointed out. "Yes, I know," agreed the first. "But I'm not getting any acknowledgment to my 'Engage' command." He pressed a button several times to demonstrate." Maybe the network's down again," suggested a third technician. "Oh, that could be," admitted the first technician. "The network might be down, Lord Vader," he informed the large black figure trembling with rage.

"What network?" Vader asked ominously. The second technician jumped in. "Since we've moved to a distributed architecture on the Imperial star destroyers, everything is on a network. It was felt that the direct connections were too unreliable." The third technician added. "The tractor beam is on one of the peripherals sub networks, with the printers and the scanners. It's not on the main weapons network." "Why isn't the tractor beam on the weapons network?" asked Vader, now more puzzled than angry. The technicians exchanged sheepish looks. It was embarrassing to have to point out something so obvious to a superior. The second technician cleared his throat. "Well, sir, the weapons network is a higher priority. It makes more sense to put the less commonly used systems on a separate sub network that has lower QOS."

"QOS?" Vader queried." Hang on a second," said the first technician. "If the network is down, how come we're getting a green light for the tractor beam?" The third technician brightened. "Ah! Maybe the console is retrieving old MIB data and displaying that." "MIB?" rumbled Vader. The first technician answered, "We use SNMP to monitor the network elements. When the server queries the element, it stores its current status. If the network goes down, it can't query the element anymore, and all you have is the latest status in the MIB." He turned to the other technicians, musing. "We really should have an indicator of when the last successful query was, instead of just a green or red light." "Good idea," said the third technician. "I'll call tech support." "Say," said the second technician. "How about if we ping the tractor beam? Let me bring up a telnet window."

"Telnet?" asked Vader, now obviously confused. "Ping?" The first technician glanced briefly at Vader, a little annoyed at the interruptions. Why couldn't this guy keep up with the service bulletins? "The system runs Unix, but the consoles run NT 5000," he replied with exaggerated patience. "You need a telnet window to ping the element." He turned his attention back to the screen. "That's strange. It comes back 'active'. Listen, when you get tech support tell them we can't engage the tractor but we can ping it." "Right," said the third technician. "I'm still on hold." "Here's a thought," said the second technician. "What if we just call the guys down at tractor control and have them engage the beam manually?"

Vader seemed to brighten up at this, and swiveled his head from one to another." Good idea," said the first technician. He lifted his communicator and tapped the switch several times. "Nothing," he said. The second technician shook his head. Didn't we tell them we couldn't do voice and data with that little bandwidth?"

Suddenly Vader noticed the view screen and let out a bellow of anger. "They're gone!" he boomed. The third technician looked up smiling. "Hey, I got tech support!"

Justify my text? I'm sorry but it has no excuse.

God is REAL, unless explicitly declared INTEGER.

Asking if computers can think is like asking if submarines can swim.

From C:\*.* to shining C:\*.*

AAAAAA - American Association Against Acronym Abuse Anonymous

CCITT - Can't Conceive Intelligent Thoughts Today

This message transmitted on 100% recycled electrons.

Today’s assembler command : EXOP Execute Operator

Justify my text? I'm sorry but it has no excuse.

Programming is an art form that fights back.

"Daddy, what does FORMATTING DRIVE C mean?"

All wiyht. Rho sritched mg kegtops awound?

Backups? We doan *NEED* no steenking baX%^~,VbKx NO CARRIER

My mail reader can beat up your mail reader.

Never forget: 2 + 2 = 5 for extremely large values of 2.

Nobody has ever, ever, EVER learned all of WordPerfect.

To define recursion, we must first define recursion.

Good programming is 99% sweat and 1% coffee.

(Props to http://www.authorware.com/humtexttx.asp?Hum_ID=91)

"#define QUESTION ((bb) || !(bb)) - Shakespeare."

Bug? That's not a bug, that's a feature. -T. John Wendel

The programmer's national anthem is 'AAAAAAAAHHHHHHHH'. -Weinberg, p.152

On a clear disk you can seek forever. -Computerworld button

I write all my critical routines in assembler, and my comedy routines in FORTRAN. -Anonymous

If debugging is the process of removing bugs, then programming must be the process of putting them in. -Dykstra

"#define QUESTION ((bb) || !(bb)) - Shakespeare."

"Real programmers use: COPY CON PROGRAM.EXE"

Logic: The art of being wrong with confidence...

To iterate is human; to recurse, divine.

If at first you don't succeed, call it version 1.0

Maintenance-free: When it breaks, it can't be fixed...

Microwave: Signal from a friendly micro...

Nostalgia: The good old days multiplied by a bad memory...

It said, "Insert disk #3," but only two will fit!

Hex dump: Where witches put used curses...

Never violate the Prime Directory! C:
Multitasking: Screwing up several things at once...

Maniac: An early computer built by nuts...

Stack Error: Lost on a cluttered desk...

Stack Overflow: Too many pancakes...

Life would be much easier if I had the source code.

Capt'n! The spellchecker kinna take this abuse!

C:\BELFRY is where I keep my .BAT files.

ASCII to ASCII, DOS to DOS.

How do I set my laser printer on stun?

"Today's subliminal thought is:"

'Calm down -- it's only ones and zeros.'

'.... now touch these wires to your tongue!'

Computer analyst to programmer: "You start coding. I'll go find out what they want."

According to my calculations the problem doesn't exist.

It said, "Insert disk #3," but only two will fit!

RAM DISK is not an installation procedure!

Computers are only human.

This time it will surely run.

I just found the last bug.

The generation of random numbers is too important to be left to chance.

It's redundant! It's redundant! -R. E. Dundant

Who is General Failure and why is he reading my disk?

Better to understand a little than to misunderstand a lot.

The gene pool could use a little chlorine.

When there's a will, I want to be in it.

Okay, who put a "stop payment" on my reality check?

Few women admit their age. Few men act theirs.

I'm as confused as a baby in a topless bar.

We have enough youth, how about a fountain of SMART?

All generalizations are false, including this one.

Change is inevitable, except from a vending machine.

C program run. C program crash. C programmer quit.

"Criminal Lawyer" is a redundancy.

Is reading in the bathroom considered Multi-Tasking?

My computer isn't that nervous...it's just a bit ANSI.

My computer's sick. I think my modem is a carrier.

Gotta run, the cat's caught in the printer.

Honey, I Formatted the Kid!

Spelling checkers at maximum! Fire!

Your e-mail has been returned due to insufficient voltage.

Who is General Failure and why is he reading my disk?

I don't suffer from insanity. I enjoy every minute of it...

There's too much blood in my caffeine system.

Artificial Intelligence usually beats real stupidity.

I wouldn't be caught dead with a necrophiliac.

Learn from your parents' mistakes - use birth control!

Hard work has a future payoff. Laziness pays off now .

Friends help you move. Real friends help you move bodies.

I won't rise to the occasion, but I'll slide over to it.

Ever notice how fast Windows runs? Neither did I.

Double your drive space - delete Windows!

What is a "free" gift ? Aren't all gifts free?

Assassins do it from behind.

If ignorance is bliss, you must be orgasmic.

"Very funny, Scotty. Now beam down my clothes."

Puritanism: The haunting fear that someone, somewhere may be happy.

Consciousness: that annoying time between naps.

Oops. My brain just hit a bad sector.

I used to have a handle on life, then it broke.

Don't take life too seriously, you won't get out alive.

I don't suffer from insanity. I enjoy every minute of it.

I'm not a complete idiot, some parts are missing!

Daddy, why doesn't this magnet pick up this floppy disk?

Give me ambiguity or give me something else.

I.R.S.: We've got what it takes to take what you've got!

We are born naked, wet and hungry. Then things get worse.

Pentiums melt in your PC, not in your hand.

Suicidal twin kills sister by mistake!

The secret of the universe is @*&^^^ NO CARRIER

Did anyone see my lost carrier?

Make it idiot proof and someone will make a better idiot.

I'm not a complete idiot, some parts are missing!

He who laughs last thinks slowest!

Always remember you're unique, just like everyone else.

"More hay, Trigger?" "No thanks, Roy, I'm stuffed!"

A flashlight is a case for holding dead batteries.

Lottery: A tax on people who are bad at math.

Error, no keyboard - press F1 to continue.

Sunday, September 03, 2006

Abbreviations...

CD-ROM: Consumer Device, Rendered Obsolete in Months
PCMCIA: People Can't Memorize Computer Industry Acronyms
ISDN: It Still Does Nothing
SCSI: System Can't See It
MIPS: Meaningless Indication of Processor Speed
DOS: Defunct Operating System
WINDOWS: Will Install Needless Data On Whole System
OS/2: Obsolete Soon, Too
PnP: Plug and Pray
APPLE: Arrogance Produces Profit-Losing Entity
IBM: I Blame Microsoft
DEC: Do Expect Cuts
MICROSOFT: Most Intelligent Customers Realize Our Software Only Fools Teenagers
CA: Constant Acquisitions
COBOL: Completely Obsolete Business Oriented Language
LISP: Lots of Insipid and Stupid Parentheses
MACINTOSH: Most Applications Crash; If Not, The Operating System Hangs
AAAAA: American Association Against Acronym Abuse.
WYSIWYMGIYRRLAAGW: What You See Is What You Might Get If You're Really Really Lucky And All Goes Well.

A programmer was walking along the beach when he found a lamp. Upon rubbing the lamp a genie appeared who stated "I am the most powerful genie in the world. I can grant you any wish you want, but only one wish."

The programmer pulled out a map of the Mediterranean area and said "I'd like there to be a just and last peace among the people in the middle east."

The genie responded, "Gee, I don't know. Those people have been fighting since the beginning of time. I can do just about anything, but this is beyond my limits."

The programmer then said, "Well, I am a programmer and my programs have a lot of users. Please make all the users satisfied with my programs, and let them ask sensible changes"

Genie: "Uh, let me see that map again."

The edit, test, debug cycle expanded...

  1. Programmer produces code he believes is bug-free.
  2. Product is tested. 20 bugs are found.
  3. Programmer fixes 10 of the bugs and explains to the testing department that the other 10 aren't really bugs.
  4. Testing department finds that five of the fixes didn't work and discovers 15 new bugs.
  5. Repeat three times steps 3 and 4.
  6. Due to marketing pressure and an extremely premature product announcement based on overly-optimistic programming schedule, the product is released.
  7. Users find 137 new bugs.
  8. Original programmer, having cashed his royalty check, is nowhere to be found.
  9. Newly-assembled programming team fixes almost all of the 137 bugs, but introduce 456 new ones.
  10. Original programmer sends underpaid testing department a postcard from Fiji. Entire testing department quits.
  11. Company is bought in a hostile takeover by competitor using profits from their latest release, which had 783 bugs.
  12. New CEO is brought in by board of directors. He hires a programmer to redo program from scratch.
  13. Programmer produces code he believes is bug-free...

Language Comparisons

APL is a write-only language.

In C we had to code our own bugs. In C++ we can inherit them.

C gives you enough rope to hang yourself. C++ also gives you the tree object to tie it to.

With C you can shoot yourself in the leg. With C++ you can reuse the bullet.

A computer without COBOL and Fortran is like a piece of chocolate cake without ketchup and mustard.

PL/I is for programmers who can't decide whether to write in COBOL or Fortran.

More programmer jokes

- "Have you heard about the object-oriennted way to become wealthy?"
- "No..."
- "Inheritance."

If you can touch it and you can see it, it's REAL.
If you can touch it but you can't see it, it's TRANSPARENT.
If you can't touch it but you can see it, it's VIRTUAL.
If you can't touch it and you can't see it, it's GONE.

If you can pick it up, it's a PC.
If you can't pick it up but you can push it over, it's a minicomputer.
But when you can't pick it up or knock it over, it's a mainframe.
search390.com

Once a programmer drowned in the sea. Many Marines where at that time on the beach, but the programmer was shouting "F1 F1" and nobody understood it.


The boy is smoking and leaving smoke rings into the air.
The girl gets irritated with the smoke and says to her lover: "Can't you see the warning written on the cigarettes packet, smoking is injurious to health!"

The boy replies back: "Darling, I am a programmer. We don't worry about warnings, we only worry about errors."

Real Programmers....

Don't eat quiche. They don't even know how to spell quiche.
They like Twinkies, Coke, and palate-scorching Szechwan food.

Don't write applications programs. They program right down to
the bare metal. Applications programs are for dullards who can't
do systems programming.

Don't comment their code. If it was hard to write, it should be
hard to understand and even harder to modify.

Don't draw flowcharts. Flowcharts are, after all, the illiterate's
form of documentation. Cavemen drew flowcharts; look how much it did
for them.

Don't use COBOL. COBOL is for wimpy applications programmers.

Don't use FORTRAN. FORTRAN is for wimpy engineers who wear white
socks, pipe stress freaks, and crystallography weenies. They get
excited over finite state analysis and nuclear reactor simulation.

Don't use LOGO. In fact, no programmer uses LOGO after reaching
puberty.

Don't use APL, unless the whole program can be written on one line.

Don't use LISP. Only effeminate programmers use more parentheses
than actual code.

Don't use Pascal, BLISS, Ada, or any of those sissy-pinko computer
science languages. Strong typing is a crutch for people with weak
memories.

Never work 9 to 5. If any real programmers are around at 9 a.m.,
it's because they were up all night.

Don't play tennis or any other sport that requires a change of
clothes. Mountain climbing is OK though, and real programmers often
wear climbing boots to work in case a mountain should suddenly spring
up in the middle of the machine room.

Don't like the team programming concept. Unless, of course, they
are the Chief Programmer.

Have no use for managers. Managers are a necessary evil. Managers
are for dealing with personal bozos, bean counters, senior planners,
and other mental defectives.

Don't drive clapped out Mavericks. They prefer BMWs, Lincolns, or
pick-up trucks with floor shifts. Fast motorcycles are highly regarded.

Like vending machine popcorn. Coders pop it in the microwave oven.
Real programmers use the heat given off by the CPU. They can tell what
job is running just by listening to the rate the corn is popping.

Know every nuance of every instruction and use them all in every
real program. Puppy architects won't allow execute instructions to
address another execute as the target instruction. Real programmers
despise such petty restrictions.

Don't bring brown bag lunches to work. If the vending machine sells
it, they eat it. If the vending machine doesn't sell it they don't eat
it. Vending machines don't sell quiche.

If God were a computer programmer:

Some important theological questions can best be answered by
thinking of God as a computer programmer:

Q: Did God really create the world in seven days?
A: He did it in six days and nights while living on cola and
candy bars. On the seventh day he went home and found out his
girlfriend had left him.

Q: What causes God to intervene in earthly affairs?
A: If a critical error occurs, the system pages him automatically
and he logs on from home to try to bring it up. Otherwise, things
can wait until tomorrow.

Q: How come the Age of Miracles ended?
A: That was the development phase of the project. Now we're in the
maintenance phase.

Q: Who is Satan?
A: Satan is an MIS director who takes credit for more powers than he
actually possesses, so nonprogrammers become scared of him. God
thinks he's irritating but irrelevant.

Q: Why does God allow evil to happen?
A: God thought he eliminated evil in one of the earlier revs.

Q: How can I protect myself from evil?
A: Change your password every month and don't make it a name, a
common word, or a date like your birthday.

Q: If I pray to God, will he listen?
A: You can waste his time telling him what to do, or you can just
get off his back and let him program.

Q: Some people claim they hear the voice of God. Is this true?
A: They are much more likely to receive email.

Q: Does God control everything that happens in my life?
A: He could, if he used the debugger, but it's tedious to step through
all those variables.

Q: Does God know everything?
A: He likes to think so, but he is often amazed to find out what goes
on in the overnite job.

Q: Will there be another Universe after the Big Bang?
A: A lot of people are drawing things on the white board, but
personally, God doubts that it will ever be implemented.

Q: What is the role of sinners?
A: Sinners are the people who find new an imaginative ways to mess up
the system when God has made it idiot-proof.

Q: Where will I go after I die?
A: Onto a DAT tape.

Q: Will I be reincarnated?
A: Not unless there is a special need to recreate you. And searching
those .tar files is a major hassle, so if there is a request for you,
God will just say that the tape has been lost.

Q: Am I unique and special in the universe?
A: There are over 10,000 major university and corporate sites running
exact duplicates of you in the present release version.

Q: What is the purpose of the universe?
A: God created it because he values elegance and simplicity, but then
the users and managers demanded he tack all this senseless stuff onto
it and now everything is more complicated and expensive than ever.

Q: What is the one true religion?
A: All systems have their advantages and disadvantages, so just pick
the one that best suits your needs and don't let anyone put you down.

Q: Is God angry that we crucified him?
A: Let's just say he's not going to any more meetings if he can help
it, because that last one with the twelve managers and the food
turned out to be murder.

Q: Some people say God is Love.
A: That is not a question. Please restate your query in the form of a
question.



- The Programmers' Cheer -
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!



Q. Somebody asked me "What happens to programmers when they die?"

A: They get deallocated?
Their values become undefined?
The get re-intialized?
Their structues break down?
they become WORM food...
They start dropping bits........
They branch to a new address!
Their social system resources are released?
They dump core? (a coredump is the result of an abort(ion))

The truth about C++ revealed

The truth about C++ revealed

(This is excerpted from another site. As a note, this is total balderdash - if you've read anything by Stroustrup you can tell that this is completely conjured. It's a bit evil for someone to publish this and attribute it to him, but it is hilarious, and does point out some of the common pitfalls that people run into while writing C++.)

Don't know if this is true or not... but it's funny either way.

On the 1st of January, 1998, Bjarne Stroustrup gave an interview
to the IEEE's 'Computer' magazine.

Naturally, the editors thought he would be giving a retrospective
view of seven years of object-oriented design, using the language
he created.
By the end of the interview, the interviewer got more than he had
bargained for and, subsequently, the editor decided to suppress its
contents, 'for the good of the industry' but, as with many of these
things, there was a leak.

Here is a complete transcript of what was was said, unedited, and
unrehearsed, so it isn't as neat as planned interviews.

You will find it interesting...

Interviewer: Well, it's been a few years since you changed the world
of software design, how does it feel, looking back?

Stroustrup: Actually, I was thinking about those days, just before
you arrived. Do you remember? Everyone was writing 'C' and, the
trouble was, they were pretty damn good at it. Universities got
pretty good at teaching it, too. They were turning out competent
- I stress the word 'competent' - graduates at a phenomenal rate.
That's what caused the problem.

Interviewer: Problem?

Stroustrup: Yes, problem. Remember when everyone wrote Cobol?

Interviewer: Of course, I did too

Stroustrup: Well, in the beginning, these guys were like demi-gods.
Their salaries were high, and they were treated like royalty.

Interviewer: Those were the days, eh?

Stroustrup: Right. So what happened? IBM got sick of it, and invested
millions in training programmers, till they were a dime a dozen.

Interviewer: That's why I got out. Salaries dropped within a year, to
the point where being a journalist actually paid better.

Stroustrup: Exactly. Well, the same happened with 'C' programmers.

Interviewer: I see, but what's the point?

Stroustrup: Well, one day, when I was sitting in my office, I thought
of this little scheme, which would redress the balance a little. I
thought 'I wonder what would happen, if there were a language so
complicated, so difficult to learn, that nobody would ever be able
to swamp the market with programmers? Actually, I got some of the
ideas from X10, you know, X windows. That was such a bitch of a
graphics system, that it only just ran on those Sun 3/60 things.
They had all the ingredients for what I wanted. A really ridiculously
complex syntax, obscure functions, and pseudo-OO structure. Even now,
nobody writes raw X-windows code. Motif is the only way to go if you
want to retain your sanity.

Interviewer: You're kidding...?

Stroustrup: Not a bit of it. In fact, there was another problem. Unix
was written in 'C', which meant that any 'C' programmer could very
easily become a systems programmer. Remember what a mainframe systems
programmer used to earn?

Interviewer: You bet I do, that's what I used to do.

Stroustrup: OK, so this new language had to divorce itself from Unix,
by hiding all the system calls that bound the two together so nicely.
This would enable guys who only knew about DOS to earn a decent living
too.

Interviewer: I don't believe you said that...

Stroustrup: Well, it's been long enough, now, and I believe most people
have figured out for themselves that C++ is a waste of time but, I must
say, it's taken them a lot longer than I thought it would.

Interviewer: So how exactly did you do it?

Stroustrup: It was only supposed to be a joke, I never thought people
would take the book seriously. Anyone with half a brain can see that
object-oriented programming is counter-intuitive, illogical and
inefficient.

Interviewer: What?

Stroustrup: And as for 're-useable code' - when did you ever hear of
a company re-using its code?

Interviewer: Well, never, actually, but...

Stroustrup: There you are then. Mind you, a few tried, in the early
days. There was this Oregon company - Mentor Graphics, I think they
were called - really caught a cold trying to rewrite everything in
C++ in about '90 or '91. I felt sorry for them really, but I thought
people would learn from their mistakes.

Interviewer: Obviously, they didn't?

Stroustrup: Not in the slightest. Trouble is, most companies hush-up
all their major blunders, and explaining a $30 million loss to the
shareholders would have been difficult. Give them their due, though,
they made it work in the end.

Interviewer: They did? Well, there you are then, it proves O-O works.

Stroustrup: Well, almost. The executable was so huge, it took five
minutes to load, on an HP workstation, with 128MB of RAM. Then it ran
like treacle. Actually, I thought this would be a major stumbling-block,
and I'd get found out within a week, but nobody cared. Sun and HP were
only too glad to sell enormously powerful boxes, with huge resources
just to run trivial programs. You know, when we had our first C++
compiler, at AT&T, I compiled 'Hello World', and couldn't believe
the size of the executable. 2.1MB

Interviewer: What? Well, compilers have come a long way, since then.

Stroustrup: They have? Try it on the latest version of g++ - you won't
get much change out of half a megabyte. Also, there are several quite
recent examples for you, from all over the world. British Telecom had
a major disaster on their hands but, luckily, managed to scrap the
whole thing and start again. They were luckier than Australian Telecom.
Now I hear that Siemens is building a dinosaur, and getting more and
more worried as the size of the hardware gets bigger, to accommodate
the executables. Isn't multiple inheritance a joy?

Interviewer: Yes, but C++ is basically a sound language.

Stroustrup: You really believe that, don't you? Have you ever
sat down and worked on a C++ project? Here's what happens: First,
I've put in enough pitfalls to make sure that only the most trivial
projects will work first time. Take operator overloading. At the end
of the project, almost every module has it, usually, because guys
feel they really should do it, as it was in their training course.
The same operator then means something totally different in every
module. Try pulling that lot together, when you have a hundred or
so modules. And as for data hiding. God, I sometimes can't help
laughing when I hear about the problems companies have making their
modules talk to each other. I think the word 'synergistic' was
specially invented to twist the knife in a project manager's ribs.

Interviewer: I have to say, I'm beginning to be quite appalled at
all this. You say you did it to raise programmers' salaries? That's
obscene.

Stroustrup: Not really. Everyone has a choice. I didn't expect the
thing to get so much out of hand. Anyway, I basically succeeded.
C++ is dying off now, but programmers still get high salaries -
especially those poor devils who have to maintain all this crap.
You do realise, it's impossible to maintain a large C++ software
module if you didn't actually write it?

Interviewer: How come?

Stroustrup: You are out of touch, aren't you? Remember the typedef?

Interviewer: Yes, of course.

Stroustrup: Remember how long it took to grope through the header files
only to find that 'RoofRaised' was a double precision number? Well,
imagine how long it takes to find all the implicit typedefs in all
the Classes in a major project.

Interviewer: So how do you reckon you've succeeded?

Stroustrup: Remember the length of the average-sized 'C' project?
About 6 months. Not nearly long enough for a guy with a wife and
kids to earn enough to have a decent standard of living. Take the
same project, design it in C++ and what do you get? I'll tell you.
One to two years. Isn't that great? All that job security, just
through one mistake of judgement. And another thing. The universities
haven't been teaching 'C' for such a long time, there's now a shortage
of decent 'C' programmers. Especially those who know anything about
Unix systems programming. How many guys would know what to do with
'malloc', when they've used 'new' all these years - and never bothered
to check the return code. In fact, most C++ programmers throw away their
return codes. Whatever happened to good ol' '-1'? At least you knew you
had an error, without bogging the thing down in all that 'throw' 'catch'
'try' stuff.

Interviewer: But, surely, inheritance does save a lot of time?

Stroustrup: Does it? Have you ever noticed the difference between a
'C' project plan, and a C++ project plan? The planning stage for a
C++ project is three times as long. Precisely to make sure that
everything which should be inherited is, and what shouldn't isn't.
Then, they still get it wrong. Whoever heard of memory leaks in a
'C' program? Now finding them is a major industry. Most companies
give up, and send the product out, knowing it leaks like a sieve,
simply to avoid the expense of tracking them all down.

Interviewer: There are tools...

Stroustrup: Most of which were written in C++.

Interviewer: If we publish this, you'll probably get lynched, you
do realise that?

Stroustrup: I doubt it. As I said, C++ is way past its peak now, and
no company in its right mind would start a C++ project without a pilot
trial. That should convince them that it's the road to disaster. If not,
they deserve all they get. You know, I tried to convince Dennis Ritchie
to rewrite Unix in C++.

Interviewer: Oh my God. What did he say?

Stroustrup: Well, luckily, he has a good sense of humor. I think both
he and Brian figured out what I was doing, in the early days, but never
let on. He said he'd help me write a C++ version of DOS, if I was
interested.

Interviewer: Were you?

Stroustrup: Actually, I did write DOS in C++, I'll give you a demo
when we're through. I have it running on a Sparc 20 in the computer
room. Goes like a rocket on 4 CPU's, and only takes up 70 megs of
disk.

Interviewer: What's it like on a PC?

Stroustrup: Now you're kidding. Haven't you ever seen Windows '95?
I think of that as my biggest success. Nearly blew the game before
I was ready, though.

Interviewer: You know, that idea of a Unix++ has really got me
thinking. Somewhere out there, there's a guy going to try it.

Stroustrup: Not after they read this interview.

Interviewer: I'm sorry, but I don't see us being able to publish
any of this.

Stroustrup: But it's the story of the century. I only want to be
remembered by my fellow programmers, for what I've done for them.
You know how much a C++ guy can get these days?

Interviewer: Last I heard, a really top guy is worth $70-$80 an hour.

Stroustrup: See? And I bet he earns it. Keeping track of all the
gotchas I put into C++ is no easy job. And, as I said before, every
C++ programmer feels bound by some mystic promise to use every damn
element of the language on every project. Actually, that really annoys
me sometimes, even though it serves my original purpose. I almost like
the language after all this time.

Interviewer: You mean you didn't before?

Stroustrup: Hated it. It even looks clumsy, don't you agree? But when
the book royalties started to come in... well, you get the picture.

Interviewer: Just a minute. What about references? You must admit,
you improved on 'C' pointers.

Stroustrup: Hmm. I've always wondered about that. Originally, I
thought I had. Then, one day I was discussing this with a guy who'd
written C++ from the beginning. He said he could never remember
whether his variables were referenced or dereferenced, so he always
used pointers. He said the little asterisk always reminded him.

Interviewer: Well, at this point, I usually say 'thank you very much'
but it hardly seems adequate.

Stroustrup: Promise me you'll publish this. My conscience is getting
the better of me these days.

Interviewer: I'll let you know, but I think I know what my editor
will say.

Stroustrup: Who'd believe it anyway? Although, can you send me a
copy of that tape?

Interviewer: I can do that.

The Lesser-known Programming Languages

SIMPLE
SIMPLE is an acronym for Sheer Idiot's Monopurpose Programming
Language Environment. This language, developed at the Hanover College
for Technological Misfits, was designed to make it impossible to write
code with errors in it. The statements are, therefore, confined to
BEGIN, END and STOP. No matter how you arrange the statements, you
can't make a syntax error. Programs written in SIMPLE do nothing
useful. Thus they achieve the results of programs written in other
languages without the tedious, frustrating process of testing and
debugging.

LITHP
This otherwise unremarkable language is distinguished by the absence
of an "S" in its character set; users must substitute "TH". LITHP is
said to be useful in protheththing lithtth.

SLOBOL
SLOBOL is best known for the speed, or lack of it, of its compiler.
Although many compilers allow you to take a coffee break while they
compile, SLOBOL compilers allow you to travel to Bolivia to pick the
coffee. Forty-three programmers are known to have died of boredom
sitting at their terminals while waiting for a SLOBOL program to
compile. Weary SLOBOL programmers often turn to a related (but
infinitely faster) language, COCAINE.

SARTRE
Named after the late existential philosopher, SARTRE is an extremely
unstructured language. Statements in SARTRE have no purpose; they just
are. Thus SARTRE programs are left to define their own functions.
SARTRE programmers tend to be boring and depressed, and are no fun at
parties.

C-
This language was named for the grade received by its creator when
he submitted it as a class project in a graduate programming class.
C- is best described as a "low-level" programming language. In fact,
the language generally requires more C- statements than machine-code
statements to execute a given task. In this respect, it is very
similar to COBOL.

FIFTH
FIFTH is a precision mathematical language in which the data types
refer to quantity. The data types range from CC, OUNCE, SHOT, and
JIGGER to FIFTH (hence the name of the language), LITER, MAGNUM and
BLOTTO. Commands refer to ingredients such as CHABLIS, CHARDONNAY,
CABERNET, GIN, VERMOUTH, VODKA, SCOTCH, and WHATEVERSAROUND. The many
versions of the FIFTH language reflect the sophistication and
financial status of its users. Commands in the ELITE dialect include
VSOP and LAFITE, while commands in the GUTTER dialect include HOOTCH
and RIPPLE. The latter is a favorite of frustrated FORTH programmers
who end up using this language.

Top 25 Explanations by Programmers when their programs don't work.

Top 25 Explanations by Programmers when their programs don't work.

1. Strange...
2. I've never heard about that.
3. It did work yesterday.
4. Well, the program needs some fixing.
5. How is this possible?
6. The machine seems to be broken.
7. Has the operating system been updated?
8. The user has made an error again.
9. There is something wrong in your test data.
10. I have not touched that module!
11. Yes yes, it will be ready in time.
12. You must have the wrong executable.
13. Oh, it's just a feature.
14. I'm almost ready.
15. Of course, I just have to do these small fixes.
16. It will be done in no time at all.
17. It's just some unlucky coincidense.
18. I can't test everything!
19. THIS can't do THAT.
20. Didn't I fix it already?
21. It's already there, but it has not been tested.
22. It works, but it's not been tested.
23. Somebody must have changed my code.
24. There must be a virus in the application software.
25. Even though it does not work, how does it feel?

Assembly Instructions Defined

Assembler programs are written with short abbreviations called MNEMONICS, in other words instead of writing GOTO, the programmer writes JMP or even BRA (branch).

These instructions are frequently abbreviated into total incomprehensibility. Of course, we all know that abbreviations are arbitrary. Anyone who has spent any time programming in assembler knows that all computers can be programmed using an undocumented set of instructions. Frequently when an error is made writing a program
in assembler a user can actually see the program executing the undocumented instructions. These instructions vary from machine from machine, but all computers have a certain set of them in common. As a service to humanity, I am here revealing these common instructions
for the first time.

ARG: Agree to Run Garbage
BDM: Branch and Destroy Memory
CMN: Convert to Mayan Numerals
DDS: Damage Disk and Stop
EMR: Emit Microwave Radiation
ETO: Emulate Toaster Oven
FSE: Fake Serious Error
GSI: Garble Subsequent Instructions
GQS: Go Quarter Speed
HEM: Hide Evidence of Malfunction
IDD: Inhale Dust and Die
IKI: Ignore Keyboard Input
IMU: Irradiate and Mutate User
JPF: Jam Paper Feed
JUM: Jeer at Users Mistake
KFP: Kindle Fire in Printer
LNM: Launch Nuclear Missiles
MAW: Make Aggravating Whine
NNI: Neglect Next Instruction
OBU: Overheat and Burn if Unattended
PNG: Pass Noxious Gas
QWF: Quit Working Forever
QVC: Question Valid Command
RWD: Read Wrong Device
SCE: Simulate Correct Execution
SDJ: Send Data to Japan
TTC: Tangle Tape and Crash
UBC: Use Bad Chip
VDP: Violate Design Parameters
VMB: Verify and Make Bad
WAF: Warn After Fact
XID: eXchange Instruction with Data
YII: Yield to Irresistible Impulse
ZAM: Zero All Memory
PI : Punch Invalid
POPI: Punch Operator Immediately
RASC: Read And Shred Card
RPM: Read Programmers Mind
RSSC: Reduce Speed, Step Carefully (for improved accuracy)
RTAB: Rewind Tape and Break
RWDSK: ReWind DiSK
SPSW: Scramble Program Status Word
SRSD: Seek Record and Scar Disk
WBT: Water Binary Tree

An engineer, a mathematician, and a computer programmer are driving down the road when the car they are in gets a flat tire. The engineer says that they should buy a new car. The mathematician says they should sell the old tire and buy a new one. The computer programmer says they should drive the car around the block and see if the tire fixes itself.

The Programmer's Drinking Song

PROGRAMMERS' DRINKING SONG

100 little bugs in the code,
100 bugs in the code,
fix one bug, compile it again,
101 little bugs in the code.

101 little bugs in the code.....
(Repeat until BUGS = 0)

  Jesus and Satan have an argument as to who is the better
programmer. This goes on for a few hours until they come
to an agreement to hold a contest, with God as the Judge.
They set themselves before their computers and begin. They
type furiously, lines of code streaming up the screen, for
several hours straight. Seconds before the end of the
competition, a bolt of lightning strikes, taking out the
electricity. Moments later, the power is restored, and God
announces that the contest is over. He asks Satan to show
what he has come up with.
Satin is visibly upset and cries, "I have nothing, I lost
it all when the power went out."
"Very well, then, " says God, "let us see if Jesus fared
any better."
Jesus enters a command, and the screen comes to life in
vivid display, the voices of an angelic choir pours forth
from the speakers.
Satan is astonished. He stutters, "B-b-but how?! I lost
everything yet Jesus' program is Intact! How did he do it?"
God Chuckles, "Everybody knows...Jesus Saves."

Code Jargon - Translated

Here's some code jargon - translated:

1. A NUMBER OF DIFFERENT APPROACHES ARE BEING TRIED
- We are still pissing in the wind.

2. EXTENSIVE REPORT IS BEING PREPARED ON A FRESH APPROACH TO
THE PROBLEM
- We just hired three kids fresh out of college.

3. CLOSE PROJECT COORDINATION
- We know who to blame.

4. MAJOR TECHNOLOGICAL BREAKTHROUGH
- It works OK, but looks very hi-tech.

5. CUSTOMER SATISFACTION IS DELIVERED ASSURED
- We are so far behind schedule the customer is happy to
get it delivered.

6. PRELIMINARY OPERATIONAL TESTS WERE INCONCLUSIVE
- The darn thing blew up when we threw the switch.

7. TEST RESULTS WERE EXTREMELY GRATIFYING
- We are so surprised that the stupid thing works.

8. THE ENTIRE CONCEPT WILL HAVE TO BE ABANDONED
- The only person who understood the thing quit.

9. IT IS IN THE PROCESS
- It is so wrapped up in red tape that the situation
is about hopeless.

10. WE WILL LOOK INTO IT
- Forget it! We have enough problems for now.

11. PLEASE NOTE AND INITIAL
- Let's spread the responsibility for the screw up.

12. GIVE US THE BENEFIT OF YOUR THINKING
- We'll listen to what you have to say as long as it
doesn't interfere with what we've already done.

13. GIVE US YOUR INTERPRETATION
- I can't wait to hear this bull!

14. SEE ME or LET'S DISCUSS
- Come into my office, I'm lonely.

15. ALL NEW
- Code not interchangeable with the previous design.

16. YEARS OF DEVELOPMENT
- It finally worked!

17. LOW MAINTENANCE
- Impossible to fix if broken.

Dilbert and the Google Logo

Monday:

Boss: We need a new logo by Friday.  Any suggestions?


Tuesday:

Dilbert: We could drop the first two letters.  Boss: That's a no go idea.


Wednesday:

Dilbert: We could shorten it to three letters.  Boss: No. Goo isn't sticky.


Thursday:

Boss: We'll merge the logo with our vision care plan and call it synergy!


Friday:

Dilbert (behind O's of 'Google'): I can't see.

"XP" Defined

Does this mean that XP is now officially a buzzword?

Ged Byrne
Thursday, January 09, 2003

no, it's a buzzword for a long time now


Thursday, January 09, 2003

Yeah, it's a buzzword, and a really annoying one. For years, I've been using the letters "XP" to mean "cross-platform". Now the term is way too ambiguous because it might also mean "Extreme Programming" or "the latest version of Windows".

If only we had a tool that would enforce consistent namespace usage in real life just like compilers do for code...

Eric W. Sink
Thursday, January 09, 2003

You know, I actually use namespaces in conversation, or at least in IM. I have a coworker Work::Jay, an old friend from high school Past::Jay, and a friend now Present::Jay (who lives with one of my non-Jay coworkers, thus causing the original confusions, where Mark would say "Jay's leaving for vacation on Thursday," and I would respond "But he can't be, he's already said he's coming the the dev meeting Friday morning!" And then hit myself on the head.)

Mikayla
Thursday, January 09, 2003

Erik,

You don't like the term XP because you were... using it first? :) And I agree - it's a dumb term. I prefer 'pair programming'.

aa
Thursday, January 09, 2003

IIRC, "pair programming" is only a subset of XP. Doesn't really work as a synonym.

But then I don't know that much about XP...

sgf
Thursday, January 09, 2003

Yes, the same way that all the other Agile methodologies are buzzwords. Extreme programming (XP) just happens to be the one that happens to have the most hype associated with it.

Kent Beck chose to call his methodology "Extreme Programming" hoping that this name would get it some attention. After all, there are thousands of development methodologies out there and hundreds that are specific to the OO software development paradigm.

One Programmer's Opinion
Thursday, January 09, 2003

On misusing the word Extreme Programming:

I worked for a while at a customer site and one day the customer project manager (yes, we had customer project manager and "contractor" project manager) came to our office (big office, 8 to 12 developers; very loud). That was one day before going online (we were hopelessly trying to fix the biggest bugs under pressure) and after a few weeks of "death march" programming (long hours until 2 AM, afterwards McDonalds, no land in sight etc.) behind us. And then he said: Now we are doing extreme programming!

The same guy picked up the word "facade" at some conference and promptly his powerpoints were full of facades: He renamed the layer we called "Business Logic" as facade for the database!

I left the project.

Pointy Haired Boss
Thursday, January 09, 2003

Sink: oh my gosh namespaces for use in everyday life? =)

Wei
Friday, January 10, 2003

I am curious as to how he pronounces the :: in casual conversation.

Just me (Sir to you)
Friday, January 10, 2003

No need to pronounce it - it represents a space!

Mathematical Dunce
Friday, January 10, 2003

I think it should be done like Victor Borge's Phonetic Punctuation, where you use a different little sound to represent different punctuation marks. So it would be something like ' home ffsshhh Jay' and 'work ffsshhh Jay'.

(For those of you too young to remember this, try http://www.kor.dk/borge/b-mus-1.htm )

David Clayworth
Friday, January 10, 2003

A former boss of mine said that Object-Oriented technology is out of date, that it's been overtaken by other things. Funny how people writing in IEEE software and CACM seem to think that it's now the dominant paradigm in software development.

Having said that though, this is the same former boss that explained to me that he didn't have any formal qualifications in computing, but that if you spend enough time around software you find out that there's only a limited set of things they can do. - (Wow, yes I thought. Now I'm going to hear how this manager has independently reinvented computability theory. Soon he's going to discover that there are multiple ways of representing what computers can do and then he's going to postulate that they're equivalent - "the Pointy-Hair-Turing thesis".) I could have said something, but even if I had felt brave enough, I don't have words to adequately express the depth of my contempt.

Some people just don't know what they are talking about. Sadly, some of them get into positions of power.

Dafydd Rees
Thursday, January 30, 2003

Photo of a modern-day code warrior...