4 ms·
It would have been. But it wasn't my code, I was merely using it. I think better structuring would have helped the code much more than unit tests. Unit tests ar
by hashhar 9y ago
It would have been. But it wasn't my code, I was merely using it. I think better structuring would have helped the code much more than unit tests. Unit tests are good to ensure you don't break things. But spaghetti code that passes tests is still considered broken by my standards.
- pmarreck 9y ago> I think better structuring would have helped the code much more than unit tests. This is why you TDD. Your code will automatically become more modular/structured by the very nature of having to unit-test it "right then and there" instead of hours later when you finished the component without any tests and decide to bang out a few basic integration tests and then head to happy hour and call it a day. > Unit tests are good to ensure you don't break things. But spaghetti code that passes tests is still considered broken by my standards. I agree, that's still technical debt. You literally cannot write spaghetti code if you TDD, though. You would feel a massive friction.