Re: [Algorithm] Sum of Primes < 1000000
Lew wrote:
Patricia Shanahan wrote:
A lot depends on your confidence that reimplementation will be permitted
if the problem outgrows the O(n^n) solution.
Over the last thirty or so years, I have seen many projects where we
were told "we can always refactor it later", but later were told, "we
are not going to refactor given the investment in the existing codebase,
besides it works, doesn't it?"
As a practical matter it is almost impossible to get management buy-in
to throw away existing code no matter how terrible...(They always looked
so sad when I told them, "Port Steve's code? I never even looked at
Steve's code; I just rewrote the application from the specification.")
The investors pulled out all their money from the company two weeks
later (possibly for unrelated reasons). Welcome to the future.
There has to be an awful lot of pain before there is buy-in for
refactoring, and often not even then.
Wash your hands of it. If management says "we can always refactor it
later" get that in writing or on tape. If later it won't scale, point
out the earlier discussion (for which you have documentation). Also note
that they did invest money in the existing code, and they then got
however-many years of use out of it before their needs outgrew that
code. Replacing it isn't throwing away the investment, it's making a new
investment after an earlier one has paid off about all it's going to.
If they still don't see the light, wash your hands of it. Say "OK" and
do whatever. If the company goes kaput, gets scammed and goes kaput, or
whatever, well, you did your duty of warning them and they did their
duty of actually making the call. They got it wrong but not for lack of
information; it's not your fault. If you have the skills, you can find
another job and maybe one where your expertise will be better
appreciated. As for the company that goes under, well, that's Darwinism
at work. If the management can't find new work after it does, well,
that's probably also Darwinism at work. ;)