Philip,
>The first thought that popped into my head was that almost certainly the
>effect is based largely on context of which, here, there appear to be two
>fairly stong components.
I have been trying to think of situations where there might be more than
two ways of doing things in C. I have not been able to think of any
sensible situations. This is not true of some other languages I can
think of. But in C there can be lots of factors that could be taken into
account in reaching a decision. So I suspect that weighted scoring
is rarely used (too much effort required).
> First, the existing code would strongly bias the
>brain to focus on the method in use rather than some alternative.
>Second, the
>task is to add (or delete) one thing not to modify/fix the code.
>
>Thus, the first things that pops into the programmer's mind will almost
>certainly relate to modifying the existing code (within its current
>form) to
>do _just_ the one extra (or less) thing.
I suspect that alternatives will also pop into the developers head.
But the perceived cost of implementing them will be considered too
high. In most cases the cost of actually doing the work is small.
For instance in the if/switch situation the greater the number of if's
the more work that will be required to convert, but the reasons for
wanting to change to a switch increase with the number of if's.
Another situation is adding statements to a function. At some point
it will make sense to break that function up. In practice it is likely
to grow over time because nobody is willing to invest in the work needed.
What are the costs that developers perceive and how are they rated
in importance (what the actual costs might be are a side issue)?
derek
--
Derek M Jones tel: +44 (0) 1252
520 667
Knowledge Software Ltd mailto:[EMAIL PROTECTED]
Applications Standards Conformance Testing http://www.knosof.co.uk
- Automatic footer for [EMAIL PROTECTED] ----------------------------------
To unsubscribe from this list, mail [EMAIL PROTECTED] unsubscribe discuss
To join the announcements list, mail [EMAIL PROTECTED] subscribe announce
To receive a help file, mail [EMAIL PROTECTED] help
This list is archived at http://www.mail-archive.com/discuss%40ppig.org/
If you have any problems or questions, please mail [EMAIL PROTECTED]