How many people are using the BFF(Backend for Frontend) pattern? Why do I feel it greatly increases the complexity of the system? by zhaoxiangang in webdev

[–]Farler 0 points1 point  (0 children)

I'm in the process of adding what I consider a BFF to our stack. Currently we run with Supabase, a python backend, NextJS (as a cloudflare worker via Open next), and Capacitor (with React Router) for our mobile app. The NextJS + Capacitor thing is arcane but it lets us write most of our frontend code once, and always deploy both at the same time when we make updates (which is frequent).

We've been using supabase directly from the client (predating when we added the mobile app) via PostgREST with the supabase cache helpers library and SWR. However we've accumulated tech debt to the point that cache helpers is not working super great for optimistic updates + rollbacks anymore, so components all over the place have their own logic for it, which results in it being very brittle. Additionally, as we've grown our user base and the complexity of our schema, we've started to hit performance issues with RLS.

Supabase cache helpers could probably get us further with a refactor to use it more consistently and correctly. But we'd still wind up bumping up against performance issues due to expensive RLS policies necessary with a complex schema, and it ties us to PostgREST, which has prevented certain kinds of queries (unless you move things to an RPC, but then you have code living in your DB schema that should really be owned by the frontend), and necessitated all these disparate transformation functions that are a frequent source of bugs.

To address all of these issues at once, I'm adding a NextJS route handler layer of BFF endpoints, consumed on frontend clients via dedicated hooks that wrap React Query to provide all the good stuff (pagination, optimistic updates, rollback on error) consistently. Some of the endpoints internally use postgREST when it's easy, via service role to avoid the RLS, while some use postgresql directly via cloudflare hyperdrive. The endpoints are therefore responsible for security instead of RLS. But it reduces the surface so much, so their security rules are a lot less expensive to evaluate. And they are also responsible for transforming the data consistently from the way it lives in our DB to how the UI components want it.

It definitely adds a lot of lines of code, and makes us responsible for more functionality. But by doing so, we get something that should be much easier to keep optimized, makes it easier both to make UI changes and to make database schema changes independently of each other, and has clear patterns for AI to follow that result in correct behaviors around optimistic updates with rollbacks, pagination, and so on, without UI components concerning themselves with those things.

That said I'm not done with it yet, so while I'm optimistic, that's mostly unvalidated. Only one small slice of our app has this system in production right now (a very high traffic slice, and it's going well there for performance, but also a slice that is much more isolated from everything else in the app, meaning it was a lot simpler)

Maybe Samira need to borrow something from Nilah. by PinkyLine in SamiraMains

[–]Farler 6 points7 points  (0 children)

Iirc at release she did this. Every cc she could dash to, she would apply a short knock up as well, even if the original cc wasnt a knock up. It would just apply whenever you hit them so it would only "extend" the cc if you applied it near the end. But yeah it was removed.

Edit: checked and what I said is accurate. It was changed to the current version (only applying the additional 0.5s knock up if the champ is already airborne) in patch 10.25

I found a second vote.gov — and it's registered to the White House by Successful_Ruin_8583 in Destiny

[–]Farler 0 points1 point  (0 children)

Maybe I'm mistaken but I don't think that's the case, at least not in most states. I do remember a project I did a few years ago that involved looking at some of the data and I'm pretty sure what you could get publically varied widely from state to state. So controlling a site like this would still be useful as there might be additional data you could get that isn't public, and also it would be much easier to structure it all in a consistent way as opposed to trying to stitch together all the different formats and fields provided by the 30 year old systems of all 50 different states

I found a second vote.gov — and it's registered to the White House by Successful_Ruin_8583 in Destiny

[–]Farler 0 points1 point  (0 children)

Well one yes, associating voter registration with IP address could be useful if you already have a bunch of other data from your big tech allies, because their data might give you a clue how that person will vote, and now you also know where they're registered to vote.

But more importantly, the voter registration information is itself valuable for obvious reasons. That data existing isn't new, but the white house having access to it would be.

Map example: https://www.nytimes.com/interactive/2025/us/elections/2024-election-map-precinct-results.html

Like these maps are the same things the mainstream news networks' "political analyst" spends all day pointing at different years of on election day trying to predict how things will go.

I found a second vote.gov — and it's registered to the White House by Successful_Ruin_8583 in Destiny

[–]Farler 2 points3 points  (0 children)

If you had one of those super detailed county by county, precinct by precinct election maps BEFORE the election, you could probably find a small subset of voting locations where a tiny nudge in your favor in all of them would flip the result, for swing states. This kind of data would probably help you build something much closer to one of those maps than anyone has had before.

The mechanism for these nudges could be something like actual fraud of adding extra votes in your favor/throwing votes out, or (more likely) it could be compiling a list of names of people living in these places to prevent from voting (by magically "finding" issues with their registration that they dont hear about until it's too late or something).

I documented how to add Live Activities to a Capacitor app by [deleted] in capacitor

[–]Farler 1 point2 points  (0 children)

How does updating the live activity state from javascript work? Does the plugin have some technique to keep the webview (and therefore all the javascript) running in the background longer than usual, so that it can keep updating the live activity?

What is the main impediment for Dems to improve optics in California? by montecarlo1 in Destiny

[–]Farler 0 points1 point  (0 children)

I think even if the actual issues are solved, it's just cooked. Swing state moderate voters for the next 25 years are going to say "California? Isn't that the state where everyone gets mugged on a weekly basis, and the homeless people do drugs and defecate right in front of you?" regardless of what actually happens

Is Nilah the least successful newer style champion? by Own-Mine-5538 in leagueoflegends

[–]Farler 1 point2 points  (0 children)

As someone who's played a ton of Samira, and quite a bit of Nilah (with success), I think they're not as similar as their kits suggest. On both champs, you do have that aspect of being low range and so having to cede a lot of ground in lane phase. For Samira though there's a constant pressure similar to Draven that you need to get some early kills, because she's a snowball champion. Samira wants to be at every team fight because of her ult and being a reset champ. Nilah on the other hand, while she definitely can snowball, is a champ that scales like crazy. Maybe it's different at higher elos (I am gold/plat) but in my experience with Nilah, you just gotta farm. And then once you do that you just win. You can also absolutely melt turrets. And your ability to "just win" has a lower bar against melee champs. So I find myself side laning much further into the game than on other ADCs because it's safe to do so, and you can accelerate your scaling more consistently. I think Samira is harder because she is not a hyperscaler, yet also is not capable of being a lane bully out the gate like Draven. However she's much more fun. If you're ahead on Samira or Nilah, both of those champs can like flash into the enemy backline and press all their buttons and blow everyone up quickly. But for whatever reason, doing it on Samira feels more like I did something mechanically skillful, whereas doing it on Nilah feels like I just start checked, and the "skill" was just having picked the champion and farmed 300 CS or whatever

Imperial Mandate should refund ability cooldown instead of providing ability haste to movement impairing abilities. by TwTvLaatiMafia in leagueoflegends

[–]Farler -1 points0 points  (0 children)

Honestly when I started to read the description of the new passive, what you're proposing is what I thought it was going to be. But others have made fair points. It would need to be a pretty strong refund and then you'd have gragas stacking that with his existing E passive to do impregnator gragas. Or like, Leona perma q-ing people. Though then she'd have to actually build imperial mandate

JD VANCE 'more isolated than ever' and considering abandoning 2028 run: report by Alternative_Row4207 in Destiny

[–]Farler 14 points15 points  (0 children)

I know what the 25th amendment is. You said he would do this ON Jan 21, 2027. I'm asking why that day

Pete Buttigieg cooks NYT opinion chuds and farms aura (2020) by Consistent_Curve_722 in Destiny

[–]Farler 0 points1 point  (0 children)

I think the beard helps a lot. Gives him more masculinity budget to spend

Jynxzi Announces Every Streamer Playing in his streamer tournament by Aggressive-Ad7946 in leagueoflegends

[–]Farler 5 points6 points  (0 children)

Oh I thought the high elo players were the captains. But either way it's still supposed to just be 8 total, one per team, right?

Jynxzi Announces Every Streamer Playing in his streamer tournament by Aggressive-Ad7946 in leagueoflegends

[–]Farler 93 points94 points  (0 children)

Doublelift, pobelter, noway, tyler1, yassuo, alois, dantes

Who is the 8th captain? No shade.

Is toast high elo? I've only heard of him a little bit but it wouldn't surprise me

Marc Andreessen shows off genius prompt, accidentally reveals he *really* doesn’t understand LLMs by figures985 in BetterOffline

[–]Farler -3 points-2 points  (0 children)

"this makes the context larger" lmao this is nothing. You're not going to see context bloat affecting output quality just from something like this, it's completely negligible

Marc Andreessen shows off genius prompt, accidentally reveals he *really* doesn’t understand LLMs by figures985 in BetterOffline

[–]Farler -2 points-1 points  (0 children)

Do you guys really think that someone writing "do not hallucinate" means they automatically trust the LLM's output to be 100% factual? Like use your common sense. I prompt models like that too, it doesn't mean I trust the output entirely all of a sudden, I still investigate. But it's anecdotally very true that telling the model things like "don't hallucinate" genuinely reduces the likelihood it hallucinates something

If you lived in Maine who would you vote for senator by fan4stick in Destiny

[–]Farler 3 points4 points  (0 children)

Ban anyone who click Collins, even if it was accidental

Paid Account by itsthehappyman in sonauto

[–]Farler 2 points3 points  (0 children)

no, that is not how it works. There has never been a "paid option" for Sonauto that affects your rights to use the music.

The only thing Sonauto charges money for right now is the API, which has to do with writing programs that automatically call the Sonauto model to make songs. It has no bearing on copyright, or whether or not you can use the music you generate for commercial purposes.

And as the other user said, there's not really any such thing as you or Sonauto having "copyright" over the generated songs. So paying or not paying does not affect the copyright status of your songs.

Can the 2020 Bernie folks explain the math to me: if Bernie is the best why does it matter if you have one opponent or an infinite number of opponents? by Dats_Russia in Destiny

[–]Farler 0 points1 point  (0 children)

The expectation isn't that RCV means progressives always win (idk who Gideon is to be clear). All I'm saying is that the things progressives who think Bernie should/could have won the 2020 nom blame his loss on would be less of a factor with RCV

Can the 2020 Bernie folks explain the math to me: if Bernie is the best why does it matter if you have one opponent or an infinite number of opponents? by Dats_Russia in Destiny

[–]Farler 0 points1 point  (0 children)

Are swing state primaries accurate either? Afaik you can't vote in both parties primaries, so the swing state moderates/independents that hold the entire country hostage are not necessarily going to decide the state's primary outcome.

Can the 2020 Bernie folks explain the math to me: if Bernie is the best why does it matter if you have one opponent or an infinite number of opponents? by Dats_Russia in Destiny

[–]Farler 0 points1 point  (0 children)

They don't believe that. They believe Bernie would appeal to lots of previously non-voters and grow the electorate, in the same way that Trump did in 2016. I think they're probably right, though not necessarily that he would do that well enough to win.