psrc@pegasus.ATT.COM (Paul S. R. Chisholm) (10/30/89)
In article <1530@esquire.UUCP>, yost@esquire.UUCP (David A. Yost) writes: > Now we raise the question: is it really a good idea to try to > migrate an existing program to OO or is it better (quicker, more > maintainable) in the long run to redesign from scratch in the new > language using OO design? (If the latter is true, then it is all > the more clear that there is no contest between a cleanly- designed > higher-level OO language and a compatible C extension.) Hmmm. This is one of my warm buttons (I'm too jaded to have *hot* buttons, okay?-) First of all, it seems like no one's ever proud of the code they maintain, not even if they wrote it. I'm maintaining fifteen to twenty thousand statements of C code that I didn't write. A friend of mine is responsible for a (very roughly) similar amount of software that he was called in to write two or three years ago. Each of has looked at what we've got, and what we're being asked to do, and has been overcome by the feeling that we could do a better job if we tossed it all and started fresh. I got over this urge by talking with one of the quality folks here. He related the story of how one program (in an organization with lots of time pressure) had been written by one person, and passed on to four successive maintainers. *Each* of the four had rewritten the code from scratch. Now, either at most one of the five was a competent programmer, or this "fresh start" business is maybe more egotism than real promise. (This is purely anecdotal evidence; I ought to ask the quality guy to study this more carefully, if possible.) Second, how far back are you going to go? My instinct would be to reverse engineer the (non-object-oriented) design from the code (you'll be able to re-assemble a lot of the low level stuff in your OO design), then reverse engineer the requirements from the design, and only then start doing a new design. But will you end up re-evaluating your requirements? Yeah, sure, that's a good thing to do, make the customers happier with the final product. But will you still be in that business (will your firm still be in business at all) when your perfect product finally ships? > --dave yost Paul S. R. Chisholm, AT&T Bell Laboratories att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm I'm not speaking for the company, I'm just speaking my mind.