• 0 posts
  • 13 comments
Joined 3 years ago
Cake day: June 19th, 2023
  • Erm. Duplication of code is ok. Removing absolutely every duplicate function is just premature optimization imho.

    If you have two different customers with slightly different workflow then go ahead and create two mostly the same functions. When you will have 4 different customers with slightly different workflow, then its a time for refactoring, maybe extract basic same functionality into separate function/object, maybe introduce dynamic workflow using finite automata, maybe extract these functionality to separate modules… but never do it prematurily.

    Imho, sometimes ,removing of duplication very much increases complexity and code became hard to understand and hard to modify.

  • Hm, I still not sure about this article lesson.

    So, main issue is that users of old version can use new feature, but they should not? On a desktop app? But why they sould not be able to do it in the first place?

    I mean idea is good, but situation described in article looks like completely fictitious or incomplete…