I really like the diagrams from Refactoring.Guru.
They provide clear representation of what the design patterns are solving, along with real world analogies.
I can't really come up with any good illustrations for something complex off the top of my head, so I'll go for a really simple one. In fact, that's part of its beauty.
When I had to deal with the signals from a rotary encoder the first time (being a programmer with two left hands and zero hardware affinity), I had a look at a couple of C libraries but didn't have the patience to slog through their implementations in order to understand what signals they were decoding. ...until I saw this: https://github.com/PaulStoffregen/Encoder/blob/master/Encode... I'm not sure if it was this exact library, but that's the comment I saw. Nice and obvious, in contrast to all the obscure attempts to convey what was happening all the other libs made through prose comments.
Comments (312) 127 threads
Earlier commentshttps://i.imgur.com/TOoXyVs.png
Example with factories: https://refactoring.guru/design-patterns/factory-method
When I had to deal with the signals from a rotary encoder the first time (being a programmer with two left hands and zero hardware affinity), I had a look at a couple of C libraries but didn't have the patience to slog through their implementations in order to understand what signals they were decoding.
...until I saw this: https://github.com/PaulStoffregen/Encoder/blob/master/Encode...
I'm not sure if it was this exact library, but that's the comment I saw. Nice and obvious, in contrast to all the obscure attempts to convey what was happening all the other libs made through prose comments.
(I'd love to see similar style animations of various crypto algorithms like MD5, AES, etc if anyone has the cycles.)
[1] https://upload.wikimedia.org/wikipedia/commons/b/bd/Networkf...
[2] https://en.wikipedia.org/wiki/Cascading_failure
All comments shown.
Couldn't load more comments. Check your connection and try again.