7 ms·
Ideally, you automate a check like that. Because the answer turns out to actually be "humans are profoundly bad at that kind of pattern recognition." A compute
by shadowgovt 1y ago
Ideally, you automate a check like that. Because the answer turns out to actually be "humans are profoundly bad at that kind of pattern recognition."
A computer will be able to tell that the 497th has a misspelled `CusomerEmail` or that change 829 is a regexp failure that trimmed the boolean "CustomerEmailAddressed" to "CustomerEmailed" with 100% reliability; humans, not so much.
- makeitdouble 1y agoYou're not just reviewing the individual lines, but also which context, and which files are impacted. And automating that part would still mean reviewing the automation and the 1000+ changes to move to it. Sure 1000+ changes kills the soul, we're not good at that, but sometimes there's just no other decent choice.
- eviks 1y agoOh, certainly, didn't mean that you had to avoid using your IDE to autorename a variable yourself (to avoid the boolean issue) and diffed results to those of the PR Or that you had to avoid Ctrl+F "CustomerEmail" and see whether you had 1000 matches that matches the number of changed files or only 999 due to some typo. Or using the web interface to filter by file type to batch your reviews. Or... Just that in none of those cases there is anything close to our memory/attention capacity.
- deleted 1y ago[deleted]
- shadowgovt 1y agoI envy your IDE being able to do a rename of that scale. I work in a large C++ codebase and a rename like that will actually just crash my vscode instance straight-up. (There are good automated tools that make it straightforward to script up a repository-wide mutation like this however. But they still generate PRs that require human review; in the case of the one I used, it'd break the PR up into tranches of 50-ish files per tranche and then hunt down individuals with authority to review the root directory of the tranche and assign it to them. Quite useful!)
- trenchpilgrim 1y agoYeah VSCode is pretty terrible at refactorings that Jetbrains or Zed will do basically instantly.
- const_cast 1y agoWe already automate that, it's called a compiler. The human review is just for kicks for this type of thing. Of course some languages... PHP... aren't so lucky. $customer->cusomerEmail? Good luck dealing with that critical in production, fuckheads!
- muglug 1y agoWhat if I told you there were tools for that
- const_cast 1y agoI'm aware of the tools, I write PHP daily. The point is moreso that PHP won't stop you from doing that. It will run, and it will continue running, and then it will throw an error at some point. Maybe. If the code is actually executed. If it's in a branch that's only executed like 1/1000 times... not good.