Re: Data Name = to more than one number

docdwarf_at_panix.com
Date: 02/10/04


Date: 10 Feb 2004 14:26:33 -0500

In article <c0b5ne$p05$1@peabody.colorado.edu>,
Howard Brazee <howard@brazee.net> wrote:
>
>On 10-Feb-2004, docdwarf@panix.com wrote:
>
>> 05 ORDER-ITEM-SERIES PIC X VALUE SPACES.
>> 88 VALID-SERIES-VALUE VALUES '1', '2', '3', '4', '5'.
>> 88 ITEMS-PRICED-NORMALLY VALUES '1', '2'.
>> 88 ITEMS-ON-SALE VALUES '3', '4'.
>> 88 ITEMS-DISCOUNTED-OTHER VALUE '5'.
>>
>> ...
>> EVALUATE TRUE
>> WHEN ITEMS-PRICED-NORMALLY
>> PERFORM NORMAL-PRICE-RITUAL THRU NPR-EX
>> WHEN ITEMS-ON-SALE
>> PERFORM SALE-PRICE-RITUAL THRU SPR-EX
>> WHEN ITEMS-DISCOUNTED-OTHER
>> PERFORM OTHER-DISCOUNT-RITUAL THRU ODR-EX
>> WHEN NOT VALID-SERIES-VALUE
>> PERFORM INVALID-ITEM-SERIES THRU IIS-EX
>> END-EVALUATE.
>>
>> (arguments about other aspects of the code given - upper case versus mixed
>> case, PERFORM THRU versus PERFORM, etc. - might best be left to other
>> threads)
>
>I have mixed feelings about defining in 88 levels. I do it a lot, but am aware
>that the code is removed from the EVALUATE enough that it can be missed:
>
>e.g.
>There is a danger that a maintenance programmer won't notice what happens when a
>value gets multiply assigned when someone adds '05' to ITEMS-PRICED-NORMALLY.

Assuming no code-review, no testing, no oversight for a two-year
programmer whatsoever...

... I do not see how this possibility is any greater than a maintenance
programmer not noticing a value getting multiply assigned in hard-coded
conditions; the advantage to the 88s is that changes are made in one
place only.

DD



Relevant Pages

  • One for adrian and da geek
    ... In the interests of creating employment opportunities in the Java ... To foil the maintenance programmer, you have to understand how he ... Much of the skill in writing unmaintainable code is the art of naming ...
    (uk.local.southwest)
  • Re: misconceptions on computer science
    ... > Become a maintenance programmer, ... > anyone of using uninitialised pointers, ... the maintenance programmer. ... "The caterpillar does all the work and the ...
    (comp.object)
  • Re: Are decorators really that different from metaclasses...
    ... >>of foo, used somehow by foo in the calculation of its return value. ... > I assume you mean that this is what you'd like a programmer to intend? ... that examines its own metadata in the computation of its result. ... but it would include defining those. ...
    (comp.lang.python)
  • Re: Cannot compile with _FILE_OFFSET_BITS = 64
    ... lseek() and ints that can't hold 2^22. ... could solve this by moving the LL to the second 1024, but I think that's an overly subtle solution; a maintenance programmer might not realize why the exact position of the 'LL' is critical. ... Yes, but incompetent C programmers are commonplace, and from my past experience I suspect that there is a good chance that sooner or later one of them will be assigned to do maintenance work on some of my code. ...
    (comp.lang.c)
  • Re: The Problem with Perl
    ... > the issue of programmer skill as definitively as you think it does. ... > defining interfaces are the hard part of the job. ... How meany people work on a perticular patch to the linux kernal? ...
    (comp.lang.perl.misc)