|
|
|
|
|
by latchkey
376 days ago
|
|
I used to code this way, then I started to write tests, as I was writing my code. I could ensure the behavior was expected with the test. If the code wasn't easily testable, I would refactor it right way and that would generally leave me with easier to read and follow code as well. The end benefit being that if I wanted to change the behavior later, now I knew if I was breaking anything. With everything tested, very little made it to production that wasn't working. |
|
You can try to avoid it by architecture or abstractions, but it only works to some extent.