Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importance of clear code

Status
Not open for further replies.

StephenJSpiro

Programmer
Jul 10, 2001
143
US
This was passed on to me, and I pass on the advice for the newer programmers.....

"Code as if whoever maintains your code is a violent psychopath who knows where you live."--Nancy Lebovitz, the button lady


Stephen J Spiro
 
Hi,

My very good Volmac Coach Tjerk Zijlstra - year 1979 NL at Amro's office - with whom I lost contact :-( said always that our coffee-waitress should understand the source.

I certainly hope that my clients don't work with a violent psychopath.

B-)

Regards,

Crox

PS. May The Source be with you!


 
Once I saw this coding:

MOVE ZERO TO PIETJE.

(Pietje is a common Dutch persons name)

When I looked to the working storage section:

01 COPIETJE. (duminutive of COPY)
05 CO PIC X(1).
05 PIETJE PIC 9(1).

There is your violent psychopath!

M. BigMag, The Netherlands.
someone@euronet.nl (no kidding!)
 
Hi Mag,

We had our Pietje in America, too. His name is Fred, the most famous name in D.P., at one time.

Regards, Jack.
 
Had a colleague once who was creative with COBOL Paragraph names...
Sample code:
GO TO HELL.
PERFORM
WHAT-LIGHT THRU YONDER-WINDOW-BREAKS.
PERFORM
TIPTOE THRU THE-TULIPS.

Stephen J Spiro
 
I was taught that you should code so that the coding should be intuitively obvious to the most casual observer.
 
I always tell my students the following:

Any Idiot can write code that a genius could maintain
But it takes some genius to write code any idiot can maintain -- Anonymous
 
Comment! Comment! Comment!

I had a colleague at a place I used to work thank me one time because after I left there he had to document a program I had written. He said he literally just extracted my comments and "tweaked" it from there (since things were broken up into logical routines he had to tie those into the proper place in the main paragraph documentation). Still, he was quite happy he didn't have to try and "figure out" just what the heck I was doing in there. I know this is tooting my own horn, which I generally think is pretty uncool, but I am particularly proud that I tend to produce very easily maintainable code.

I know it takes extra time and some people don't like to do it, but I think any programmer that has to maintain something a year after you leave (or even you if you have to maintain your old code - it's hard to remember what you did a year ago sometimes) will definitely appreciate it.
 
I always tell my students that you should write your code for the benefit of the next programmer, because more often than not the next programmer is you. :)I Betty Scherber
Brainbench MVP for COBOL II
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top