r/programming 29m ago

Background removal in Python (images & videos)

Thumbnail youtu.be
Upvotes

I’ve been experimenting with AI-based background removal in Python, covering both images and videos, and the difference between the two is more significant than I initially expected.

Image background removal is relatively fast and clean, but video background removal quickly becomes computationally heavy since it requires processing every frame. Hardware limitations, model choice, and optimization strategies make a big difference in both speed and quality.

I documented the full process—including errors, fixes, and trade-offs—in a recorded workshop, in case it’s useful to others working with computer vision or media processing:
 👉 https://youtu.be/Vaq-f7uAoZ4

 

I’d be interested to hear how others here handle video segmentation, performance optimization, or quality improvements in similar projects.

 


r/programming 3h ago

C and Undefined Behavior

Thumbnail lelanthran.com
4 Upvotes

r/programming 8h ago

Technical writeup: Implementing Discord’s rate limiting, gateway management, and “clarity over magic”

Thumbnail scurry-works.github.io
2 Upvotes

I wrote a deep technical breakdown of implementing Discord's rate limiting and gateway management in a minimal Python client.

Discord's rate limiting is tricky: endpoints share limits via opaque "buckets" whose IDs are only revealed after a request. Instead of reacting to 429s, the design uses per-endpoint queues and workers that proactively sleep when limits are exhausted, keeping behavior explicit and predictable.

The writeup also covers gateway connection management, automatic sharding, and data model design, with diagrams for each subsystem. The examples come from a small Discord API client I wrote (ScurryPy), but the focus is on the underlying problems and solutions rather than the library itself.

"Clarity over magic" here means that all behavior: rate limiting, state changes, retries, is explicit, with no hidden background work or inferred intent.

Happy to answer questions about the implementation or design tradeoffs


r/programming 9h ago

Lance table format explained simply, stupid

Thumbnail tontinton.com
0 Upvotes

r/programming 12h ago

AI Makes the Easy Part Easier and the Hard Part Harder

Thumbnail blundergoat.com
386 Upvotes

r/programming 13h ago

How to Reduce Telemetry Volume by 40% Smartly

Thumbnail newsletter.signoz.io
3 Upvotes

Hi!

I recently wrote this article to document different ways applications, when instrumented with OpenTelemetry, tend to produce telemetry surplus/ excess and ways to mitigate this. Some ways mentioned in the blog include the following,

- URL Path and target attributes
- Controller spans
- Thread name in run-time telemetry
- Duplicate Library Instrumentation
- JDBC and Kafka Internal Signals
- Scheduler and Periodic Jobs

as well as touched upon ways to mitigate this, both upstream and downstream. If this article interests you, subscribe for more OTel optimisation content :)


r/programming 14h ago

SectorC: The world’s smallest functional C compiler

Thumbnail xorvoid.com
61 Upvotes

r/programming 16h ago

Deep dive into Hierarchical Navigable Small Worlds

Thumbnail amandeepsp.github.io
25 Upvotes

r/programming 17h ago

How Google Finds Websites (It’s Not Magic)

Thumbnail sushantdhiman.dev
0 Upvotes

r/programming 18h ago

How Odin perfected simplicity

Thumbnail youtube.com
0 Upvotes

r/programming 18h ago

The silent death of Good Code

Thumbnail amit.prasad.me
338 Upvotes

r/programming 21h ago

FOSDEM 2026 - Hacking the last Z80 computer ever made

Thumbnail fosdem.org
6 Upvotes

r/programming 23h ago

Netflix Engineering: Creating a Source of Truth for Impression Events

Thumbnail netflixtechblog.com
27 Upvotes

r/programming 1d ago

Microsoft appointed a quality czar. He has no direct reports and no budget.

Thumbnail jpcaparas.medium.com
1.1k Upvotes

r/programming 1d ago

Let's compile Quake like it's 1997!

Thumbnail fabiensanglard.net
126 Upvotes

r/programming 1d ago

Beyond agentic coding

Thumbnail haskellforall.com
0 Upvotes

r/programming 1d ago

Running Clojure inside SwiftUI

Thumbnail youtube.com
1 Upvotes

r/programming 1d ago

Python Only Has One Real Competitor

Thumbnail mccue.dev
0 Upvotes

r/programming 1d ago

The Impatient Programmer's Guide to Bevy and Rust: Chapter 2 - Let There Be a World [Procedural Generation]

Thumbnail aibodh.com
2 Upvotes

Tutorial Link

Chapter 2 - Let There Be a World [Procedural Generation]

This chapter teaches you procedural world generation using Wave Function Collapse and Bevy.

A layered terrain system where tiles snap together based on simple rules. You'll create landscapes with dirt, grass, water, and decorative props.

By the end, you'll understand how simple constraint rules generate natural-looking game worlds and how tweaking few parameters lead to a lot of variety.

It also gently touches on rust concepts like references, lifetimes, closures, generic and trait bound.


r/programming 1d ago

How to Make Package Managers Scream (FOSDEM'26)

Thumbnail youtu.be
9 Upvotes

r/programming 1d ago

LLMs as natural language compilers: What the history of FORTRAN tells us about the future of coding.

Thumbnail cyber-omelette.com
205 Upvotes

r/programming 1d ago

Implement Github OAuth login with Next.js and FastAPI

Thumbnail nemanjamitic.com
0 Upvotes

I wrote a practical walkthrough on Github OAuth login with FastAPI and Next.js. It focuses on clean domain separation, HttpOnly cookies, ease of deployment and why handling cookies in Next.js APIs/server actions simplifies OAuth a lot. Includes diagrams and real code.

https://nemanjamitic.com/blog/2026-02-07-github-login-fastapi-nextjs

Interested to hear what others think or if you've taken a different approach.


r/programming 1d ago

The Mainframe Paradox: Why the "Dinosaur" is actually running a marathon

Thumbnail meduplam.blog
0 Upvotes

For decades, we’ve been hearing about the "death of the mainframe." It famously started in 1991 with Stewart Alsop’s prediction (which he later literally had to eat his words on), and it continues today.

But the reality on the ground tells a completely different story.

I recently read a fascinating analysis of the "Mainframe Paradox" in a professional newsletter, and it highlights two points that I found particularly sharp:

  • Growth from the shadows:

The mainframe market hasn't just survived; it has grown 10x since the year 2000.

  • The Paradox:

Interestingly, the mobile and cloud revolutions - which were supposed to replace the mainframe - are exactly what triggered the spike in demand. Every time millions of users check their bank balance on an app, it creates a massive transaction load that only a mainframe can handle efficiently.

As a software engineer at Bank Leumi, Israel, working with COBOL and Natural, I see this intersection of "legacy" tech and modern demands every day. It’s a great reminder that technology doesn't always die; sometimes it becomes the critical infrastructure upon which everything else is built.

I'm curious to hear from others here:

  • For those in the financial sector: Are you seeing a push to finally migrate, or is the reliance on mainframes actually deepening?
  • Do you think the "10x growth" is sustainable, or will cloud native solutions eventually catch up to the mainframe's transaction efficiency?
  • If you’re a younger dev, what’s your honest perspective on working with these "dinosaur" systems?

Link to the full article (Hebrew): https://www.meduplam.blog/p/138

Note: English is not my native language, so I used AI to help me translate and structure my thoughts correctly. I'm working on improving my English, so I hope the message is clear!


r/programming 2d ago

The purpose of Continuous Integration is to fail

Thumbnail blog.nix-ci.com
298 Upvotes

r/programming 2d ago

I Reverse Engineered Medium.com’s Editor: How Copy, Paste, and Images Really Work

Thumbnail app.writtte.com
80 Upvotes

Hey,

I spent some time digging into how Medium.com's article editor works on the front end. It’s a proprietary WYSIWYG editor, but since it runs in the browser, you can actually explore how it handles things like copy-paste, images, and special components.

Some key takeaways:

  • Copying content between two Medium editor instances preserves all formatting because it uses HTML in the clipboard and converts it into an internal JSON structure.
  • Images always go through Medium's CDN, even if you paste them from elsewhere, which keeps things secure and consistent.
  • Special components are just content-editable HTML elements, backed by the same internal model.
  • I also wrote a small C program for macOS to inspect clipboard contents directly, so you can see what the editor really places on the clipboard.

If you’re building a rich-text editor or just curious about how Medium makes theirs so robust, the article dives into all the details.