when I am supposed to fix tech debt? if every week there is another functionality going out that needs to be done yesterday? Do you think that I have to do it in my free time? Why should I even bother existing
Try to lie about how long will it take. Just today I finished* 1-month almost total rewrite of firmware for one of devices at my work. It started as a 1-week small rewrite of part of communication module for a small bug and was scheduled as that. But I've got chill PM and coworkers who will appreciate that now we can actually fix some 8yr old bugs in legacy parts of that code.
* well, now some testing of edge cases and another round of fixes but at least remote code updating works so we can ship those devices...
Edit: "Lie" is call to action here, there were some misunderstanding in comments. Previous start of my comment was "Lie. ..."
I've been in a similar situation and our approach was to make a business case for the rewrite.
* Original programmer who was the team lead was gone and had no interest in consulting for us
* Code was thousands of lines of completely uncommented 8051 assembly language
* Code had known bugs
* Bug fixing and documenting/understanding would likely go on for months
* We could not integrate the rest of the system functionality without a complete understanding of that undocumented code
* We were confident that one person could rewrite it in less than six weeks since we had complete knowledge of what it needed to do.
And then left it up to management as to what was the best approach. They were making a completely informed decision, but phrased the way we did, no reasonable person would have told us to continue with buggy, undocumented code that was at the heart of the system we were building.
I'm often on the receiving end of completely unrealistic estimates. It would piss me off to no end to find out that someone lied about how long they expected something to take.