[U2] Lock Management (was part of 'Good Programming Practice')

2005-09-30 Thread Ewinger Klaus
My whole point in the original posting is, that many application programmers do not even think about correct locking sequences, transactions and deadlock avoidance. All they do is make sure that the record is locked while updating. This is not enough! As part of a Good Programming Practice I

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Serguei
I think there is such thing as good practice. But it is not an MV good practice. The rules of good programming practice are the same in any programming language. But not all languages allow the programmer to follow all the rules. And some programming languages force the programmer to follow some

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Serguei
The one you don't understand what it is doing when you see it for the first time. - Original Message - From: Mark Johnson [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Sent: Friday, September 30, 2005 3:55 AM Subject: Re: [U2] Good Programming Practice Question. Define

RE: [U2] Source Code Management

2005-09-30 Thread Brian Leach
Karen I originally used to use RCS under UniVerse with some simple verbs that committed items in and out of a work directory using an index file to map account|file|item paths to work file keys. This meant that I could easily manage items from hashed files (eg dictionaries) using some simple

RE: [U2] CLEARINPUT - Universe

2005-09-30 Thread Anthony Dzikiewicz
Thats a good idea. An error routine could do like certain web pages do. Like when you have to enter the code displayed in the box. The code displayed is always random. Anthony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of rbl000 Sent: Thursday,

[U2] Webinar oct. 6 timezones??

2005-09-30 Thread Claus Derlien
The Webinar october the 6. is announced to take place from 10:00 am to 11:30 pm PDT i have found out that im 9 hours ahead of that timezone, so it will be a night session for me, but as always the american way of displaying time is confusing me... Am I right in believing that the time span

Re: [U2] Source Code Management

2005-09-30 Thread Serguei
We too used RCS for some time later moving to Microsoft Source Safe (our developers work on Windows). We don't have anything special made for it - we simply have Work directory set to a developer's account. It is easier for us as we have a in-house developed editor for uniBasic that understands

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Susan Joslyn
Sometimes, if a subroutine is only called during certain situations (thus, not often) and the file used by the subroutine is not used by the main program, opening the file within the subroutine that uses it makes sense to me. - From: Mark Johnson

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Susan Joslyn
One thing that has been over-looked in this conversation is the notion of 'lowest common denominator programming'. My software runs on all MV platforms. Therefore, whenever possible, I stick with syntax that works on all platforms. When that is not possible, I resort to calls and includes and

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Mark Johnson
Fair enough. Mark Johnson - Original Message - From: Serguei [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Sent: Friday, September 30, 2005 4:29 AM Subject: Re: [U2] Good Programming Practice Question. The one you don't understand what it is doing when you see it for the

RE: [U2] To locate the last occurrence of a sub-string in a string

2005-09-30 Thread Tom Dodds
This might work. Not one line, but close. TTD 5 lines long. : P 0001: A = 'ACBACCACDACEACF' 0002: X = COUNT(A,'AC') 0003: Y = INDEX(A,'AC',X) 0004: CRT X, Y, A[Y,2] 0005:END Bottom at line 5. : EX Basic (Y/N) ?N TTD 5 13AC Tom Dodds [EMAIL

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Colin Jennings
Sometimes, if a subroutine is only called during certain situations (thus, not often) and the file used by the subroutine is not used by the main program, opening the file within the subroutine that uses it makes sense to me. One problem with that Susan - what happens if the file doesn't

RE: [U2] Good Programming Practice Question.........

2005-09-30 Thread Brian Leach
Susan, You make a good point, but the problem with that approach is that it stifles innovation and learning - though not in your case, of course :-) I have known programmers who took a 'lowest common demoninator' approach that was based on systems that were obsolete 20+ years ago, ignoring

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Mats Carlid
Serguei wrote: The one you don't understand what it is doing when you see it for the first time. I like that .. but it might instead be the algorithm that is hard to understand if you're not familiar with it. E.g the first time you see a parser 's central loop you're not likely to grasp

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Gordon J Glorfield
And your SOX auditors haven't had a cow over that practice? Ours about died from apoplexy when they saw all the archive stuff in our production file. The only thing allowed in the production file are the programs currently in production. We were forced to create a non-compilable archive

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Gordon J Glorfield
FOR X = 1 TO PROMPT.CNT *some code here* *Back up one prompt* X = X - 1 - (X # 1) NEXT X Gordon J. Glorfield Sr. Applications Developer MAMSI (A UnitedHealth Company) 301-360-8839 [EMAIL PROTECTED] wrote on 09/29/2005 10:55:26 PM: Define tricky looking code. Thanks.

RE: [U2] Good Programming Practice Question.........

2005-09-30 Thread colin.alfke
The first programming book I read called this the: Shirley Temple Principle - i.e.. Don't' get too cute. It provided an example of a multi-line If-Then-Else construct compressed into one line. Strangely enough it kind of looked like some f-correlatives I've seen. Colin Alfke Calgary, Canada

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Richard Sammartino
It is recommended that the extra variable be create to prevent unnecessary machine cycles. It was considered a good programming practice when we were using Prime computers back in the mid 1980's. The explanation was that every iteration of the FOR / NEXT loop caused the cpu to calculate the

RE: [U2] Good Programming Practice Question.........

2005-09-30 Thread Richard Taylor
I agree. Subroutines should be of a reasonable size for the task to be performed, but to limit by lines is really unnecessary. In fact it can lead to a over-use of subroutines (yes there is such a thing) that creates very fragmented code. I was guilty of this in a sizable utility and it became

RE: [U2] Good Programming Practice Question.........

2005-09-30 Thread Keith W. Roberts
Original Message From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Taylor Sent: Friday, September 30, 2005 7:53 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Good Programming Practice Question. I would add a few: 1) no multi-command lines (i.e.

RE: [U2] Good Programming Practice Question.........

2005-09-30 Thread Keith W. Roberts
Absolutely! But if you obey the rule that a statement should have only one purpose, you will never, ever attempt to write that on one line. :) Oh, and one other thing ... I despise constructs like: IF (expr) ELSE do.something which can *always* be written more clearly as: IF

RE: [U2] Good Programming Practice Question.........

2005-09-30 Thread Keith W. Roberts
C'mon! How difficult *is* it with your editor to convert it to block format when either clause becomes multi-line?!? -Keith Original Message From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin King Sent: Friday, September 30, 2005 10:51 AM To:

RE: [U2] Good Programming Practice Question.........

2005-09-30 Thread Kevin King
C'mon! How difficult *is* it with your editor to convert it to block format when either clause becomes multi-line?!? Difficulty isn't the issue, easily differentiating what was changed in source history is the issue. When an single line IF is converted to a block IF there is a change to a line

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Roger Glenfield
Exception to no multi-command lines. TOT(1,1)=0; TOT(1,2)=0; TOT(1,3)=0; TOT(1,4)=0; * Resets array for this loop And as far as no MATREADS/WRITES. You can always INCLUDE the DIM statements. Which can also include the equates for standardized variable names for each attribute. And yeah,

RE: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Allen E. Elwood
I beg to differ. As an old dog, I've learned a couple of new tricks on this list. My favorite new trick is a TWO liner readnext loop. LOOP WHILE READNEXT ID DO GOSUB stuff REPEAT Gosh I like that!! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL

[U2] Posts

2005-09-30 Thread Glen Batchelor
Chuck, Can you check the domo config for me? Before, I was getting bounced as a non-member but I was still getting all of the traffic. Now, after resubscribing, I can post but I'm also getting double traffic. I think it may be an e-mail address conflict (with and without the - in

RE: [U2] Source Code Management

2005-09-30 Thread Tony Gravagno
I'm glad Brian stepped up with his comments below. There is a difference between source control and software management. Everyone has different requirements so when someone says I need source control and everyone chimes in with CVS, etc, it's like proposing a helicopter to someone who needs

RE: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Keith W. Roberts
I find that counter-intuitive. I prefer one extra line: LOOP READNEXT ID ELSE EXIT GOSUB stuff REPEAT Does the same and is more straightforward. -Keith Original Message From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allen E. Elwood Sent: Friday, September 30,

RE: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Bill_H
Garry: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, September 30, 2005 1:18 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Good Programming Practice - Axiom - Nobody cares what anyone has to

RE: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Allen E. Elwood
Well, that's what I *was* using for the past decade. I like the elimination of another indent. Many times I find that the calling section becomes one of the most busy areas of decision making, and therefore reducing the indent's, even by one, makes it slightly more readable. Since I never need

RE: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Noah Hart
I have to disagree Garry. I am a seasoned programmer, cutting my teeth on everything from ALGOL to PASCAL, with stops in Assembler, SQL, Java, Visual anything. However, I am a newbie in the Unidata world. Most of the time when I want to do anything interesting from file i/o to string searching

RE: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Allen E. Elwood
2c ?? At alt-155 just before alt-156 ? :) (depress alt, type 155 on the keypad, release alt) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Noah Hart Sent: Friday, September 30, 2005 14:58 To: u2-users@listserver.u2ug.org Subject: RE: [U2] Good

RE: [U2] Source Code Management

2005-09-30 Thread Tom Dodds
My experience with Perforce is that it is very pricy. Separate license for each person that will access or contribute to the data. It is a good solution and being outside of the MV environment has some advantages as far as security is concerned. I have also worked with PRC and it is

RE: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Keith W. Roberts
Original Message From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Noah Hart Sent: Friday, September 30, 2005 2:58 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Good Programming Practice - Axiom - I have to disagree Garry. I am a seasoned programmer, cutting

RE: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Noah Hart
I think it used to be on the keyboard, in an unshifted spot just to the right of the semicolon. It's been too long ... but my right pinky claims it was there. GRIN Noah -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allen E. Elwood Sent: Friday,

RE: [U2] Good Programming Practice Question.........

2005-09-30 Thread Susan Joslyn
Brian, When you say pre-compiler ... tell me ... drooling ... have you written something that combs through BASIC code to highlight platform specific syntactical differences? My fantasy is to build an engine and then to build a small database of the commands (strings) as key that don't work or

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Mark Johnson
Files that can't open are usually solved pretty quickly either after installing the software or making the changes. The downstream elaborate errmsgs for OPEN CUSTOMER TO F.CUSTOMER ELSE PRINT CANNOT OPEN THE CUSTOMER FILE. PLEASE CONTACT YOUR PROGRAMMER. PROGRAM TERMINATING ; STOP OPEN INVENTORY

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Mark Johnson
Is compression bad? One could debate the intracicies of when to use multi-line IF-THEN-ELSE and when to keep it as one line. My 1 cent - Original Message - From: [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Sent: Friday, September 30, 2005 9:38 AM Subject: RE: [U2] Good Programming

Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Mark Johnson
CONTINUE and EXIT have greatly reduced the addition of labels to continue or exit from loops. Kudos. Like I mentioned before. There is no and never will be such a thing as MV programming standards. VAR-level or individual-level of course. But not even UV, UD, D3 or a whole platform can create or

Re: [U2] Programming Metrics (was Good Programming Practice Question.........)

2005-09-30 Thread Mark Johnson
Kevin: Believe it or not, READABLE. Many of the code I inherit isn't even indented. BFORMAT or FORMAT cleans up so much. From there, remove commented code lines and archive the evolution of the current version. That alone removes a lot of the clutter that is in the way. At that point the

Re: [U2] Programming Metrics (was Good Programming Practice Question.........)

2005-09-30 Thread Mark Johnson
I endorse this in another regard. Sometimes, you may have a nice DICT sub written as an ITYPE that you cannot pass other files or stuff to and the sub does all the work. Then you can share that sub with English and Data/Basic. I miss this in D3. My 1 cent. Mark Johnson - Original Message

Re: [U2] Good Programming Practice - Axiom - ........

2005-09-30 Thread Mark Johnson
D3 has LOOP READNEXT ID ELSE EXIT UNTIL 0 DO REPEAT FYI. - Original Message - From: Allen E. Elwood [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Sent: Friday, September 30, 2005 4:33 PM Subject: RE: [U2] Good Programming Practice - Axiom - I beg to differ. As an old