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
Enter the thread if you dare. 😈
We’re counting down 13 of the best ways to Halloween on Snapchat. First up – matching Lens costumes for you and your pet.
https://t.co/J0Zn7CfM1q
Tis the season to slay some ghouls. Grab some friends and dive in to Zombie Rescue Squad from @PikPokGames. How long can you survive?
https://t.co/FC9dvafUiV
Is it even Halloween if you're not FREAKED OUT? Scare yourself silly with a Dead of Night S1 rewatch.
https://t.co/LtoE7yHgaG
Be careful! Things aren’t always what they seem. Our Lenses start off cute, but are filled with spooky surprises!
https://t.co/xq45JlYeQ7
Craving candy early? Our new stickers were made to satisfy your sweet tooth.
We’re counting down 13 of the best ways to Halloween on Snapchat. First up – matching Lens costumes for you and your pet.
https://t.co/J0Zn7CfM1q
Tis the season to slay some ghouls. Grab some friends and dive in to Zombie Rescue Squad from @PikPokGames. How long can you survive?
https://t.co/FC9dvafUiV
Is it even Halloween if you're not FREAKED OUT? Scare yourself silly with a Dead of Night S1 rewatch.
https://t.co/LtoE7yHgaG
Be careful! Things aren’t always what they seem. Our Lenses start off cute, but are filled with spooky surprises!
https://t.co/xq45JlYeQ7
Craving candy early? Our new stickers were made to satisfy your sweet tooth.
You May Also Like
THREAD: 12 Things Everyone Should Know About IQ
1. IQ is one of the most heritable psychological traits – that is, individual differences in IQ are strongly associated with individual differences in genes (at least in fairly typical modern environments). https://t.co/3XxzW9bxLE
2. The heritability of IQ *increases* from childhood to adulthood. Meanwhile, the effect of the shared environment largely fades away. In other words, when it comes to IQ, nature becomes more important as we get older, nurture less. https://t.co/UqtS1lpw3n
3. IQ scores have been increasing for the last century or so, a phenomenon known as the Flynn effect. https://t.co/sCZvCst3hw (N ≈ 4 million)
(Note that the Flynn effect shows that IQ isn't 100% genetic; it doesn't show that it's 100% environmental.)
4. IQ predicts many important real world outcomes.
For example, though far from perfect, IQ is the single-best predictor of job performance we have – much better than Emotional Intelligence, the Big Five, Grit, etc. https://t.co/rKUgKDAAVx https://t.co/DWbVI8QSU3
5. Higher IQ is associated with a lower risk of death from most causes, including cardiovascular disease, respiratory disease, most forms of cancer, homicide, suicide, and accident. https://t.co/PJjGNyeQRA (N = 728,160)
1. IQ is one of the most heritable psychological traits – that is, individual differences in IQ are strongly associated with individual differences in genes (at least in fairly typical modern environments). https://t.co/3XxzW9bxLE
2. The heritability of IQ *increases* from childhood to adulthood. Meanwhile, the effect of the shared environment largely fades away. In other words, when it comes to IQ, nature becomes more important as we get older, nurture less. https://t.co/UqtS1lpw3n
3. IQ scores have been increasing for the last century or so, a phenomenon known as the Flynn effect. https://t.co/sCZvCst3hw (N ≈ 4 million)
(Note that the Flynn effect shows that IQ isn't 100% genetic; it doesn't show that it's 100% environmental.)
4. IQ predicts many important real world outcomes.
For example, though far from perfect, IQ is the single-best predictor of job performance we have – much better than Emotional Intelligence, the Big Five, Grit, etc. https://t.co/rKUgKDAAVx https://t.co/DWbVI8QSU3
5. Higher IQ is associated with a lower risk of death from most causes, including cardiovascular disease, respiratory disease, most forms of cancer, homicide, suicide, and accident. https://t.co/PJjGNyeQRA (N = 728,160)
1/ Here’s a list of conversational frameworks I’ve picked up that have been helpful.
Please add your own.
2/ The Magic Question: "What would need to be true for you
3/ On evaluating where someone’s head is at regarding a topic they are being wishy-washy about or delaying.
“Gun to the head—what would you decide now?”
“Fast forward 6 months after your sabbatical--how would you decide: what criteria is most important to you?”
4/ Other Q’s re: decisions:
“Putting aside a list of pros/cons, what’s the *one* reason you’re doing this?” “Why is that the most important reason?”
“What’s end-game here?”
“What does success look like in a world where you pick that path?”
5/ When listening, after empathizing, and wanting to help them make their own decisions without imposing your world view:
“What would the best version of yourself do”?
Please add your own.
2/ The Magic Question: "What would need to be true for you
1/\u201cWhat would need to be true for you to\u2026.X\u201d
— Erik Torenberg (@eriktorenberg) December 4, 2018
Why is this the most powerful question you can ask when attempting to reach an agreement with another human being or organization?
A thread, co-written by @deanmbrody: https://t.co/Yo6jHbSit9
3/ On evaluating where someone’s head is at regarding a topic they are being wishy-washy about or delaying.
“Gun to the head—what would you decide now?”
“Fast forward 6 months after your sabbatical--how would you decide: what criteria is most important to you?”
4/ Other Q’s re: decisions:
“Putting aside a list of pros/cons, what’s the *one* reason you’re doing this?” “Why is that the most important reason?”
“What’s end-game here?”
“What does success look like in a world where you pick that path?”
5/ When listening, after empathizing, and wanting to help them make their own decisions without imposing your world view:
“What would the best version of yourself do”?