# Medium

Stories from the team building Medium. - Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Dark mode was never on our roadmap. Here's how it got built.

DevFeed: [Dark mode was never on our roadmap. Here's how it got built.](<https://devfeed.tech/articles/dark-mode-was-never-on-our-roadmap-here-s-how-it-got-built-97363.md>)

Original publisher: [Read original article](<https://medium.engineering/dark-mode-was-never-on-our-roadmap-heres-how-it-got-built-b8e0a54c1d12?source=rss----2817475205d3---4>)

Author: Christine Leverett

Published: 2026-10-22T14:01:07Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [Dark Mode](<https://devfeed.tech/topics/dark-mode.md>), [CSS](<https://devfeed.tech/topics/css.md>), [engineering-culture](<https://devfeed.tech/topics/engineering-culture.md>), [Deployment Strategies](<https://devfeed.tech/topics/deployment-strategies.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [UI/UX Design](<https://devfeed.tech/topics/ui-ux-design.md>), [Linear](<https://devfeed.tech/topics/linear.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [ai](<https://devfeed.tech/tags/ai.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [cache](<https://devfeed.tech/tags/cache.md>), [colors](<https://devfeed.tech/tags/colors.md>), [css](<https://devfeed.tech/tags/css.md>), [dark-mode](<https://devfeed.tech/tags/dark-mode.md>), [dark-theme](<https://devfeed.tech/tags/dark-theme.md>), [design](<https://devfeed.tech/tags/design.md>), [it](<https://devfeed.tech/tags/it.md>), [medium](<https://devfeed.tech/tags/medium.md>), [plan](<https://devfeed.tech/tags/plan.md>), [product](<https://devfeed.tech/tags/product.md>), [programming](<https://devfeed.tech/tags/programming.md>), [project](<https://devfeed.tech/tags/project.md>), [roadmap](<https://devfeed.tech/tags/roadmap.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [team](<https://devfeed.tech/tags/team.md>), [technical](<https://devfeed.tech/tags/technical.md>), [technology](<https://devfeed.tech/tags/technology.md>), [the-web](<https://devfeed.tech/tags/the-web.md>)

### AI overview

Medium shipped dark mode to all readers in under five months, with most of the work done by one engineer between other projects. The approach kept the effort safe, small, and concrete: a staff-only feature flag isolated the work behind the edge cache; CSS `light-dark()` and `color-scheme` let the browser choose the theme before first paint; and small pull requests and AI-assisted audits turned legacy color cleanup into reviewable tasks. The older M2 service required converting styles page by page, preserving existing light colors as fallbacks, and quarantining pages for staff QA before rollout. Design input and manual QA remained necessary: Claude missed issues, including cases where translucent colors depended on what lay beneath them. The reader experience launched to 100% of readers on October 1; M2 pages were still in QA at the time of writing.

### Source excerpt

Keep it safe, keep it small, keep it concrete: How a "someday project" finally shippedImage created by the Medium Brand team Medium has been around for 14 years. In that time, dark mode went from a novelty to a must-have, especially for sites built for reading. In my seven years on the web team, however, it never made it onto our roadmap. Why? Readers asked for it and teammates often asked what it would take, but there was just always another project that needed our engineers more. This year, that finally changed, and I'm so excited to say that (most of) Medium now supports a dark theme! The energy inside the company has been huge, but the cherry on top was hearing from readers who went out of their way to fill out our feedback form just to say thank you. Seriously, who does that? To everyone who wrote in: thank you so much. It feels wonderful to finally deliver this to our readers, and soon to our writers too. This story is about how it happened. Part of it is technical, like why dark mode was harder for us than flipping a few colors. But a big part of it is personal, because the hardest piece for me wasn't the cache or the CSS, but taking the first steps. Starting without a ticket For most of my career, work has reached me as a ticket someone else wrote. I'm good at that. I'm careful, I follow through, and I like finishing things. Dark mode lived in a gap I think a lot of teams have: work the company clearly valued, but kept getting edged out by larger initiatives. It was the first time, though, that I felt strongly enough about something in that gap to try closing it myself. We're a small team, and our design team is even smaller and juggling a ton. But when the web team met to pick a few projects outside our feature work earlier this year, I suggested we finally build it. I believed it could be done without dropping any product work. All we needed was a plan and someone to take the first steps. I didn't want to ask the team to trade something important away, and

## What We Built for Medium Editors This Year (and What I Broke)

DevFeed: [What We Built for Medium Editors This Year (and What I Broke)](<https://devfeed.tech/articles/what-we-built-for-medium-editors-this-year-and-what-i-broke-62104.md>)

Original publisher: [Read original article](<https://medium.engineering/what-we-built-for-medium-editors-this-year-and-what-i-broke-1213c2746703?source=rss----2817475205d3---4>)

Author: Scott Batson

Published: 2026-09-29T18:09:45Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [User interface design](<https://devfeed.tech/topics/ui-design.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Image](<https://devfeed.tech/topics/image.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Deployment Strategies](<https://devfeed.tech/topics/deployment-strategies.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-slop](<https://devfeed.tech/tags/ai-slop.md>), [behind-the-scenes](<https://devfeed.tech/tags/behind-the-scenes.md>), [calendar](<https://devfeed.tech/tags/calendar.md>), [editor](<https://devfeed.tech/tags/editor.md>), [editorial](<https://devfeed.tech/tags/editorial.md>), [medium](<https://devfeed.tech/tags/medium.md>), [organizational](<https://devfeed.tech/tags/organizational.md>), [partner-program](<https://devfeed.tech/tags/partner-program.md>), [programming](<https://devfeed.tech/tags/programming.md>), [publication](<https://devfeed.tech/tags/publication.md>), [publications](<https://devfeed.tech/tags/publications.md>), [publications-on-medium](<https://devfeed.tech/tags/publications-on-medium.md>), [quality](<https://devfeed.tech/tags/quality.md>), [reward](<https://devfeed.tech/tags/reward.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [submission](<https://devfeed.tech/tags/submission.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

Medium's editor tools aim to reduce inbox burden and make publication management clearer. Editors can bulk block or decline submissions, set required submission rules, see whether a submission matches publication topics and view a writer's recent publishing history. Preset decline reasons give rejected writers actionable feedback, while editor assignment records who worked on a submission for the Editor Partner Program; single-editor publications later received automatic assignment. Other changes include image focal-point controls, a drag-and-drop content calendar, and a searchable Editors & Writers page with CSV export. These tools mitigate spam but do not ensure every submission is high quality. The author says AI-detection tools were unreliable, sometimes flagging human writers, and some publications accept AI-written work. A deployment migration issue temporarily prevented submissions for about an hour. Custom decline text remains under consideration because it would require reporting and Trust & Safety tools; a Publications Directory and improved draft communication tools are in planning.

### Source excerpt

A behind-the-scenes look at bulk declines, decline reasons, a content calendar, and one very bad hour A few months ago, we took an honest look at publications on Medium and asked if they were succeeding. Were users incentivized to create quality publications on Medium? We had the Boost Nomination Program, which was helpful for the cohort that was selected, but we didn't have any signal that the BNP was motivating for other users. Were we getting higher quality articles as a result of BNP? So we asked ourselves "How can we reward good editors for their editorial work and make it clear how others can earn that reward?" That's when we came up with the Editor Partner Program (EPP). The first thing we introduced for EPP was the ability to assign an editor to a given submission. Before, there was no way to tell if a publication editor was actively working on a post. And since we wanted to start compensating editors directly, we needed a way (in the data) to know who worked on a given submission. So we introduced the ability for editors to assign themselves to submissions in the inbox. Screenshot of the new editor assignment tool Even for those not in the EPP, this was a useful organizational tool. I'm not going to go in depth on EPP, but I wanted to flag it as the catalyst for a lot of the recent changes we've made and the ones we're making in the near future. We knew we wanted to encourage publications to be "open" because we wanted more writers to find a good community of readers. But we knew what being "open" could mean for editors. Lots of slop submissions. Open submissions doesn't feel fair ... unless we give them something that makes their lives better.-- Direct quote from a meetingScott, just solve AI slop... done I wish I had a magic wand to remove all AI slop. We've looked into a lot of tools and they just aren't reliable. They flag human writers as AI a lot. Some publications are also fine with AI-written articles. Who am I to tell them no? Rather than throwing up ou

## How we think about text classification in the LLM era

DevFeed: [How we think about text classification in the LLM era](<https://devfeed.tech/articles/how-we-think-about-text-classification-in-the-llm-era-20322.md>)

Original publisher: [Read original article](<https://medium.engineering/how-we-think-about-text-classification-in-the-llm-era-89a185f79b68?source=rss----2817475205d3---4>)

Author: Raphael Montaud

Published: 2026-08-19T20:00:37Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [text-classification](<https://devfeed.tech/topics/text-classification.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Inference](<https://devfeed.tech/topics/inference.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [classification](<https://devfeed.tech/tags/classification.md>), [inference](<https://devfeed.tech/tags/inference.md>), [learning](<https://devfeed.tech/tags/learning.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llm-tools](<https://devfeed.tech/tags/llm-tools.md>), [llms](<https://devfeed.tech/tags/llms.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [model](<https://devfeed.tech/tags/model.md>), [models](<https://devfeed.tech/tags/models.md>), [policy](<https://devfeed.tech/tags/policy.md>), [post](<https://devfeed.tech/tags/post.md>), [recommendation-system](<https://devfeed.tech/tags/recommendation-system.md>), [recommendations](<https://devfeed.tech/tags/recommendations.md>), [snowflake](<https://devfeed.tech/tags/snowflake.md>), [stories](<https://devfeed.tech/tags/stories.md>), [text](<https://devfeed.tech/tags/text.md>), [text-classification](<https://devfeed.tech/tags/text-classification.md>)

### AI overview

Medium replaced its outdated NSFW classifier with prompt-based LLM inference and reports parity or better than the legacy model on false positives and false negatives. The team built a balanced evaluation set with curator labels and refined NSFW guidelines, then compared LLM predictions with the legacy model. It selected Mixtral 8x7b for cost and performance, using Snowflake Cortex inference on stories eligible for distribution; Snowflake hosted the models and, according to the excerpt, did not use the data for training. The approach avoids maintaining a labeled training set and was quick to ship, but is more expensive and less adaptive than trained models. Medium considers it suitable for NSFW classification, while topic classification benefits from naturally updated labels and spam detection needs rapid adaptation and broad coverage. Scores support threshold tuning, and brief explanations aided spot checks at negligible reported cost.

### Source excerpt

Why we think LLMs can be useful and why we will not replace all of our models with themContext At Medium, we have many Machine Learning models that we use to label stories automatically. These affect what stories we recommend to readers. Here's some examples: a few of our text classification models. All diagrams and charts made by the authorSome Clarifications on our Machine Learning policy Before we go deep on this project, I just wanted to clarify a few things about how we stand regarding AI in general. Medium has been training internal models with user and post data for a long time now. We train models with specific tasks. For example, models that power our recommendations algorithm, or text classification models like the ones presented in this story. All in the goal to improve our product. With the LLM approach I describe in this story, we ARE NOT sharing these models with other companies. And we ARE NOT allowing anyone to train on our users' data and content. Here we used Snowflake LLM tools for inference only (no LLM training was done here) and they are actually hosting all of the models inside their own infrastructure and guarantee that they are not using any of this for training. Shoutout to the Snowflake team for making it so easy and safe to use LLMs on our data! If you want to read more about Medium's stance on AI, I definitely recommend giving these a read: Default No to AI Training on Your Stories Finally, an internet standard for writers' rights vs. AI companies We want your feedback: How can writers use AI to tell human stories? Problem During our roadmap planning we decided that our NSFW model was out of date and it was time to revamp it. This model labels stories as "Not Safe for Work" if they have sexually explicit content, lots of profanity, or basically anything you wouldn't want to read on your big monitor in the middle of an open space! As you can imagine it's a pretty important model. We really need it to make sure our most "interesting" conte

## Outcomes we want to see from AI at Medium Engineering

DevFeed: [Outcomes we want to see from AI at Medium Engineering](<https://devfeed.tech/articles/outcomes-we-want-to-see-from-ai-at-medium-engineering-20325.md>)

Original publisher: [Read original article](<https://medium.engineering/outcomes-we-want-to-see-from-ai-at-medium-engineering-10891d52a19f?source=rss----2817475205d3---4>)

Author: Jacob Bennett

Published: 2026-05-26T15:33:52Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [engineering-culture](<https://devfeed.tech/topics/engineering-culture.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>), [Code Modularity](<https://devfeed.tech/topics/code-modularity.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ambition](<https://devfeed.tech/tags/ambition.md>), [approach](<https://devfeed.tech/tags/approach.md>), [area](<https://devfeed.tech/tags/area.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [backend](<https://devfeed.tech/tags/backend.md>), [better](<https://devfeed.tech/tags/better.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [cases](<https://devfeed.tech/tags/cases.md>), [challenge](<https://devfeed.tech/tags/challenge.md>), [changes](<https://devfeed.tech/tags/changes.md>), [code](<https://devfeed.tech/tags/code.md>), [complex](<https://devfeed.tech/tags/complex.md>), [cons](<https://devfeed.tech/tags/cons.md>), [cost](<https://devfeed.tech/tags/cost.md>), [cost-savings](<https://devfeed.tech/tags/cost-savings.md>), [coverage](<https://devfeed.tech/tags/coverage.md>), [critical](<https://devfeed.tech/tags/critical.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [medium](<https://devfeed.tech/tags/medium.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>)

### AI overview

Medium frames successful AI adoption as reducing repetitive engineering work, helping engineers learn unfamiliar parts of the stack, enabling more ambitious improvements, strengthening planning, and improving code quality and maintainability. Examples include making hard-to-test code testable, cleaning up legacy areas, and using AI to examine edge cases and compare design approaches. Engineers remain accountable for understanding and reviewing code, with backend review expected for cross-discipline changes. The post rejects PR, code-volume, token-use, or spend targets as success measures, and warns against blind trust, review overload, loss of codebase understanding, security or privacy regressions, ethical and environmental neglect, and adopting tools for appearances. Its stated aim is useful outcomes while preserving human judgment and quality.

### Source excerpt

This was originally written and published by Christophe Spy (Director of Engineering, Medium) as an internal Medium Eng post. Desired outcomes (what "good" looks like) 🙏🏻 These are the kinds of changes we want to see if AI is going well at Medium. Less drudgery, more leverage Engineers use AI to remove repetitive, low-leverage work (e.g. tedious refactors, boilerplate, large test suites), not just to ship more tickets. We see examples like: "We took a part of the codebase that was basically untestable and, with AI, made it testable and added meaningful coverage in days instead of months." "We cleaned up a legacy area we had been afraid to touch for years, using AI for the mechanical work." Faster learning and broader technical range Engineers use AI to ramp on new languages, frameworks, and parts of the stack much more quickly. Engineers can explore unfamiliar areas safely by asking AI to explain tradeoffs, pitfalls, risks, and how the system uses this areas of the code. We see fewer cases where work stalls or we avoid implementing things because "nobody knows this code anymore". Frontend/mobile engineers are able to make safe, reviewable backend changes with AI's help (plus a review from a backend engineer). Teams can ship more end-to-end features without long handoffs. Higher technical ambition, not just more speed Teams take on work that used to be "too expensive": Meaningful test coverage in critical areas. Pieces of M2 migration or other large refactors. Structural cost savings. Incident/action items evolve from "add an alert" to "Let's improve tests here". Engineers use AI pre-work to explore edge cases and tradeoffs (design rigor). Better planning, reasoning, and risk reduction: Engineers use AI to think through complex scenarios before building, exploring edge cases, stress-testing assumptions, and comparing multiple approaches, and better understand the pros and cons of each approach Design docs become more rigorous as AI is used to challenge thinking and l

## How we improved image download sizes on Medium with just four characters

DevFeed: [How we improved image download sizes on Medium with just four characters](<https://devfeed.tech/articles/how-we-improved-image-download-sizes-on-medium-with-just-four-characters-20321.md>)

Original publisher: [Read original article](<https://medium.engineering/how-we-improved-image-download-sizes-on-medium-with-just-four-characters-9621b0ebb291?source=rss----2817475205d3---4>)

Author: Scott Batson

Published: 2026-05-18T15:29:29Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>), [Image](<https://devfeed.tech/topics/image.md>), [Page Speed Optimization](<https://devfeed.tech/topics/page-speed-optimization.md>), [mobile optimization](<https://devfeed.tech/topics/mobile-optimization.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Server-side rendering](<https://devfeed.tech/topics/server-side-rendering.md>), [AVIF Images](<https://devfeed.tech/topics/avif-images.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [about](<https://devfeed.tech/tags/about.md>), [adapting](<https://devfeed.tech/tags/adapting.md>), [all](<https://devfeed.tech/tags/all.md>), [angular](<https://devfeed.tech/tags/angular.md>), [archive](<https://devfeed.tech/tags/archive.md>), [asset](<https://devfeed.tech/tags/asset.md>), [away](<https://devfeed.tech/tags/away.md>), [base](<https://devfeed.tech/tags/base.md>), [based](<https://devfeed.tech/tags/based.md>), [but](<https://devfeed.tech/tags/but.md>), [can](<https://devfeed.tech/tags/can.md>), [cases](<https://devfeed.tech/tags/cases.md>), [code](<https://devfeed.tech/tags/code.md>), [context](<https://devfeed.tech/tags/context.md>), [download](<https://devfeed.tech/tags/download.md>), [html](<https://devfeed.tech/tags/html.md>), [image](<https://devfeed.tech/tags/image.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [just](<https://devfeed.tech/tags/just.md>), [medium](<https://devfeed.tech/tags/medium.md>), [programming](<https://devfeed.tech/tags/programming.md>), [technology](<https://devfeed.tech/tags/technology.md>), [web-development](<https://devfeed.tech/tags/web-development.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

The article says adding `auto, ` to the `sizes` attribute of lazy-loaded images lets supporting browsers choose an image variant using layout and other context, reducing downloaded image data; the author reports a 7% reduction in image downloads for Medium's home feed on a small, non-mobile display. Earlier `srcset` lets browsers select among dimensions of the same image, while `<picture>` lets developers prescribe different images for conditions such as dark mode or screen layout. Because images often load before layout is known, `sizes` can guide selection but may require complex breakpoint rules. The proposed `auto` value uses layout information available for lazy-loaded images. The article says unsupported browsers ignore the unparseable rule, and notes WebKit support added March 24, 2026; it does not provide broader measured results.

### Source excerpt

HTML images just got better, with the subtlest change to your codebasePhoto by Adi Suyatno I know what you're thinking. Scott, I landed on Medium on a small but not mobile-small display and the download chunk related to images in my home feed was like 7% smaller. First of all, thank you for noticing. Second, what if I told you that you too can improve your total asset download size by adding just four characters to your code base? Sounds too good to be true, right? Well, I'm here to tell you, it's true... after I explain how we got here. The history of images on the web As a web developer, you've probably spent a lot of time thinking about and fighting with images. According to the HTTP Archive, even in today's modern landscape of "JavaScript everywhere" the majority of most website's transfer size is images. We've moved away from the "hero image on every page" ethos, but still we're an image-heavy internet. When I was getting my start in web development in 2010ish, we were still adapting to a "mobile-friendly" world. The majority of the web was built on WordPress. We didn't have a way back then to dynamically load an optimized image. 3G connections were the primary speed in the US for viewing the internet, so the practice was images "need to work on mobile" regardless of the user's device. For those of us writing Angular and Ember (because React wasn't a thing yet), you had to legitimately render the correct src based on context you could get from JavaScript. {{#if browserSmal}} <img src="image-high-res.jpg" /> {{else}} <img src="image-med-res.jpg" /> {{/if}} This is back when we wrote handlebars for our markup and the web was filling up with SPAs with no server-side-rendering. We did it this way because HTML lacked a way for specifying how we wanted to optimize images. Then in 2012, RICG introduced 2 new specs for image optimization, with 2 different use cases: <picture> elements and srcset. Picture Elements I love the <picture> element. It gives us a lot of control

## We're Hiring a Principal Backend Engineer to Shape the Future of Medium

DevFeed: [We're Hiring a Principal Backend Engineer to Shape the Future of Medium](<https://devfeed.tech/articles/we-re-hiring-a-principal-backend-engineer-to-shape-the-future-of-medium-20326.md>)

Original publisher: [Read original article](<https://medium.engineering/were-hiring-a-principal-backend-engineer-to-shape-the-future-of-medium-a0d7896b3717?source=rss----2817475205d3---4>)

Author: Michael Margolis

Published: 2025-10-22T17:19:00Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [Back end](<https://devfeed.tech/topics/backend.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Code](<https://devfeed.tech/topics/code.md>), [debugging](<https://devfeed.tech/topics/debugging.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [backend](<https://devfeed.tech/tags/backend.md>), [backend-development](<https://devfeed.tech/tags/backend-development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [hiring](<https://devfeed.tech/tags/hiring.md>), [medium](<https://devfeed.tech/tags/medium.md>), [remote](<https://devfeed.tech/tags/remote.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [us](<https://devfeed.tech/tags/us.md>)

### AI overview

Medium is recruiting a Principal Backend Engineer to lead the evolution of its core backend, which supports reading, writing, and discovery. The role includes modernizing the codebase, setting engineering standards, mentoring, and hands-on systems work, and is fully remote in the US.

### Source excerpt

When I joined Medium, it was because I still believe in the internet as a place for ideas. Not noise, not outrage, but content that connects people through shared curiosity. Medium's mission is to deepen understanding and spread ideas that matter. We're building the best place for reading and writing online: A space that rewards clarity, authenticity, and craft over clickbait and engagement hacks. That vision only works if the technology beneath it is as thoughtful as the writing above it. That's where you come in. Yes, you! Photo by Yannick Pulver on UnsplashThe Role We are starting the search for a Principal Backend Engineer at Medium, our most senior IC level and a leadership position at the company. In this role, you will lead the evolution of Medium's core backend, the systems that power reading, writing, and discovery for millions of users every day. This is a deeply hands-on, high-impact role. You'll help craft the strategy for where we want to be as an engineering organization on the backend, and be accountable for the quality, standards, and evolution of the Medium backend platform. You will: Partner with engineering, design, data, and executive leadership to define and deliver the future of Medium. Make our platform not just reliable, but genuinely delightful to build on. Modernize a large, living codebase so our teams can move faster and ship with confidence. Lead through influence by setting standards, reviewing critical code and designs, and mentoring engineers across teams. Shape how we build, ensuring our architecture, practices, and systems are strong, scalable, and aligned with Medium's long-term goals. Balance vision with execution by building, debugging, and refining systems yourself to model technical excellence and thoughtful engineering craft. And you can do this work wherever you do your best thinking, whether that's a home office, a beachside Airbnb, a rainy coastal cabin in the Pacific Northwest, or your favorite café with great Wi-Fi and ev

## Medium Android App -- Migrating from Apollo Kotlin 3 to 4: Lessons Learned

DevFeed: [Medium Android App -- Migrating from Apollo Kotlin 3 to 4: Lessons Learned](<https://devfeed.tech/articles/medium-android-app-migrating-from-apollo-kotlin-3-to-4-lessons-learned-20324.md>)

Original publisher: [Read original article](<https://medium.engineering/medium-android-app-migrating-from-apollo-kotlin-3-to-4-lessons-learned-ff8d0d861cdb?source=rss----2817475205d3---4>)

Author: Pierrick CAEN

Published: 2025-10-06T08:18:42Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [experience report](<https://devfeed.tech/topics/experience-report.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Android](<https://devfeed.tech/topics/android.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apollo](<https://devfeed.tech/tags/apollo.md>), [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [cache](<https://devfeed.tech/tags/cache.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [medium](<https://devfeed.tech/tags/medium.md>), [migration](<https://devfeed.tech/tags/migration.md>), [network](<https://devfeed.tech/tags/network.md>), [performance](<https://devfeed.tech/tags/performance.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

The Medium Android migration from Apollo Kotlin 3 to 4 exposed cache misses in `watch()` calls because Apollo 4 surfaces exceptions through `ApolloResponse`, including misses that had previously gone unnoticed. The app used `FetchPolicy.CacheFirst` and watched normalized-cache changes for live UI updates. The author traced misses to faulty programmatic cache keys, switched to declarative type and field policies, and configured `__typename` on all operations. Watchers now return `Result` values and filter expected cache or network exceptions according to fetch policy, since fallback responses may follow. The migration also updated exception handling, replaced `executeV3()` with `execute()`, and removed `fetchThrows = true`. The author added a Currency scalar adapter. HTTP batching and persisted queries are described as future improvements; persisted queries require backend support.

### Source excerpt

Photo by Mario Verduzco on UnsplashMedium Android App -- Migrating from Apollo Kotlin 3 to 4: Lessons Learned In this post, I'll share my experience migrating the Medium Android app from Apollo Kotlin version 3 to version 4, including the challenges I encountered and how I solved them to improve our GraphQL implementation. Understanding Our Apollo Cache Implementation Before diving into the migration, it's important to understand how we use Apollo's cache in the Medium Android app. Our app relies heavily on Apollo's normalized cache for several critical purposes: Performance Optimization: We use FetchPolicy.CacheFirst as our default strategy, which means we always try to serve data from the cache first before making network requests. This significantly reduces loading times and provides a smooth user experience, especially when users navigate between screens that display similar content. Real-time Updates: We use Apollo's watch() functionality extensively to observe cache changes and automatically update our UI when data changes. This is particularly useful for features like: Live clap counts on posts Real-time follower updates Post viewed updates and more... Starting the Migration The initial plan was straightforward: update Apollo Kotlin from version 3 to 4. The IntelliJ plugin made this process seem simple at first glance. Key Changes in Apollo Kotlin 4 Group id / plugin id / package name: Apollo Kotlin 4 uses a new identifier (com.apollographql.apollo) for its maven group id, Gradle plugin id, and package name. This change from com.apollographql.apollo3 allows running version 4 alongside version 3 if needed. Source: Apollo Kotlin Migration Guide - Group id / plugin id / package name Exception handling: Apollo 4 has a new way of handling exceptions. Instead of throwing exceptions directly, they're now passed through ApolloResponse. Source: Apollo Kotlin Migration Guide -- Fetch errors do not throw ApolloCompositeException: In Apollo Kotlin 3, when both cache and netw

## Engineering stories behind the Medium Daily Digest Algorithm: Part 2

DevFeed: [Engineering stories behind the Medium Daily Digest Algorithm: Part 2](<https://devfeed.tech/articles/engineering-stories-behind-the-medium-daily-digest-algorithm-part-2-20318.md>)

Original publisher: [Read original article](<https://medium.engineering/engineering-stories-behind-the-medium-daily-digest-algorithm-part-2-c977ad0b134f?source=rss----2817475205d3---4>)

Author: Raphael Montaud

Published: 2025-08-28T11:31:36Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Tech Debt](<https://devfeed.tech/topics/tech-debt.md>), [it modernization](<https://devfeed.tech/topics/it-modernization.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [bloom-filter](<https://devfeed.tech/tags/bloom-filter.md>), [bloom-filters](<https://devfeed.tech/tags/bloom-filters.md>), [daily](<https://devfeed.tech/tags/daily.md>), [daily-digest](<https://devfeed.tech/tags/daily-digest.md>), [database](<https://devfeed.tech/tags/database.md>), [digest](<https://devfeed.tech/tags/digest.md>), [dynamodb](<https://devfeed.tech/tags/dynamodb.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [medium](<https://devfeed.tech/tags/medium.md>), [migration](<https://devfeed.tech/tags/migration.md>), [recommendation-system](<https://devfeed.tech/tags/recommendation-system.md>), [recommendations](<https://devfeed.tech/tags/recommendations.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>)

### AI overview

Medium replaced its oversized, hard-to-debug Bloom filters for Daily Digest recommendations with queries against user-level database histories, reporting a tenfold cost reduction compared with its existing setup. For muted writers, it fetches each user's muted list, which averages fewer than one database item per feed because most users mute nobody; heavy muters can incur higher latency. For presentation counts, it fetches up to the latest 5,000 records and accepts edge cases beyond that window because the three-presentation threshold is a diversity guideline, not a hard limit. Read filtering is mandatory, so it uses a two-stage approach: query recent reading history early, then check remaining candidates individually. This supports clearing reading history and avoids maintaining derived filter data. The cost comparison is qualified: a newly created, better-separated Bloom filter setup might have been cheaper than Medium's single, ever-growing instance.

### Source excerpt

How we made our filtering 10x cheaper by removing our Bloom Filters Bloom Filters are great tools to make fast and cheap filtering. They also come with plenty of problems and can easily get expensive and cumbersome. We switched to user-based direct database queries, which made our filtering cheaper and easy to maintain. Here's the full breakdown of that migration. Intro: This is a 4-part series breaking down improvements to the algorithm behind the Medium's Daily Digest over the past year. When we started this work, the Digest was suboptimal -- and since it's a huge distribution surface, reaching millions of readers every day, we started working on incremental improvements.By the end of these projects, the digest was 10% more likely to convert users to paying members, less expensive to run, more flexible and easier to maintain and it's now providing higher quality recommendations for all our users, including our "power readers".This is told through the lens of our engineering team tackling a series of challenges one by one. Medium has a small team but we operate on a big scale. We're working our way through some technical debt and at the same time, striving to provide the best experience for our readers. This is the source of many interesting challenges.I hope this series helps you understand how the recommendations algorithm work and can help others who are facing similar technical challenges. This is probably the most technical story in the series, but I will keep it as simple as possible and hopefully this is interesting for non-technical readers too. Some Concepts Here's a little cheat sheet with some concepts you may need to follow along with this story You may need this to understand the rest of this postBloom Filters at Medium A lot of the filters I mention in this series are backed by Bloom Filters (I've described some of those filtering rules in Part 1 if you haven't read it already). We use Bloom filters to remove stories we think won't interest readers fro

## Engineering stories behind the Medium Daily Digest Algorithm: Part 1

DevFeed: [Engineering stories behind the Medium Daily Digest Algorithm: Part 1](<https://devfeed.tech/articles/engineering-stories-behind-the-medium-daily-digest-algorithm-part-1-20317.md>)

Original publisher: [Read original article](<https://medium.engineering/engineering-stories-behind-the-medium-daily-digest-algorithm-part-1-909a7ca5e807?source=rss----2817475205d3---4>)

Author: Raphael Montaud

Published: 2025-08-26T11:31:37Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [recommendation systems](<https://devfeed.tech/topics/recommendation-systems.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [model](<https://devfeed.tech/tags/model.md>), [recommendation-system](<https://devfeed.tech/tags/recommendation-system.md>), [recommendations](<https://devfeed.tech/tags/recommendations.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [technical](<https://devfeed.tech/tags/technical.md>)

### AI overview

This engineering article begins a four-part series about improving Medium's Daily Digest recommendation algorithm. It describes a mismatch between recommendations in the Digest and the homepage feed, despite both using the same algorithm, model, and features, and introduces an investigation into differences in filtering.

### Source excerpt

How we made our email story recommendations better In this Part 1, you'll understand how we improved one of the main ways our users are exposed to our product and how that led to a massive 7% increase on the average reading time for the digest users. Intro: This is a 4-part series breaking down improvements to the algorithm behind the Medium's Daily Digest over the past year. When we started this work, the Digest was suboptimal -- and since it's a huge distribution surface, reaching millions of readers every day, we started working on incremental improvements.By the end of these projects, the digest was 10% more likely to convert users to paying members, less expensive to run, more flexible and easier to maintain and it's now providing higher quality recommendations for all our users, including our "power readers".This is told through the lens of our engineering team tackling a series of challenges one by one. Medium has a small team but we operate on a big scale. We're working our way through some technical debt and at the same time, striving to provide the best experience for our readers. This is the source of many interesting challenges.I hope this series helps you understand how the recommendations algorithm work and can help others who are facing similar technical challenges.Some Concepts Here's a little cheat sheet with some concepts you may need to follow along with this story You may need this to understand the rest of this postThe Discovery A little while back, Leigh, our Machine Learning Engineer and model training guru, started noticing something weird. The recommended stories in his digest were consistently not great matches for his reading profile. At the same time, the recommended stories in his homepage feed (what we call the "For You" feed) were consistently very well targeted. This was a bit puzzling and unexpected. Those two recommendation surfaces rely on exactly the same algorithm. We source stories the same way, and we rank them using the same mo

## Engineering stories behind the Medium Daily Digest Algorithm: Part 4

DevFeed: [Engineering stories behind the Medium Daily Digest Algorithm: Part 4](<https://devfeed.tech/articles/engineering-stories-behind-the-medium-daily-digest-algorithm-part-4-20319.md>)

Original publisher: [Read original article](<https://medium.engineering/engineering-stories-behind-the-medium-daily-digest-algorithm-part-4-ec7136f21acd?source=rss----2817475205d3---4>)

Author: Raphael Montaud

Published: 2025-08-25T18:31:30Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [recommendation systems](<https://devfeed.tech/topics/recommendation-systems.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [daily-digest](<https://devfeed.tech/tags/daily-digest.md>), [database](<https://devfeed.tech/tags/database.md>), [digests](<https://devfeed.tech/tags/digests.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [experience](<https://devfeed.tech/tags/experience.md>), [improvements](<https://devfeed.tech/tags/improvements.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [medium](<https://devfeed.tech/tags/medium.md>), [members](<https://devfeed.tech/tags/members.md>), [programming](<https://devfeed.tech/tags/programming.md>), [reading](<https://devfeed.tech/tags/reading.md>), [recommendation-system](<https://devfeed.tech/tags/recommendation-system.md>), [recommendations](<https://devfeed.tech/tags/recommendations.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [stories](<https://devfeed.tech/tags/stories.md>), [team](<https://devfeed.tech/tags/team.md>), [technical](<https://devfeed.tech/tags/technical.md>), [technical-debt](<https://devfeed.tech/tags/technical-debt.md>), [tickets](<https://devfeed.tech/tags/tickets.md>), [user](<https://devfeed.tech/tags/user.md>), [users](<https://devfeed.tech/tags/users.md>)

### AI overview

Medium found that some heavy digest users repeatedly received the same stories, sometimes up to eight times, even though repetition was minimal for most users. Because Apple Mail Privacy Protection makes opens unreliable, the team tracked digest emails with at least one story click as definitely opened. It then filtered stories sent in more than one such digest. Tests suggested a threshold of one would remove nearly five stories per digest for complaining users while affecting free users by less than one story on average. An A/B test showed a statistically significant increase in reading time, especially among members, and no subsequent diversification complaints. The team notes the hard filter may be improved as a soft filter and could account for story position in the email.

### Source excerpt

Cross-Digest diversification In this part 4, we'll see how we went from investigating a few complaints from digest power users to improving our digest recommendations across the board. Intro: This is a 4-part series breaking down improvements to the algorithm behind the Medium's Daily Digest over the past year. When we started this work, the Digest was suboptimal -- and since it's a huge distribution surface, reaching millions of readers every day, we started working on incremental improvements.By the end of these projects, the digest was 10% more likely to convert users to paying members, less expensive to run, more flexible and easier to maintain and it's now providing higher quality recommendations for all our users, including our "power readers".This is told through the lens of our engineering team tackling a series of challenges one by one. Medium has a small team but we operate on a big scale. We're working our way through some technical debt and at the same time, striving to provide the best experience for our readers. This is the source of many interesting challenges.I hope this series helps you understand how the recommendations algorithm work and can help others who are facing similar technical challenges.Some Concepts Here's a little cheat sheet with some concepts you may need to follow along this story You may need this to understand the rest of this postUser Complaints After we shipped all the changes mentioned in the previous installments of this series, we started seeing some support tickets coming in related to the digest: User complaints that started off our investigation I think we should appreciate the level of thoughtfulness our users put in those support tickets. We review those carefully and we take pride in reading and answering every support tickets. Those were forwarded to the recommendation team and we immediately thought that maybe we oversteered to much when we removed some of the filtering rules for the digest. User digests were too repet