Honestly, I think that's one of Joel's poorer articles. He writes a lot of good stuff, but he's not always right - his views on giving programmers their own office in isolation of others runs in complete contradiction to the reasons for success at many startups that have grown into the big boys like Google, and Facebook for example not to mention many such articles including the one you linked are ancient now (this one is 14 years old) and understanding of problems changes. He makes a lot of claims in this particular article without really any founding:
"It's important to remember that when you start from scratch there is absolutely no reason to believe that you are going to do a better job than you did the first time."
This is complete nonsense. When you've worked with a codebase for a while you begin to understand it's deficiencies, sometimes they can be resolved with a simple refactor, but other times there's a more fundamental problem with the whole underlying architecture, and at that point a rewrite is a sensible option.
"Back to that two page function. Yes, I know, it's just a simple function to display a window, but it has grown little hairs and stuff on it and nobody knows why. Well, I'll tell you why: those are bug fixes. One of them fixes that bug that Nancy had when she tried to install the thing on a computer that didn't have Internet Explorer. Another one fixes that bug that occurs in low memory conditions. Another one fixes that bug that occurred when the file is on a floppy disk and the user yanks out the disk in the middle. That LoadLibrary call is ugly but it makes the code work on old versions of Windows 95."
These are mostly symptoms of why the codebase should be re-written, if it's full of hacks, sorry "bug fixes" like this then it's a sign that there were design deficiencies from the outset. You shouldn't have LoadLibrary calls everywhere to fix things because you should've had a platform abstraction layer which hides all that away in one comfortable place. Worse, because the codebase is full of such hacks, the maintainability of the codebase would be atrocious. You'll be throwing away hours trying to understand the implications of changes on these hacks, and making these hacks work with changes, when a clean design learning from the issues in the original codebase would simply let you just write your changes without any worries about upsetting these hacks. He claims "Itâ(TM)s harder to read code than to write it." - that's only true if your codebase is a complete mess and needs rewriting in the first place.
Worse, because your codebase is full of hacks and unreadable code, the potential for difficult to track bugs increases drastically.
Which isn't to say I think rewrites are always a good idea, but I think his examples are poor - for every example of failed rewrites, there is at least an example of a successful rewrite. He's right that if you have a shit dev team that doesn't understand the problems the software is trying to solve well that a rewrite will likely fail also, but that's more a fundamental problem with having a shit dev team than any inherent problem with rewrites.
Most the time consumption in writing software is understanding how to solve problems, the reasons for needing a rewrite are generally architectural. It's not uncommon to be able to define a new architecture and move across knowledge of problem solving or even methods or classes to do so into a completely fresh architectural design. Unless your developers are an army of incompetent hen-pecking typists then writing code is the quick part.
So again, rewrites are not always part the solution, but if you're designing a more flexible and future proof architecture and going in with a development paradigm change, such as writing the new version in TDD, then you can most definitely end up with something that's higher quality, quicker to make changes too, and performs better resulting in a clear net gain in overall cost due to the drastic reduction in time spent bug fixing and generally maintaining it.
If a rewrite is going to take 3 months that sounds like an awful lot of time to sacrifice, but if you're halving the time it takes to do changes and you're doing a few multi-day changes a month, and are simultaneously removing a few days of time spent bug fixing per week then it's going to rapidly become worth it.
In the centre ground there's a question of when a rewrite becomes a rewrite anyway, is it a rewrite if you start a new project but copy a whole bunch of classes that were well designed over? As with pretty much everything there are made shades of grey, and I'd argue the level of rewriting that's required is proportional to the amount of time that's being lost on difficulty of maintenance. If you're losing many days per month on changes and are fixing many bugs per month because the codebase is a mess then it's time for a rewrite. If it's mostly okay but a bit crappy in places then refactor. If it's fine then most definitely don't rewrite just for the sake of it.