In the vast world of software engineering, there's a hidden treasure known only to the true craft masters. This treasure is not gold or jewels but ...
For further actions, you may consider blocking this person and/or reporting abuse
Nice writeup and very usefull information.
One tip, could be to add "wrong" approach first and then correct after.
It highlights the differences and makes it even more clear.
Agree!
Great writeup! The thing to really understand, IMO, is state. How many states can your code be in, where is that state stored, how can it be corrupted, and what state are your external dependencies in if someone pulls the plug on your computer at any given line of code?
Good to see these occasional refreshers on important concepts.
All too often when getting into the weeds of product development we can forget the underlying motivation behind some patterns & behaviors.
Just need a linter to enforce now so humans don't have to!
Interface Segregation Principle (ISP) example is wrong. Chef should also extend eatable, else your eat method is out of contract.
I feel like your discussion around ISP is nearly the same one as in SRP. It's not that it's exactly wrong, but they both "Only do what you need to do." The difference is that ISP is not borrowing from other interfaces that they don't use. ISP is more about not adding clutter, where SRP is more about sticking to one focus, which are similar, but different.
The way that you explain, is fantastic!
Nice explanation!
But at the ISP principle's code example I think there is a problem as the Eatable class is not being used anywhere.
Interesting read !
Thanks for this! Very interesting read and well explained.
SOLID made easier 👍, thanks