4 ms·
I think Code Complete deserves its usual top spot on these lists. You need to understand the skill set of the typical entry level coder, even after acquiring a
by InclinedPlane 15y ago
I think Code Complete deserves its usual top spot on these lists. You need to understand the skill set of the typical entry level coder, even after acquiring a CS degree. There is so very, very much they don't know and Code Complete helps fill in a lot of the gaps. Most usefully it helps instill the idea that it's important to use practices that are backed up by evidence and that there is a lot more to learn when you get out of school. A lot of the advice in it may seem a little outdated or even trivial to a lot of developers, but it is not less fundamental. Being inculcated in the ideas that it's bad to break the build, that you need to build often, that finding and fixing problems earlier saves a crap-ton of effort, that using proper source control tools and bug tracking tools is generally incredibly helpful. It's easy to forget that there are devs out there who don't know these things, don't have the habits we think should be universal, etc.
As far as coding skill, I agree about Refactoring. Design Patterns is just a grab-bag of tools that are useful in some situations and harmful if misused or abused. Refactoring is a set of skills that are globally useful and are married to equally important models, terminology, and advice. Studying refactoring gives devs a much stronger ability to talk about, study, understand, reason about, and modify code. I'd much rather work with someone who was an expert in refactoring than someone who was an expert in design patterns.
Edit: also, Refactoring concentrates on changing existing code vs. greenfield development, which tends to be far more useful in practice.
- radicalbyte 15y agoThe value of the GOF book is in the way of thinking, not in the actual patterns themselves.
- BerislavLopac 15y agoI was seriously disilusioned when I have learned that most of the design patterns make sense only in strongly-typed languages, and that the whole mess that is abstract factory can in, say, PHP be replaced with a simple new $className();
- gtrak 15y agoBut then you realize, some people can only barely decipher what's printed on the pages, they consider it a bible, when it is in fact, a consequence of design compromises in pseudo-OOP langs like C++ and java. I really really hate singletons, visitors, factories, and all the lot, but I'm glad I can understand the intent of these things. I think being disillusioned with this book is a good stepping stone for devs, it felt like one to me.
- famousactress 15y agoI'm not sure I agree. I suspect the vast majority of them (including abstract factories) make loads of sense in most languages.. it's just that strongly typed languages make many of the patterns complicated enough to implement that they deserve a chapter's worth of description.
- apu 15y agoYes. See Peter Norvig (Director of Research at Google)'s slides on this topic here: http://norvig.com/design-patterns/ http://norvig.com/design-patterns/
- InclinedPlane 15y agoVery much so. However, it's much less successful at instilling that way of thinking than Refactoring is. Worse yet, many readers becomeoverly enamored with the "canonical" design patterns, seemingly not realizing that most of them are special purpose constructs and only useful in very specific circumstances (and in some languages wholly obsolete). They also often don't understand that those examples are but a drop in the bucket amongst the universe of useful patterns (many of which assuredly haven't even been created yet).
- radicalbyte 15y ago>Very much so. However, it's much less successful at instilling that way of thinking than Refactoring is. That's why I like PoEAA - Fowler is better writer than the GOF so his books do a better job of bringing the ideas across.
- famousactress 15y agoSomeone once told me that the value of the GOF book was that it provides a common vocabulary for shared ideas. I believe that now. That's what (and maybe all) it's good for in my mind. The problem with using it to impart a method of thinking in my mind is that the way of thinking (and the patterns themselves) really have to be earned. I think it's possible for a book to do a fair job at imparting that wisdom, but GOF is setup terribly for it. It's sort of like picking up a recipe book full of classical french dishes without learning about french cooking first. It's too easy to misunderstand the specific values and compromises of specific 'ingredients' and undo the benefit the pattern could provide altogether. I've wondered before if GOF could be rethunk with Refactoring in mind. Starting with code smells is exactly right. The book should focus more on identifying problems with an approach, because that's the hard part. Solutions are much easier.