3 ms·
I think this commenting only makes sense if the design is atypical. Probably 90% of the code I write is following design patterns already used throughout the co
by zeroimpl 8y ago
I think this commenting only makes sense if the design is atypical. Probably 90% of the code I write is following design patterns already used throughout the code base.
- AstralStorm 8y agoAnd the 10% is unmaintained. Design patterns can tap you easily in bad designs. Usually the lost thing is performance, big way, or actual simplicity.
- AstralStorm 8y agoSince comnenter announce does not understand what I meant, it does not matter if design is typical. Functionality still has to be described, so the pattern itself buys you nothing on its own. Then the overarching idea and reasoning also has to be described to make it easier for everybody else to understand. I've met more than one codebase which tried to use a big hammer pattern to open doors. Heavy indirection to do simple things because of design choices, usually caused by a forced framework - instead of easily factorizable simplicity. Patterns should be emergent not forced. Or more specifically, the choice of appropriate pattern should be based on the problem being solved, rarely one pattern can cleanly solve all problems. Similarity is very seductive but end result is often complex and hard to reason about when followed religiously.