- Tags:: #📚Books , [[Coding best practices|Coding best practices]], [[tdd|Tdd]] - Author:: [[michael-c.-feathers|Michael C]] - Liked:: 6 - Link:: [Working Effectively with Legacy Code [Book]](https://www.oreilly.com/library/view/working-effectively-with/0131177052/) - Source date:: [[2004-09-22]] - Finished date:: [[2017-01-01]] - Cover:: ![[cover_working_effectively_with_legacy_code.png|100]] ## Why did I want to read it? I first picked up this book when I started to work on Braintec, to deal with a large legacy project in Odoo. ## What did I get out of it? ### What Is Unit Testing? >In the industry, people often go back and forth about whether particular tests are unit tests. Is a test really a unit test if it uses another production class? I go back to the two qualities: **Does the test run fast? Can it help us localize errors quickly?** (p. 13) >A test is not a unit test if: >1. It talks to a database. >2. It communicates across a network. >3. It touches the file system. >4. You have to do special things to your environment (such as editing configuration files) to run it. (p. 14)