I've heard people say that the average lifespan of software is about 3 years, but that seems shockingly low to me. I don't buy it.
After all, some of my clients have lumbering mainframes that have been around for 20 years, and they're so entrenched that they might live forever.
I personally tend to start talking about severe refactoring when the platform gets so old that it's bad for our skills (we are contractors) and otherwise inefficient to keep maintaining the project. I'm thinking about ASP Classic here. That can be a 5 to 8 year window, and it doesn't even need to be a rewrite.
Of course, I have also seen projects that incurred a lot of technical debt because someone caved to stakeholders too often or a dev didn't know how to plan for change. Or the project was started on a weak platform that didn't scale well. That radically reduces the lifespan.
Maybe those projects are the ones that tend to live 3 years. Or less.
One last thought: Some studies have proven that it's cheaper to maintain old code than to write new, and I believe it. Rewriting large systems is always way harder and more expensive than it looks.
Does all of this conspire to indicate that developers tend to re-write too early, and perhaps naively? I'm thinking yes, and I can see how that's an easy mistake to make.
What are your experiences here?