Re note some refactoring techniques and concepts Bad Smells in code: Duplicate, long method, large class, long parameter list, divergent change (?), shotgun surgery Feature envy, Data clumps, lazy class, middle man, message chains, ... Techniques: Composing methods, Moving features between objects Organizing data Simplifying conditional expressions Making method calls simpler Dealing with generalization Some interesting material from Sundell for some ideas, technique on what is bad code and how to refactor it. Lightweight API design in Swift https://www.swiftbysundell.com/articles/lightweight-api-design-in-swift/ Often when we design how our various types and functions will interact with each other, we have to find some form of balance between power and ease of use. Make things too simple, and they might not be flexible enough to enable our features to continuously evolve — but on the other hand, too much complexity often leads to frustration, misund...
Some tribes of the programmer clan.