We recently dropped iOS 5 so we could use the new 6+ APIs without backwards compatibility.
It makes me smile every time I notice IGListKit at work in Instagram. We put a lot of work into making and improving it. Proud to see it holding up 4 years later.
🧵 with some memories on how it was built:
We recently dropped iOS 5 so we could use the new 6+ APIs without backwards compatibility.
Except two things bugged the hell out of me:
1. No animated changes (duh)
2. Images could flicker and the like animation could cancel
If something triggered another reload after the animation started, the cell cancelled the animation (thus the UI bug)
When an image cell is reused set the background to grey, async load the image (cache or network), set the image. The async time between reuse and fetch/set from cache is where the flicker came from.
Enter UICV performBatchUpdates
So how the hell do I write a diffing algorithm? I literally had never done this.
I settled on Paul Heckel’s https://t.co/jpxuHNlpXg
Why?
1. It’s output matched UICV’s APIs: inserts, deletes, updates, and moves
2. There were example implementations I could actually understand
Foundation hashes can collide
https://t.co/h9eVHO342U
Or are too basic for diffing
https://t.co/Pp0eVFRS5e https://t.co/ZNPJnXlXa4
https://t.co/BACvyI2l08+
With profile done, I submitted a -12k change to remove the old infra.
Throughout this the eng team 10x’d and users 4x’d, we launched tons of products (Stories!), IG opened a NY office, UICV got diffable data sources, and more.
More from Social media
🗓 Release date: October 30, 2018
📝 New Emojis: 158
https://t.co/bx8XjhiCiB
New in iOS 12.1: 🥰 Smiling Face With 3 Hearts https://t.co/6eajdvueip
New in iOS 12.1: 🥵 Hot Face https://t.co/jhTv1elltB
New in iOS 12.1: 🥶 Cold Face https://t.co/EIjyl6yZrF
New in iOS 12.1: 🥳 Partying Face https://t.co/p8FDNEQ3LJ
The goal?
Learn how to craft interesting threads, and grow a following. It (mostly) worked.
- New followers: +2.5K (+100% MoM)
- Top thread: 373K impressions
- Top tweet: 2.5K likes
Here's what I learned. Quick thread 👇👇
To start, here's the most popular thread I've written.
Thoughts on what made it work, below.
Nikola Tesla was the greatest inventor of his era. He died penniless and alone, swindled by both Thomas Edison and JP Morgan.
— Mario \U0001f98a (@mariodgabriele) September 2, 2020
A thread \U0001f447\U0001f447\U0001f447 pic.twitter.com/80Gco1e6uq
1. Quality
The threads that performed best were (usually) the ones I put the most effort into.
One example is this one about Jeff Bezos's origins. I spent hours researching and drafting it.
It's worth taking the time to craft your
[Story time]
— Mario \U0001f98a (@mariodgabriele) July 30, 2020
Yesterday, Jeff Bezos testified in front of Congress. It was almost exactly 15 yrs ago that Amazon introduced itself to the world.
We have all heard some version of his story. But in investigating his childhood, I was surprised to find much that has gone unshared. pic.twitter.com/CDaIAA0Fzj
2. Timeliness
Capitalizing on the news can be one way to expand viewership.
When Fornite launched its #FreeFortnite campaign, I wrote this thread.
At the time, it was my 2nd best performing thread. It also introduced me to the lovely
Fortnite is standing up to Google and Apple.
— Mario \U0001f98a (@mariodgabriele) August 13, 2020
They're offering 20% discounts to players that buy digital currency in the app, bypassing the payment systems of Big Tech.
This is a thread about the game's humble beginnings. \U0001f447
(All likes + RTs appreciated! \U0001f64f) pic.twitter.com/Zg5Lr3hDRu
3. Narrative Arc
Have a clear start and end in your mind.
I made this mistake with a few Amazon threads. I thought because my first one worked, I could keep the story going. But they didn't have as clear a narrative arc and were much less popular.
A book about lichen saved Amazon from going out of business.
— Mario \U0001f98a (@mariodgabriele) August 10, 2020
A thread \U0001f447 pic.twitter.com/kgfmBf4Dsj