Your example is a much easier way of "grokking" the principle than reading the definition, even it's name. I guess we need a name in order to "put a name" to a concept but sometimes solving a coding problem will lead to a solution where you use a principle without knowing it.
e.g. not sure what db I'll end up using for this project - I'll make it so I can switch databases easily. Which means creating a common interface for the crud methods, abstracting the db specific details away and passing the database in.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your example is a much easier way of "grokking" the principle than reading the definition, even it's name. I guess we need a name in order to "put a name" to a concept but sometimes solving a coding problem will lead to a solution where you use a principle without knowing it.
e.g. not sure what db I'll end up using for this project - I'll make it so I can switch databases easily. Which means creating a common interface for the crud methods, abstracting the db specific details away and passing the database in.