Building Reddit’s iOS and Android app
Building Reddit’s iOS and Android appReddit’s mobile engineers share how they completely rebuilt the iOS and Android app, introducing a new core tech stack, modern architecture, and improved testing strategies at massive scale.
Stream the Latest EpisodeListen and watch now on YouTube, Spotify and Apple. See the episode transcript at the top of this page, and timestamps for the episode at the bottom. Brought to You By• Graphite — The AI developer productivity platform. • Sentry — Error and performance monitoring for developers. Get 150k errors (three months of Team Plan) for free. — In This EpisodeReddit’s native mobile apps are more complex than most of us would assume: both the iOS and Android apps are about 2.5 million lines of code, have 500+ screens, and a total of around 200 native iOS and Android engineers work on them. But it wasn’t always like this. In 2021, Reddit started to double down on hiring native mobile engineers, and they quietly rebuilt the Android and iOS apps from the ground up. The team introduced a new tech stack called the “Core Stack” – all the while users remained largely unaware of the changes. What drove this overhaul, and how did the team pull it off? In this episode of The Pragmatic Engineer, I’m joined by three engineers from Reddit’s mobile platform team who led this work: Lauren Darcey (Head of Mobile Platform), Brandon Kobilansky (iOS Platform Lead), and Eric Kuck (Principal Android Engineer). We discuss how the team transitioned to a modern architecture, revamped their testing strategy, improved developer experience – while they also greatly improved the app’s user experience. We also get into:
If you are interested in large-scale rewrites or native mobile engineering challenges: this episode is for you. TakeawaysMy biggest takeaways from this episode: 1. At a glance: Reddit’s mobile tech stack evolution. From 2021, this is how things have changed: 2. The Reddit app is a lot more complex than one would assume. With around 200 native mobile engineers, Reddit has one of the largest mobile teams working on a single mobile codebase – I’d be surprised if there were more than a dozen similarly large mobile teams focusing on a single, standalone app. The app has about 20 feature teams working on different parts of it, and to give a taste of the complexity, the Android app has ~800 modules and 580 screens. The complexity of mobile apps is rarely obvious at first glance – a few years ago, I did an explainer on why the Uber app was hundreds of megabytes in size. 3. Poor developer experience can slow down a company – so pay attention! One of the reasons Reddit started investing heavily in modernizing its mobile stack was that the “old stack” was slowing down developers. Reddit’s platform team got proof of this simply by asking native engineers about the biggest development-related challenges they face: 4. GenAI coding tools feel like they are not “there” yet with native mobile. LLMs integrated into IDEs seem to be increasingly helpful with backend, fullstack, web and even cross-platform (React Native / Expo) projects. However, Reddit’s mobile team shared that they get a moderate boost from the Apple and Android Studio LLM additions. Native mobile development is distinctively different from web, fullstack and backend coding – and it seems that these IDEs with AI functionality have not done much to optimize for the expereince of native mobile engineers. Over time, this will likely change – but it’s a reminder that there are differences between fullstack, backend and native mobile development! (I wrote a book reflecting on more of the challenges unique to native mobile titled Building Mobile Apps at Scale) An interesting quote from the episodeFrom this part:
Jump this part of the episode. The Pragmatic Engineer deepdives relevant for this episodeTimestamps(00:00) Intro (02:04) The scale of the Android code base (02:42) The scale of the iOS code base (03:26) What the compile time is for both Android and iOS (05:33) The size of the mobile platform teams (09:00) Why Reddit has so many mobile engineers (11:28) The different types of testing done in the mobile platform (13:20) The benefits and drawbacks of testing (17:00) How Eric, Brandon, and Lauren use AI in their workflows (20:50) Why Reddit grew its mobile teams in 2021 (26:50) Reddit’s modern tech stack, Corestack (28:48) Why Reddit shifted from MVP architecture to MVVM (30:22) The architecture on the iOS side (32:08) The new design system (30:55) The impact of migrating from Rust to GraphQL (38:20) How the backend drove the GraphQL migration and why it was worth the pain (43:17) Why the iOS team is replacing SliceKit with SwiftUI (48:08) Why the Android team took a bet on Compose (51:25) How teams experiment with server-driven UI—when it worked, and when it did not (54:30) Why server-driven UI isn’t taking off, and why Lauren still thinks it could work (59:25) The ways that Reddit’s modernization has paid off, both in DevX and UX (1:07:15) The overall modernization philosophy; fixing pain points (1:09:10) What the mobile platforms team looks for in a new engineering hire (1:16:00) Why startups may be the best place to get experience (1:17:00) Why platform teams need to feel safe to fail (1:20:30) Rapid fire round ReferencesWhere to find Lauren Darcey: • LinkedIn: https://www.linkedin.com/in/perlgurl/ Where to find Brandon Kobilansky: • LinkedIn: https://www.linkedin.com/in/brandon-kobilansky-45097860/ • X: https://x.com/bkobilansky Where to find Eric Kuck: • LinkedIn: https://www.linkedin.com/in/eric-kuck-3bbb7680/ Mentions during the episode: • Gemini: https://gemini.google.com/app • GraphQL: https://graphql.org/ • Rust: https://www.rust-lang.org/ • MVVM: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel • Compose: https://www.jetbrains.com/compose-multiplatform/ • MVP: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter • The SliceKit Series: Introducing Our New iOS Presentation Framework: https://www.reddit.com/r/RedditEng/comments/v3hpns/the_slicekit_series_introducing_our_new_ios/ • SwiftUI: https://developer.apple.com/xcode/swiftui/ • The comic about Google migrations: https://goomics.net/50 • The man behind the Big Tech comics – with Manu Cornet: https://newsletter.pragmaticengineer.com/p/the-man-behind-the-big-tech-comics • Texture: https://texturegroup.org/ • Reddit Talk: https://www.reddit.com/r/RedditTalk/ • GraphQL JS: https://www.graphql-js.org/docs/ • Westrum’s typology: https://psychsafety.com/psychological-safety-81-westrums-cultural-typologies/ • C Programming Language: https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628 • Tidy First?: A Personal Exercise in Empirical Software Design: https://www.amazon.com/Tidy-First-Personal-Exercise-Empirical/dp/1098151240 • Project Hail Mary: https://www.amazon.com/Project-Hail-Mary-Andy-Weir/dp/0593135202 — Production and marketing by Pen Name. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com. You’re on the free list for The Pragmatic Engineer. For the full experience, become a paying subscriber. Many readers expense this newsletter within their company’s training/learning/development budget. This post is public, so feel free to share and forward it. If you enjoyed this post, you might enjoy my book, The Software Engineer's Guidebook. Here is what Tanya Reilly, senior principal engineer and author of The Staff Engineer's Path said about it:
|
Comments
Post a Comment