
OO Design Principles Compilation - DanielRibeiro
http://mmiika.wordpress.com/oo-design-principles/
======
techiferous
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.

~~~
extension
Someone please add this to the top of the list.

There is little value in following programming rules that you don't
understand.

~~~
fleitz
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.

------
Silhouette
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.

------
hello_moto
This list is very useful. It's 2011 now and you have no idea how many people
don't know more than half of the list.

~~~
Nate75Sanders
and also how many programmers are extremely effective and know perhaps none of
the list.

~~~
hello_moto
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.

------
vintharas
following the same topic...
[http://www.barbarianmeetscoding.com/blog/2011/2/23/best-
prac...](http://www.barbarianmeetscoding.com/blog/2011/2/23/best-practices-
principles-of-object-oriented-design-classes)

~~~
quannum
Looks like the server has been hacker news'd.

------
gooberdlx
There's only one rule to OOP: All instance variables should be private.

~~~
tjpick
there's more to it than that.

