...that the computer code in their cash cow program is spaghetti, and a complete rewrite is in order? Especially under the assumption that you wish to keep them as a client?
Well, since one of the typical symptoms of spaghetti code is that it is linear and monolithic, you can always attack it from the side of testability. If you cannot write unit tests for discrete components, then how can you detect flaws in the code before they manifest in the wild? Likewise, you can't really benchmark the code for the same reason, so how can you determine where the bottlenecks are and where improvements can be made incrementally?
That being said, no one likes to hear that they have an ugly baby, so you need to tread carefully.
I just sent an e-mail off to the client, requesting a code review. I also described the code as "cluttered" and perhaps incomplete. From what I understand, he was the original coder, but not the only one. When we were working on a bug together the other day, he was also having some trouble navigating the code.
A code review is always the best place to start, so good move getting him to agree. The more he has trouble understanding the code and navigating it, the easier your job will be to explain how restructuring can be of benefit.
Part of the problem is that, due to the nature of what the tasks require, the code is being written in Visual FoxPro. I have a lot of experience in the language, and I don't have a problem with using it - but in VFP (because of its flexibility), it's just as easy to write garbage code as it is to write some well-crafted code. It's almost as if the previous coders don't know anything about it before version 3 (it's on version 9 now), which is when object orientation was introduced.
Comments 8
Needed? Pull together documentation to support the need.
Reply
That being said, no one likes to hear that they have an ugly baby, so you need to tread carefully.
Reply
We'll see what happens...
Raven
Reply
Raven
Reply
Reply
(I've written crap code before that I freely admit is crap.
That's what deadlines can do sometimes, the stupid "get it out the door I don't care if its untested or coded poorly" deal....)
Reply
But what do I know?
Raven
Reply
Reply
Leave a comment