3 ms·
Maintainability is not just about you changing your code later on; it's about someone else trying to understand what you were thinking when you write it.. and t
by phzbOx 15y ago
Maintainability is not just about you changing your code later on; it's about someone else trying to understand what you were thinking when you write it.. and then change it. Tests make that process way easier. You can add your new feature without wasting time to understand everything else and still make sure it's working. If it's your own project, meh, you know your stuff. You even know all the hack you did to gain time. I see tests as a documentation that shows me what's working. Reading tests (high level ones) is usually the first thing I do when starting on a new project. Comments change over time.. documents aren't updated.. people leave.. but tests remain. If the test passes, it doesn't mean everything is perfect, but at least you know that these things work.
- deleted 15y ago[deleted]
- gambler 15y agoPlease note that the grandparent post specifically asks about unit testing and unit testability, while you speak in much broader terms. Automated regression tests can be created in may ways, including UI-level tests that don't require any changes in coding practices at all.