|
|
|
|
|
by kolme
663 days ago
|
|
There was a great refactoring chance in the example where the cache was removed. That is, extracting the caching logic from the API call logic. Caching could have been a more generic function that wraps the API call function. That way each function does exactly one thing, and the caching bit can get reused somewhere else. Instead, this weird advice was given: changing behavior is bad refactoring. Which is weird because that's not even what we call refactoring. Edit: removed unnecessary negativity. |
|