vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Mike: "VI? Notepad? Hmmm... you should use MS Word; it's a much better product for writing!" And how many times has a customer come in and asked me to make a change and wonder why I wasn't using a word processor to edit my programs!? Rob -----Original Message----- From: owner-informix-list@iiug.org [mailto On Behalf Of Mike Badar Sent: Friday, September 23, 2005 11:45 AM To: informix-list@iiug.org Subject: RE: Set Lock Mode To Wait 30 in environment? Rob, > One of the first things I did when I took over as the Sr. > DBA/Analyst on > site was to STANDARDIZE all of the ad hoc code and rewrite all of the > crons. I do NOT like to use global variables in programming. > By using > standardized variable and naming conventions, and very simple > and basic > structures and modularity in writing, I'm able to have simple shell > script utilities that can go through all of the code and make global > changes. Initially it does take more time to use your approach; however, the benefits in the future far outway the heavy short term investment. This approach applies to any programming language; I use it every day. > This is where vi search comes in (I love vi!). I always have to laugh to myself when I'm at a client site and I ask the person I'm working with to edit the file with "vi"; they respond with, Huh..., I only use "notepad". Mike > -----Original Message----- > From: owner-informix-list@iiug.org > [mailto > Rob (Contractor) > Sent: Friday, September 23, 2005 6:40 AM > To: Art S. Kagel; informix-list@iiug.org > Subject: RE: Set Lock Mode To Wait 30 in environment? > > This is where programming techniques standardization came in to play > here at my customer site. Now, I'm NOT a programmer, I'm a > logistician. > However, I wind up having to fix most of the ad hoc stuff and > write all > the heavy analysis jobs on the database. > > Almost DAILY, we have a request to make a GLOBAL change in file > destinations, email addresses, report locations, or some such thing. > > One of the first things I did when I took over as the Sr. > DBA/Analyst on > site was to STANDARDIZE all of the ad hoc code and rewrite all of the > crons. I do NOT like to use global variables in programming. > By using > standardized variable and naming conventions, and very simple > and basic > structures and modularity in writing, I'm able to have simple shell > script utilities that can go through all of the code and make global > changes. The basic steps are: > 1. Establish a naming convention > 2. Establish a fixed programming structure > 3. ENFORCE these with very draconian measures > 4. Shell script change package (I'll use email addresses as an > example): > a. ID location of files to change or feed it a list > b. Cat the files through a cyclic loop and sed the data element > > EXAMPLE PSEUDO CODE SNIPET FOR PROCESSING BY DIRECTORY > old_email_addr="id10t@aol.com" > new_email_addr="id10t@govt.com" > for JOB_DIR in dir_name dir_name dir_name > do > cd ${JOB_DIR} > ls -1 *.sh | while read file_spec > do > cat ${file_spec} | \ > sed "s/${old_email_adr}/${new_email_adr}/g" \ > > ${TMP}/${file_spec}.tmp > mv ${file_spec} ${file_spec}.bkup > mv ${file_spec}.tmp ${file_spec} > done > done > END PSEUDO CODE > > You can do the same thing for entire key phrases as long as you have a > UNIQUE identifier for them; this is where standardization comes in to > play. > > BUT YOU MUST REVIEW ALL CHANGES, even if it is a thousand > lines of code. > This is where vi search comes in (I love vi!). > > Rob > > -----Original Message----- > From: owner-informix-list@iiug.org > [mailto > On Behalf Of Art S. Kagel > Sent: Thursday, September 22, 2005 5:04 PM > To: informix-list@iiug.org > Subject: Re: Set Lock Mode To Wait 30 in envirionment? > > Bill Hamilton wrote: > > This is IDS 9.4 . > > > > There are many programs around here (c++/ado/Windows) where > programmers > > did not set the lock mode anyplace in their programs. > > > > Changing DEADLOCK_TIMEOUT won't help. > > What I would like is to cause the default behavior to wait > N seconds. > > I cannot find any ONCONFIG parameter or environment variable that > seems to > > do that. > > Is there such a thing? > > No. Nothing for it but to fix those apps. That's why there are code > reviews! > > Art S. Kagel > sending to informix-list sending to informix-list sending to informix-list |