|
|
|
|
|
by pytester
2534 days ago
|
|
This is why I actually prefer it if people don't learn them. Where people apply them directly I've seen them misused more often than not and where they were used correctly, more often that not they emerged naturally without anybody ever really thinking "hey, we should use [design pattern] here". Another bonus of that is that the user wouldn't be tempted to, for example, use the word "factory" in method/class names, which bugs the hell out of me. I think I've been asked to implement singleton in python in at least three interviews and when I pointed out that a module was a natural singleton and that you didn't really need to "implement" it per se, I got blank stares each time. Sometimes no knowledge is better than learning by the book. |
|