× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



date: Tue, 15 Oct 2013 09:22:33 -0400
from: Vinay Gavankar
subject: Re: CHAIN vs SETLL/READE

The intent here is to fetch the data record.

Actually there are 2 separate conditions: For one file, the record would
mostly be found, for other it would mostly not be found (I still need the
data whenever it is found).

Would the recommendation be different in these 2 cases?

Vinay

Changing up the question like this is useful.

Regardless of the choice taken in your first case, in this second case, you want to make the code almost redundant.
The blocks should be perfect copies of each other.
This is so the programmer coming behind you sees them are identical logic blocks.
Do not do anything different "for efficiency" or "for style" in the two different cases if it takes his eyes and mind 10 or 20 or 30 seconds to view the blocks
and understand your intent and assure himself they are satisfying that same intent.

You don't want him to have to ask himself, "why did that guy do it that way?" when he sees two different ways of coding the same process.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.