× 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.




On 01/04/2008, at 11:10 AM, Alan Campin wrote:

We have a service program that contains a function that gets next EDI
Id. One line of code and you got it. Nope, "I don't like to use that" so
he is writing half a dozen different version of the logic using monolith
code in each program to read the data area in character, convert it to
numeric, update the data thru data structures in global memory and then
move it back and then update the field rather than use the one line of
code.

I consider that a "standards" issue. "I don't like to use that" is NOT an acceptable excuse. Code reuse has a higher priority than likes and dislikes. If he worked for me he'd use the pre-existing function or he'd be looking for another job. Cloning code into multiple programs is unacceptable because it increases maintenance.

What annoys me the most is one should not have to EXPLAIN this stuff. It should be standard practice for programmer's and once something like this is pointed out they should WANT to use it.

Why do so many shops seem to tolerate people with this attitude? Why keep the dead wood around? If they don't want to move forward then get rid of them so they don't hold others back.


Even tried to show him how you could define the data area in "D" specs
and define the field as a zoned field right in the data structure so you
don't even have to mess with it. Nope, I prefer to define data
structures in global memory, move stuff into it, do the operation and
move it back out.


Ask him WHY? Get him to explain the advantages of his technique over the other more elegant technique. "I prefer" is not good enough unless there is really no documentation, coding, or performance advantage of one method over another.

This is another example of "Get the data structures right and the code falls into place". A slightly more complex data structure results in less executable code to maintain.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.