home *** CD-ROM | disk | FTP | other *** search
- Sender: PHYDESBONNET@IE.UCG.VAX1
- From: "Scott L. Baker" <BAKER@EARN.VUCTRVAX>
- Subject: A few tips on C...
-
-
- (This came from USEnet...)
-
-
- -------------------------------------------------------------------
- From: ms0p+@andrew.cmu.edu (Michael Gordon Shapiro)
- Newsgroups: rec.humor.funny
- ------------------------------------------------------------------
-
-
- (Left on the blackboard by students in a Real-Time Systems course)
-
- How to program in "C"
- ---------------------
- 1] Use lots of global variables.
- 2] Give them cryptic names such as: X27, a_gcl, or Horace.
- 3] Put everything in one large .h file.
- 4] Implement the entire project at once.
- 5] Use macros and #defines to emulate Pascal.
- 6] Assume the compiler takes care of all the little details you didn't
- quite understand.
-
-
-
-
- How to debug a "C" program.
-
- ---------------------------
-
- 1] If at all possible, don't. Let someone else do it.
- 2] Change majors.
- 3] Insert/remove blank lines at random spots, re-compile, and excecute.
- 4] Throw holy water on the terminal.
- 5] Dial 911 and scream.
- 6] There is rumour that "printf" is useful, but this is probably unfounded.
- 7] Port everything to CP/M.
- 8] If it still doesn't work, re-write it in assembler. This won't fix the
- bug, but it will make sure no one else finds it and makes you look bad.
-
-
- --
-
- -------------------------------------------------------------------------------
-
- "It's 5:50 a.m., Do you know where your stack pointer is?"
-
- "No, and neither does my program..."
-
- -----------------------------------------------------------------------------
-
- --
- =========================================================================
-
- Dear Friends,
-
- There are many people, who, for no fault of their own, are
- forced to write in COBOL. Whereas some of us work out 2 plus 2
- by saying "PRINT 2+2" or something equally laconic (indeed the
- older ones amongst us can actually do such calculations in our
- heads), COBOL sufferers have to say "ADD 2 TO 2 GIVING THE
- ANSWER, PLEASE, NICE MR COMPUTER, AND SEND ME A MEMO ABOUT IT IN
- TIME FOR THE BOARD MEETING"
-
- So what can we do for these people? One answer is therapy. Here
- is a typical case study of a sufferer locked away in solitary
- confinement with nothing but IBM manuals to keep him company.
-
- Day 1: Subject persistently screaming for Oxford English
- Dictionary (20-odd volumes). Gnawed three of his toes off when
- this request denied.
-
- Day 2: Subject very subdued, and starts compiling his own
- dictionary from bits of bed linen and stale soup.
-
- Day 3: Subject befriends a wasp in the cell, and starts asking it
- to add two and two.
-
- Day 4: First breakthrough. Subject reads IBM manual.
-
- Day 5: Subject complains that his bed needs emergency
- engineering.
-
- Day 6: Subject tears up his dictionary and starts listing abend
- codes.
-
- Day 7: Success. Subject says "ICH 9000I Good morning" when his
- warder brings him a bowl of porridge.
-
- ... as you can see, there is some way to go before a complete
- cure can be guaranteed.
-
- Meanwhile send lots of money to me. This is nothing to do with
- the campaign, I just want some money.
- =========================================================================
-