What is Law of Demeter?
A method should only talk to its friends, not strangers. Avoid long chains like a.b.c.d.

ask order.total() · not a.b.c.d
The Law of Demeter discourages…
Write it in your own words in the app.
In real work
Law of Demeter: checkout calls order.total(), not order.customer.wallet.balance.
In the illustration
A long jointed rod snakes through order, customer and wallet to poke the balance, jostling every box; it retracts and instead turns the total knob on the order box's own face.
Scan the order view model in your coding agent for chains like order.customer.address.city and fix each law of demeter violation by adding a method on the nearest object that answers the question.
Try it now
The fastest way to learn a word is to use it. Open this line in the agent you already work in and watch what it does. Change the tool to the one you use.
Go further
01Practice
Make it stick
One term a day, a short quiz, and sentence practice that checks your own words.
02Verify
Prove you know it
Pass the quiz and keep it in a Skills Wallet you can share with anyone who needs proof.
03Career
Find the work that uses it
See which roles lean on this vocabulary, and what they pay in year one.





