2 ms·
Loved the "incidental duplication" term. I will def start using it from now on. But to add to this, I want to say that the moment you find your self writing a
by kostarelo 7y ago
Loved the "incidental duplication" term. I will def start using it from now on.
But to add to this, I want to say that the moment you find your self writing a "helper" function, that's the moment when you must realize that you didn't understand the problem quite good.
As a rule of thumb and what I am always trying to pass to my peers at work etc, is to always try and think in terms of your domain and the models in it.
- What models does this helper function is acting upon or on behalf?
- Does it make more sense to create a model and put that function in it?
- Should that function be in a specific model or more that one?