On Mon, Jul 24, 2023 at 1:55?PM Steve Gordon <sgordonphd@...> wrote: ?
Interesting! I advocate becoming comfortable refactoring away from patterns, because many programmers still feel subtle cues of guilt or shame related to undoing design decisions, especially "bigger" ones, such as introducing a pattern. I have noticed a trend in phases. Each phase increases options and decreases anxiety, guilt, shame, blame, that kind of thing: 1. Person X gets used to refactoring in general, so that it's no big deal to change "little" design decisions. 2. X gets used to refactoring away from patterns, so that it's no big deal. They make peace with changing their mind, even after making "bigger" decisions, such as refactoring towards a pattern. 3. X notices that, since they can refactor away from a pattern, it's OK to refactor towards a pattern somewhat prematurely. 4. X notices that, since they can refactor towards a pattern, it's OK to wait for stronger signals that the pattern will help, trusting that they'll refactor towards the pattern when that becomes clear. The end results seem the same, except that when someone in phase 1 or phase 2 tries to postpone refactoring to a pattern (for the good reasons you describe), they might never break through phases 3 and 4. I notice a meta-pattern that (many) people who have made it through phase 4 routinely advise people in phase 1 or phase 2 to do things that stop them from progressing through phases 3 and 4. They do it to try to protect the less-experienced, but it often results in robbing them of the experience they need to progress. J. B. (Joe) Rainsberger :: ?:: :: Replies from this account routinely take a few days, which allows me to reply thoughtfully. I reply more quickly to messages that clearly require answers urgently. If you need something from me and are on a deadline, then let me know how soon you need a reply so that I can better help you to get what you need. Thank you for your consideration. -- J. B. (Joe) Rainsberger :: :: :: Teaching evolutionary design and TDD since 2002 |