3 ms·
Well, it kinda is? Teaching materials should show how to not refactor too. Also have u seen refactors in clean code? Guy refactors thread safe code by introdu
by hardware2win 3y ago
Well, it kinda is? Teaching materials should show how to not refactor too.
Also have u seen refactors in clean code?
Guy refactors thread safe code by introducing static variables which make code not thread safe, but hey! At least it is a little bit shorter!
- ajuc 3y agoYup this is the worst part of Clean Code. I've seen real-life bugs caused by this kind of refactoring. The best part is that the same commit added unit tests so our coverage grew over the magic 80% bar, but of course unit tests don't usually test for race conditions.