Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Other folks' VFP code
Message
From
21/07/2006 13:51:13
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
21/07/2006 13:16:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01138495
Message ID:
01138635
Views:
14
>Fine. But that's not "rewriting the code".

To me it is wrong to alter the code in any way unless there is a specific need to do so. One little slip, a variable name changes, the code continues to run, but the reports come out slightly wrong. It could take weeks to track down the accidental change.

Imagine a publisher telling two authors they have to write in a certain style while collaborating.

Readability is in the eye of the beholder, therefore there's no winning any style debate. I therefore dismiss all considerations of style. I can read and work with any style. I don't force anyone to use my style and I will not be forced to use anyone elses. Be adaptable. Use your own style because you are more productive in it. Craig's modification of Doug's code is more time consuming than it would be if he had learned to ignore Doug's style.

Anything architectural takes precedence over style. Even though I've now inherited several programs spanning 15 years, I can work with all of it. Going through and "enhancing" it to fit my style would be ludicrous. I recently left some unfortunate abuse of arrays alone, because I could augment the code without breaking the "architecture" of it.




>
>I think that's what the OP was talking about, don't you?
>
>cheers
>
>>There is one person whose code I look at frequently and I always make changes. That person is Doug Hennig. I don't change the working code itself. All I do is remove the stuff after the ENDIF, ENDDO, etc. Doug finds this style easier, I find it more difficult. One way is not any more or less correct than another....it's just a different in style.
>>
>>>If this is working code that is "production" in nature (i.e. the business depends on it) then re-writing it should be your LAST CONSIDERATION.
>>>
>>>Sooner or later you HAVE TO learn to read and work with other people's code, and the sooner you face that music, the better off you and your clients will be.
>>>
>>>The book(s) on "refactoring" seems to have been interpreted by many as official license to re-write whatever code you may dislike. While it doesn't say that at all, it's awfully convenient to see it that way.
>>>
>>>cheers
Previous
Reply
Map
View

Click here to load this message in the networking platform