DEV Community

loading...

Discussion on: Other People's Code and the Intentional Fallacy

Collapse
nektro profile image
Meghan (she/her)

What I got was that there are two types of optimization.

1) rewriting the implementation of a function to be faster or more efficient
2) making it so that function never has to be called in the first place.

What I think OP is trying to say is that we should be trying to do method 2 a lot often when we refactor, but it can be hard to determine why the function was written in the first place simply from the function's existence.