This is why feature flags are useful

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ธ.ค. 2024

ความคิดเห็น • 52

  • @zizazorro5509
    @zizazorro5509 2 หลายเดือนก่อน +18

    Make sure you also protect the route the feature flag is going to (people can still go to generate/bulk-generate)

    • @WebDevCody
      @WebDevCody  2 หลายเดือนก่อน +3

      Yeah, good point. I probably forgot about that

    • @mykalimba
      @mykalimba 2 หลายเดือนก่อน +2

      @@WebDevCody In the video, you say that when the feature flag is OFF, the endpoints are disabled and can't be used. Isn't that the same as "protect the route"?

    • @stefano8840
      @stefano8840 2 หลายเดือนก่อน

      Yeah they will be able to access the page through the route but they won’t be able to use any of the logic because the endpoints will throw errors

    • @WebDevCody
      @WebDevCody  2 หลายเดือนก่อน

      @@mykalimba route isn’t the same as api. You should protect both, but the api is the actual important one, the other is a UX concern

  • @oSpam
    @oSpam 2 หลายเดือนก่อน +3

    Great vid! We use decorators or middleware for endpoints rather than wrapping in if statements. We use redis for storage of them. We have two kinds of feature flags. Global, stuff for site wide admins and user ones. Maybe when we get more users we’lol even do percentage of people for x time get to do things.
    Anyways I’ll stop rambling on now

  • @annakushina6255
    @annakushina6255 2 หลายเดือนก่อน +5

    I actually use this too in my work, didn't know it was called Feature Flags.

  • @br3nto
    @br3nto หลายเดือนก่อน

    If you have authorisation built into your app, it’s always better to model feature flags as assignable permissions. E.g “Can user do X” or “Can user see Y”. These can be assigned either directly to the user or to a group which a user can be assigned to. These permissions. Could be backed by configuration if necessary, but I have a suspicion that feature flags should generally not exists in configuration as it usually requires a server restart to take effect, where as permission based feature flags work in real time. I call this: promoting configuration to application run-time.

  • @salamandr4111
    @salamandr4111 หลายเดือนก่อน

    Thank you! Pretty clear and nice info

  • @Oldbettie
    @Oldbettie 2 หลายเดือนก่อน

    We do it in code, ours requires a redeploy but some values we can adjust in cookies if we allow them. Makes it nice for testing. Also less database requets when you have 100 feature flags adds up

  • @teofannispapadopoulos4349
    @teofannispapadopoulos4349 หลายเดือนก่อน

    I would be interested to see a video exploring the pseudo seeder function that computes based on user id. I think that might be quite performant, curious to see how you would go on implementing something like this

  • @yassine-sa
    @yassine-sa 2 หลายเดือนก่อน

    One idea I just had, instead of using a hash to enable the feature for a small percentage of users, you could have some analytics tool set up that tracks how users use your app, and with that you could enable the feature only for the users who use your app frequently, because it's less critical if a loyal user sees a bug than if a new user does. Of course this is only useful for larger apps who have a large user base and not for sass products that are just starting like your app

  • @ajzack983
    @ajzack983 2 หลายเดือนก่อน

    great value as always.
    I happened to be using the .env approach as a feature flag at work but it's starting to accumulate with multiple flags, also when I want to change something I'll have to contact the guys with the access to prod which is never fun.
    When I get some time I'll do database based flags with a /flags page to toggle things around.
    But I don't want to query flags for every request so I'll cache the config on CRUDS and toggles for better performance.

  • @ardianhotii
    @ardianhotii 2 หลายเดือนก่อน

    Great video , I always wanted to implement feature flags into my apps but didn't know how , I would like you to make a video in more details explaining and implementing feature flags maybe with a table in db instead of env variables , really like your videos

  • @dew_reddit
    @dew_reddit หลายเดือนก่อน

    We have a vault to store feature flags apart from other things. We toggle features which works fine in backend but in order to reflect it in frontend, user has to manually refresh the page to get the new values of feature flags.
    Is there some logic to avoid needing a refresh to detect new changes like you showed in your video?

  • @SeibertSwirl
    @SeibertSwirl 2 หลายเดือนก่อน +26

    First! I love you! You’re doing great!

    • @WebDevCody
      @WebDevCody  2 หลายเดือนก่อน +7

      You're the best!

    • @UnderCtrl
      @UnderCtrl 2 หลายเดือนก่อน +16

      Damn even members can’t be first anymore 😭

  • @oliverkidd5160
    @oliverkidd5160 หลายเดือนก่อน

    How would you suggest implementing on a static nextjs site with 1Mn+ page req / month? My current solution requires rebuild with env variables but I wonder if there's a better way!

    • @WebDevCody
      @WebDevCody  หลายเดือนก่อน +1

      What are you trying to flag? Sometimes you might just want to fetch the flags once when the user first hits your ui. If it’s critical they need the feature turned on or off the moment you flip the flag you’d need polling or web sockets. If the feature is around statically built routes, idk if you could do anything without redeploying

  • @lazar2629
    @lazar2629 2 หลายเดือนก่อน

    Considering that you use a macbook for programming, do you have any advice on how to extend battery life due to frequent charging. Do you put it on the charger and turn on the program to block the charging of the battery, but to work directly from the charger

    • @WebDevCody
      @WebDevCody  2 หลายเดือนก่อน

      I don’t do anything special, I just charge it to full then use it until near red, then charge it till full

  • @vuphanxuan7766
    @vuphanxuan7766 2 หลายเดือนก่อน +2

    Feature Flag can cause dead code if your team don't have good management process, especially in big team

    • @pyrocentury
      @pyrocentury 2 หลายเดือนก่อน

      The CEO of LaunchDarkly had a good talk--Patterns & Anti-Patterns for Effective Feature Flagging • Edith Harbaugh • YOW! 2019-- about some patterns/anti-patterns for using feature flags/toggling.

  • @aymenbachiri-yh2hd
    @aymenbachiri-yh2hd 2 หลายเดือนก่อน

    Thank you so much

  • @ilahazs
    @ilahazs 2 หลายเดือนก่อน

    1:02 which feature should I enabled on Mac to do that action? also what hotkey

    • @bjul
      @bjul 2 หลายเดือนก่อน

      I have it on cmd + shift +4, i thinks it's the default but not sure

  • @JuicyBenji
    @JuicyBenji 2 หลายเดือนก่อน +1

    We use unleash for our featureflags and it's a really good service

    • @wlockuz4467
      @wlockuz4467 2 หลายเดือนก่อน

      Yeah Unleash is really good

  • @eviltables7235
    @eviltables7235 2 หลายเดือนก่อน

    I think feature flags are a sort of example of positive technical debt. They allow you to get code out much faster, respond to issues better and more timely. The cost is that they have to be maintained and deprecated. The tradeoff is often worth it though.

    • @WebDevCody
      @WebDevCody  หลายเดือนก่อน

      you should remove the flags and branch logic after you've verified the feature is good or not. If you leave it in for a year, you're team needs to re-address how to refactor code.

    • @eviltables7235
      @eviltables7235 หลายเดือนก่อน

      @@WebDevCody yeah agreed

  • @CaliburPANDAs
    @CaliburPANDAs 2 หลายเดือนก่อน

    Which VScode theme are you using?

    • @WebDevCody
      @WebDevCody  2 หลายเดือนก่อน

      Bearded theme feat web dev cody

  • @JackBrunsion
    @JackBrunsion หลายเดือนก่อน

    how the env variables reflect to live website like that :O

    • @WebDevCody
      @WebDevCody  หลายเดือนก่อน

      Because convex is based

  • @jeremyAr
    @jeremyAr 2 หลายเดือนก่อน +1

    Cool!

  • @MrEnsiferum77
    @MrEnsiferum77 2 หลายเดือนก่อน

    I just like to push 100+ files... because no one care about anything, just push changes day and night, and when u wake the next day nothing make sense, and they like new changes

  • @dog4ik
    @dog4ik 2 หลายเดือนก่อน +1

    "You can use third party service if you are that type of developer" neat way to insult someone

    • @WebDevCody
      @WebDevCody  2 หลายเดือนก่อน +1

      Do you feel attacked? I’m using a third party service for my entire backend

  • @24pfilms
    @24pfilms 2 หลายเดือนก่อน

    I want a tester role ;) ha

    • @WebDevCody
      @WebDevCody  2 หลายเดือนก่อน +1

      I got you

  • @chinonso25
    @chinonso25 2 หลายเดือนก่อน +3

    Second - you're doing great!

  • @mobod6822
    @mobod6822 2 หลายเดือนก่อน

    ai slop dev

    • @WebDevCody
      @WebDevCody  หลายเดือนก่อน

      slop hard baby

  • @looksmatteronly
    @looksmatteronly หลายเดือนก่อน

    Youre too good looking for coding bud, pick another career

    • @WebDevCody
      @WebDevCody  หลายเดือนก่อน +1

      Wait till they find my only fans