absolutely, sunk costs fallacy is a huge problem of psychology when writing software in my 8 years working at this, when it's time to throw it in the trash, i work another week or two on it and then my hair turns even more gray and i want to throw myself off a cliff
no, i'm understating it the point at which you start to get really frustrated with the way you have done it, you will spend weeks trying to fix it and then spend a few days and rewrite it properly, and facepalm like this: https://cdn.satellite.earth/f3223de6bd9a04385c889308c6730248cdcd6db76a19084a3dcb31b031a4ee79.png