3 ms·
Not only the resulting abstraction is harder to adapt, but the abstraction itself is badly chosen. The first and foremost thing you want to refactor is the rep
by lifthrasiir 3y ago
Not only the resulting abstraction is harder to adapt, but the abstraction itself is badly chosen.
The first and foremost thing you want to refactor is the repetitive set of arguments. As it stands, all those arguments will come from interacting with handles, so you can reasonably expect that they are deeply coupled with handle changes (for example, it may allow for fixed 1:1 aspect ratio in the future). So they should go to its own object or even class, so that some duplicates can go into its methods while allowing for individual changes. And then you can decide whether you want to refactor more or stop there. Some refactoring changes are clearly beneficial in virtually all counts, others less so, and mixing them is not a good strategy.