DEV Community

Cover image for Using Feature Flags to troll our competitor without a line of code πŸ˜ƒ
Kyle Johnson
Kyle Johnson

Posted on

Using Feature Flags to troll our competitor without a line of code πŸ˜ƒ

The back story

πŸ“– When we built Flagsmith, we decided early on to power the admin dashboard with our own Feature Flags. As well as following a methodology we truly believed in, this meant we could be super flexible in how our admin panel behaves.

This proved very useful in the story I'm about to share.

How it began

πŸ•’ It's Monday 6 pm and I'm just about to wrap up for the day.

Early on during product development, we wrote a crude SlackBot that alerted us to signups from new email domains we haven't seen before. At 6:38 pm UK Time, we saw a new domain, it was our biggest feature flag competitor.

Flagsmith Slack

Laying the foundations

The first step was to make sure this prank wasn't going to affect anyone else, I may have been caffeine depleted but I wasn't going to go full-on cowboy.

Feature Flag Segments

πŸ’‘ I created a segment to match any user from the company's domain, users are given a trait of their email address when they log in so I was easily able to target that trait with a regular expression.

πŸ˜‡ In the interest of privacy I've hidden said domain from the post. If someone from there is reading this, you're welcome.

πŸ•΅οΈβ€β™‚οΈ I also added in my email so I could see what they see, think of it as testing in production.

πŸ€” At this point I had quite a few options.

A simple butter bar

I felt like off starting off lightly, just a simple hello to let them know we know.

Thankfully this was really easy, we have a butter bar messaging feature to send out suitable messaging to segments of users.

πŸ˜ƒ Our cheeky user segment should definitely get a personalised message.

Feature targeting

That was easy, now they see a lovely message on every page they take a look at!

A more bespoke experience

This was nice but I felt like I could do more for them.

⭐ I decided they deserved their very own SDK integration on our platform. I'm sure this is something they'd enjoy.

Remote config is great

The result

This bit of remote config leads to a much more personalised user experience for our new users.

Perfect

πŸ‘Œ In the end there can only be one feature flag platform.

Flagsmith

Top comments (3)

Collapse
 
cosmicflood profile image
Comiscience

Thanks for your post.

Do you think the use of feature flags is too invasive and may affect the normal operation of the program?

When I promote feature flags to clients, this is the question that get used the most.

What do you think about Launchdarkly's Code reference feature? Would a code analysis tool to help solve unexpected failures caused by Feature flag be useful?

Collapse
 
kylessg profile image
Kyle Johnson • Edited

Do you think the use of feature flags is too invasive and may affect the normal operation of the program?

No I really don't, if used in the right way I see it as the opposite:

  • Coming from a place where I developed med tech and we had massive quarterly releases, the anxiety and likelihood of several massive changes causing issues were more of a threat to operations of a program and downtime vs consistently releasing with the safeguard of feature flags.
  • The idea that you can silently push new features (which I do all the time, daily.) testable by the internal team in production without affecting other users I'd say, is the opposite of invasive.
    • Being able to turn off a feature or configure it to avoid bugs and downtime is really quick. I see being able to react quickly more important than occasional incorrect flag/config changes.

What do you think about Launchdarkly's Code reference feature? Would a code analysis tool to help solve unexpected failures caused by Feature flag be useful?

Code reference checks are a good idea, but I don't think it really solves what you're talking about. What would solve that better is plugging in feature flag audit logs to monitoring like Datadog. For large scale apps that can catch issues, or on the positive side, improved conversion.

Collapse
 
andrewdotdev profile image
Andrew MacLean

πŸ‘Œ In the end there can only be one feature flag platform.

Gonna remember that (Dev πŸ₯‘ at DevCycle) πŸ˜‰