Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> that's some manager's fantasy

The issue is that in a lot of shops design patterns have turned into a religion and not just a tool to help thinking. I've seen managers like that.

If you didn't implement 15 different design patterns in this or that code base that was "bad design", even if it unnecessarily made the code more complex.

I've seen iterators classes written when a simple for loop would have done the trick. I've seen chains of responsibility implemented when a basic switch statement would have been enough. Of course the code wasn't meant to be refactored in anyways. In fact complexity led to inability to refactor anything as nobody had a clue what went where ... and of course to manage all that bullshit we had to write tons of factories, because instantiating a single useful object now took 30 lines of code ...



Agree, that's a real issue, just like managers who treat agile as a religion and sadly give a fundamentally good thing a bad name.

Good programmers know the importance of YAGNI and the root of all evil that is premature optimisation. They should be well equipped to avoid over-engineering while still getting the learning benefits of patterns.

Chain of responsibility, for example, is a pattern I learned via GoF, have found it to be useful on several occasions. I quite possibly never would have known about it otherwise. At best, it would be left to chance for me to stumble on it or refactor into it enough times to recognise the pattern.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: