Re:OO Design Principles Compilation
by techiferous on Sunday February 27, 2011 @06:13PM
(#2269292)
Notice the number of shoulds. A list of what you should do is like training wheels: useful for beginners but not as much for the advanced.
Instead of thinking in shoulds I like to think in terms of causes and effects. If you don't follow the law of demeter then these will be the effects. Then the programmer realizes they have a choice: even though the law of demeter usually brings about desirable consequences, maybe in a particular situation the effects of not following the law of demeter bring about the better set of consequences.
Thinking in terms of causes and effects also loosens potential dogma.
Re:OO Design Principles Compilation
by fleitz on Sunday February 27, 2011 @07:10PM
(#2269409)
Agreed. Most of software 'methodology' is really software ideology. It's just cargo cult programming. For me the key consideration in building software is whether it produces more money than it consumes.
Re:OO Design Principles Compilation
by Silhouette on Sunday February 27, 2011 @03:27PM
(#2268827)
I prefer to think of these as rules of thumb rather than principles. I agree with the spirit of pretty much all of them, but to me, "principle" sounds like one of those rules you're never supposed to break. There are often trade-offs to following these sorts of rules, and sometimes the cost is too high or the process too idealised for real world projects.
Re:OO Design Principles Compilation
by hello_moto on Sunday February 27, 2011 @04:23PM
(#2269011)
The number of programmers who practiced Object Oriented mainstream languages and don't know at least a single item in list and are extremely effective is probably close to the number of unicorns that exist in this world :).
People don't just suddenly know how to write good programs. They read materials, they write code and continue to learn from other people.
Sorry, I don't buy the myth and folklore. I used to about 3-4 years ago before I realized that many stories were hyped up.
Instead of thinking in shoulds I like to think in terms of causes and effects. If you don't follow the law of demeter then these will be the effects. Then the programmer realizes they have a choice: even though the law of demeter usually brings about desirable consequences, maybe in a particular situation the effects of not following the law of demeter bring about the better set of consequences.
Thinking in terms of causes and effects also loosens potential dogma.
There is little value in following programming rules that you don't understand.
People don't just suddenly know how to write good programs. They read materials, they write code and continue to learn from other people.
Sorry, I don't buy the myth and folklore. I used to about 3-4 years ago before I realized that many stories were hyped up.