And as others have noted, how much time you are actually given. PMs and managers don’t know or care about code quality, they just want something to work NOW
And there is never time to maintain the code, because each project only want to add more feature/s which makes the spaghetti code even worse.
In my group we had a golden opportunity to fix all old mistakes but no, we (decided by PO and group manager) needed to spend all time on proof of concepts that will go to production at earliest in 5 years. Now that opportunity is gone and we are crunching in order to meet the deadlines instead. Still with bad code quality of course.
And as others have noted, how much time you are actually given. PMs and managers don’t know or care about code quality, they just want something to work NOW
And there is never time to maintain the code, because each project only want to add more feature/s which makes the spaghetti code even worse.
In my group we had a golden opportunity to fix all old mistakes but no, we (decided by PO and group manager) needed to spend all time on proof of concepts that will go to production at earliest in 5 years. Now that opportunity is gone and we are crunching in order to meet the deadlines instead. Still with bad code quality of course.