I recently started working for a software company in another country. They flew me over to make progress with the project. I did some tasks there and then came back to my homeland to continue working from here.
I have been tasked with building new features for a poorly written web-based application. I really don't understand the spaghetti code. It has no documentation, does not use any design patterns, and the data structure is not normalized.
The project management is messed up: there's no backlog, they don't follow any software methodology, and don't even use emails for communication. Everything is discussed on calls. The team does take notes, but there is no integration. The managers don't understand the complexity involved. I have lost interest in the project.
The management asked me for a plan to complete the tasks. In a rush of blood, I told them I would deliver by Wednesday. I cannot finish my tasks, and I have lost my sleep. Every piece of code I touch breaks something else, and I cannot refactor or add the required features by the committed time.
How should I tell my boss that I cannot meet the deadline?
I really don't care about getting fired because the company doesn't meet the culture I was expecting, and I don't want to work here anymore, but I don't want to leave in a way that management feels disrespected either, considering they invested some money in me.