Logo
Logo
Home
Archive
Advertise
YouTube
Login
Sign Up
  • Home
  • Posts
  • 🦥 Feature Flags

🦥 Feature Flags

Jul 1, 2025

Hello friends!

Welcome to this week’s Sloth Bytes. I hope you had a fun week 😄

Build Real Apps in Minutes

I'll be honest. I used to think no-code was for people who "couldn't really code."

But I realized I was missing the entire point.

While I was stuck planning, others were already launching with Bubble — no code, no team, just their idea and a browser.

How many ideas stall at the blank page? Bubble AI turns plain English into real apps — so you can skip the overwhelm and start building.

All that work that has nothing to do with solving real problems

Bubble AI handles the boring stuff so you can:

  • Launch real apps in hours, not months.

  • Start making money with built-in payments and login flows.

  • Focus on your idea — Bubble AI handles the rest.

  • Apps built on Bubble scale — just ask companies like HubSpot and Amazon.

You don’t need to be technical to build. With Bubble AI, your idea is the blueprint.

Stop waiting for the perfect moment or the perfect dev team. Start building with Bubble AI today.

Feature Flags

I’ve been curious about feature flags for a while and wanted to share what I learned 😄

Next week I’ll do a more beginner/fundamental topic! Let me know if you have a topic in mind.

Imagine you have a job (already unrealistic.)

The non-technical CEO wants to launch their brand new “one of a kind never been done before” feature on Friday.

The problem?

This feature has a chance of breaking everything and they want to deploy on a Friday…

That's a dumpster fire waiting to happen.

But there is a way to reduce the potential damage and embarrassment.

Feature flags.

What Are Feature Flags?

Feature flags are basically if statement with superpowers:

if feature_flag("new_checkout"):
    return new_checkout_experience()
else:
    return old_checkout_experience()

These statements allow you to do things like:

  • deploy new features without making them visible to users

  • make features visible only to a small amount of users and environments

The Real Power: Gradual Rollouts

Feature flags aren’t ONLY switches (on/off), you can also “roll out” features intelligently.

Slowly increase the amount of users that have access to these features:

def feature_enabled(flag, user_id):
    rollout_percent = get_rollout_percentage(flag)

    # Put users into "buckets."
    user_bucket = hash(f"{flag}:{user_id}") % 100
    #If the user's bucket number is less than the rollout
    #They see the feature
    return user_bucket <= rollout_percent
    #Ex: rollout_percent = 50, users in bucket 0-50 see the feature.

# Monday: 1% → Tuesday: 5% → Wednesday: 25% → Friday: 100% of users
  • Same users always see/don't see the feature (consistent experience)

  • You can gradually increase the rollout

  • If something breaks, only affects small % of users

  • No need to maintain lists of who has access

Common Feature Flag Patterns/Use Cases

Kill Switches:

If a feature has a critical bug, traffic spikes or third-party service failures, you can use feature flags to quickly turn off functionality when needed.

This works for ALL features, not just new features.

A/B Testing:

These flags let you test out/experiment features to small amounts of users to see if it’s performing well/worth to maintain.

if feature_variant("button_color") == "green":
    color = "#00ff00"
else:
    color = "#ff0000"

track_conversion(variant=feature_variant("button_color"))

User Targeting:

def should_enable(flag, user):
    # Beta testers
    if user.email in BETA_USERS:
        return True
    
    # Geographic rollout
    if flag == "new_payment" and user.country == "CA":
        return True
    
    # Percentage for others
    return percentage_rollout(flag, user.id)

Wait this sounds complicated?

Yep it is, so it’s not surprising there’s services that handle this annoying stuff.

Some Popular Services

  • PostHog

  • LaunchDarkly

  • Unleash

  • GrowthBook

You’re a nerd and wanna learn more?

Check this article out:

Feature Flags 101: Use Cases, Benefits, and Best Practices

Feature flags are a software development concept that allow you to enable or disable a feature without modifying the source code or requiring a redeploy.

Vercel Ship 2025 recap - Vercel

Vercel Ship 2025 added new building blocks for an AI era: Fast, flexible, and secure by default.

Gemini CLI: your open-source AI agent

Free and open source, Gemini CLI brings Gemini directly into developers’ terminals — with unmatched access for individuals.

Introducing 11.ai - Personal AI Voice Assistants | ElevenLabs

Build and customise your own AI voice assistant with unique names and voices. Connect to hundreds of tools and integrations, powered by MCP.

Project Vend: Can Claude run a small shop? (And why does that matter?)

We let Claude run a small shop in the Anthropic office. Here's what happened.

7 People Now Have Elon Musk's Neuralink Brain Implant

The brain-computer interface lets those with cervical spinal cord injuries or ALS control a computer with their thoughts. This year, Neuralink has more than doubled the number of patients.

Thanks to everyone how submitted!

AspenTheRoyal, BraedenAlonge, dganesh05, emil-case, plantaeart, mau-estradiote, cre-w, spenpal, Fireboy086.

Special shout out to SabhyaAggarwal. I forgot to include his submission last week and it was also his birthday (I felt really bad.)

Feel free to comment Happy late birthday to Sabhya!

How Many Digits between 1 and N

Imagine you took all the numbers between 0 and n and concatenated them together into a long string.

How many digits are there between 0 and n? Write a function that can calculate this.

There are 0 digits between 0 and 1, there are 9 digits between 0 and 10 and there are 189 digits between 0 and 100.

Examples

digits(1)
output = 0

digits(10)
output = 9

digits(100)
output = 189

digits(2020)
output = 6969

How To Submit Answers

Reply with

  • A link to your solution (github, twitter, personal blog, portfolio, replit, etc)

  • or if you’re on the web version leave a comment!

  • If you want to be mentioned here, I’d prefer if you sent a GitHub link or Replit!

That’s all from me!

Have a great week, be safe, make good choices, and have fun coding.

If I made a mistake or you have any questions, feel free to comment below or reply to the email!

See you all next week.

What'd you think of today's email?

  • 🦥 Amazing! Keep it up
  • 🦥 Good, not great
  • 🦥 It sucked

Login or Subscribe to participate

Want to advertise in Sloth Bytes?

If your company is interested in reaching an audience of developers and programming enthusiasts, you may want to advertise with us here.

Reply

Avatar

or to participate

Keep Reading

envelope-simple

Join 50k+ developers and become a better programmer and stay up to date in just 5 minutes.

© 2026 Sloth Bytes.
Report abusePrivacy policyTerms of use
beehiivPowered by beehiiv