3 ms·
> Any mental model you had at week 1 is now irrelevant as the code has changed in unknown ways. Isn't that what good git commit messages are for though? (Or an
by feikname 9y ago
> Any mental model you had at week 1 is now irrelevant as the code has changed in unknown ways.
Isn't that what good git commit messages are for though? (Or any other source code versioning tool.)
I'm not saying tests aren't useful, but often times I find reading a file diff history is way more useful to understanding it than its tests.
IMO, tests should be there only to provide some level of feeling safe modifying files, as you can easily know if you messed up something.
- hacker_9 9y agoIt'll definitely show you the changes, but how far back do you start from? and how many files do you do this for? In addition, it doesn't show you how the dataflow changed; you need to model that in your head still. Tests would also do this for you, but without the mental burden of brain compiling. It's nice to be able to set some breakpoints in code, then start a quick debugging session with the relevant test and see the data flow through the code - you can understand any function usually within 5 minutes.