[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Best Practices
- Subject: Re: Best Practices
- From: Wayne Ivory <wivory@WSL.COM.AU>
- Date: Mon, 1 Feb 1999 11:08:36 +0800
I've just come back from two and a half weeks holiday. There certainly have been some interesting posts going on here. It's taken me 3 hours to get through them all (and follow up the ones I was interested in).
On best practices, I'd like to agree with Richard about leaving blank lines between procedures. There is research that shows when reading general text (eg text books) long paragraphs are tiring to read. In fact, we are psychologically conditioned to subconciously groan when we see a long paragraph coming up. Short paragraphs make us think "Well, that doesn't look too hard.". I think the same applies to reading code. As has been stated though, anything can be overdone.
Secondly, Ray mentioned that when dealing with a 4500 line monster one of his main tactics was looking at what the procedures are and where they are called from. Forgive me for blowing my own horn, but I find my SQR Tree utility (which is available from the library page of the SQR Users Group) very useful for doing this. You can see all the top level procedure calls, and drill down where you need to see more detailed procedures. From the outset I wrote it for me for exactly this purpose and I use it all the time. The decision to make it available to others was because I was asked to do so.
Wayne Ivory
Information Services
Westralian Sands Limited
>>> Ray Ontko <rayo@ONTKO.COM> 1/2/99 3:16:15 am >>>
For general advice on SQR coding styl, feel free to borrow from our
SQR Coding Standards and Naming Conventions:
http://www.ontko.com/sqr/sqrstnds.html
As for dealing with a 4500 line program that you didn't write,
I always look for three things to give me an idea of what's
going on:
What are the procedures, and where are they called?
What are the selects and other SQL statements doing?
What arrays and load-lookup are declared and used?
HTH.
Ray
> Hi, I was wondering if some of you hardened SQR users wouldn't mind sharing
> your best practice recommendations. I think a lot of users on this list
> would benefit. What prompted this is that I am now sitting looking at an
> SQR program that has evolved into a 4500 line monster and wondering what I
> should have done to better manage the code. Thanks.
----------------------------------------------------------------------
Ray Ontko | Ray Ontko & Co | "Time for a new signature line."
rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/