As promised, the continuation of Code of Principles is here. This time I’m going to talk about stuff that is less canonical and perhaps not so well known. Today’s motto is that you are not alone. There are strangers, psychopaths, users, fellow developers and good scouts out there.
Don’t talk to strangers
Let’s discuss Law of Demeter also known as Principle of least knowledge. Proposed in 1987 by Northeastern University, can be informally described in four bullet points:
- You can play with yourself (naughty boy).
- You can play with your own toys (but you can’t take them apart).
- You can play with toys that were given to you.
- And you can play with toys you’ve made yourself.
Which basically means that object should assume as little as possible about its environment, surroundings, its structure, properties and anything else, especially about Read the rest of this entry »