Article View: alt.folklore.computers
Article #1236Best Code
From: Gregd... Commander Krugannal
Date: Fri, 02 Feb 1990 18:50
Date: Fri, 02 Feb 1990 18:50
37 lines
2000 bytes
2000 bytes
The best bit of code I ever came across ran something like
the following:
IF (BOOL) Then
WRITE(*,*) 'BOOL is True!'
RETURN
ENDIF
IF (.NOT. BOOL) THEN
WRITE(*,*) 'BOOL is False!'
RETURN
ENDIF
WRITE(*,*) ' See below...'
Well, when I came across this, I decided to keep the general
structure, but replaced the final WRITE(*,*) Statement with
a call to our error message handler ERRMSG('Example of Trillian
Logic'). To the best of my knowledge no customer has ever
called in about this error message! (I would be real worried if
one did!)
In the same set of code, an earlier programmer after a set
of error conditions reached an error that was ALMOST impossible
to get. The comment? C User fall down and go BOOM!
That explained it as well as anything else.
What through me though one day was looking through a section
of code and coming across variable names such a LORADO, COWBOY,
etc. I had no idea where these names came from. Luckily, this
programmer is a friend of mine. So when I got home, I asked him.
It was simple, he had the song 'Streets of Lorado' (title?)
in his head all day, and when he needed a variable name, he took
it from the song! Between that and his lack of commenting, the
code was REAL interesting to try to figure out.
Greg_d...@mts.rpi.edu
Disclaimer: Why do I need one? Because my company was bought.
So these comments do not represent me, my company, or the company
that bought my company.
Technical Details
Message-ID:
<11212.1491.forumexp@mts.rpi.edu>Path:
mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!rpitsmts!forumexpShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!rpitsmts!forumexp From: Greg_d...@mts.rpi.edu (Commander Krugannal) Newsgroups: alt.folklore.computers Subject: Best Code Message-ID: <11212.1491.forumexp@mts.rpi.edu> Date: 2 Feb 90 18:50:00 GMT Lines: 37 Posted: Fri Feb 2 19:50:00 1990 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit