For quite some time, I’ve been questioning some of the SOLID principles’ relevance, especially of the Liskov Substitution Principle (LSP).
Until I was hit in the face by it.
Thread
First, the definition: LSP states that a program that uses an interface must not be confused by an implementation of the interface.
Now the story. At first, I really loved the idea of iCloud Drive: all the files you are copying into it are uploaded to the cloud storage and are downloaded automagically when you need them.
Of course, it takes some time to download a file, but other than that, it looks just like a regular filesystem. Thus, you both have the data and free up lots of disk space. However…
However, if you use any software other than Finder to move the files out of iCloud Drive, you are moving not the file itself, but just a link to it. At the same time, macOS assumes that since the link is not there anymore, it’s time to delete the actual data on the cloud storage.
And that’s how I lost a hell of a lot of data because Apple didn’t bother to follow the LSP 🤬🤬🤬
• • •
Missing some Tweet in this thread? You can try to
force a refresh
It’s a model of the Siemens KG86NAI31L fridge. The cardboard doesn’t look anything like the fridge? — That’s true but not important. A model is not a copy of a real-world entity but a construct supposed to solve a problem. 2/9
Hence, the correct question to ask is: what problem does this model solve? In our apartment, we have a weird entry to the kitchen. The cardboard’s is in the size of the fridge’s width and depth, and the problem it solves is checking whether it can make it through the door. 3/9