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
 

Keep Current with Vladik Khononov

Vladik Khononov Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @vladikk

7 Dec
What do you see in the picture? A piece of cardboard? Some junk? No! — It’s a model!

Thread on models and bounded contexts 1/9

#DDDesign #BoundedContext Image
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 Image
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 Image
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!