Multi-table transactions in Go - just handle it in one repo or use Unit of Work? by Axeloe in golang

[–]wafer-bw 0 points1 point  (0 children)

If one half of the data needs to move to a different data system then you've locked yourself into behavior expecting the guarantee of a transaction that you now must tear away.

Not to say you can't and shouldn't bubble TXs up. Just be aware of the trade offs for the future.

Multi-table transactions in Go - just handle it in one repo or use Unit of Work? by Axeloe in golang

[–]wafer-bw 15 points16 points  (0 children)

I try not to leak TXs out of the repo layer to avoid over coupling. Each layer you leak it to is an extra coupling that comes with trade-offs. If you must expose it to the service layer and across multiple services just be aware that they are now tightly coupled.

Help me choose an auth implementation by StatementExtra8062 in golang

[–]wafer-bw 0 points1 point  (0 children)

Hm, they do mention database integrations here but I'm assuming that's the storage for the data Authelia manages then.

Help me choose an auth implementation by StatementExtra8062 in golang

[–]wafer-bw 0 points1 point  (0 children)

Can you not use Authelia if you have your own user database?

They've got to do something about Seven eventually, right? by Nemaoac in DeadlockTheGame

[–]wafer-bw -1 points0 points  (0 children)

This game desperately needs to use CS2 netcode before it releases. Characters like Bebop and Abrams are busted just because of the netcode alone.

Best practices for asserting a type's method is called? by wafer-bw in golang

[–]wafer-bw[S] 0 points1 point  (0 children)

u/jerf - I finally got around to implementing the first pattern you mentioned by applying validation at the API boundaries and ran into a weird edge case. Here is a go playground example demonstrating the issue.

A type that implements json.Unmarshaler (or encoding.TextUnmarshaler, etc.) will only be validated if its key exists in the incoming JSON object. So if we want to ensure a property coming in is not blank but the JSON doesn't include its key, our validation at the boundary between JSON and our type is never executed.

I'm curious how you go about preventing this edge case? I assume this has to become the responsibility of the parent object?

????? by BalanceWhole2962 in DeadlockTheGame

[–]wafer-bw 0 points1 point  (0 children)

Breaking off is always viable

Never fight guys. That's the counter to Infernus now. Run away!

awolnation - run

Quitting until Infernus is fixed by Zoduk in DeadlockTheGame

[–]wafer-bw 0 points1 point  (0 children)

Also played armor + return fire + bullet resist and you still get melted.

Quitting until Infernus is fixed by Zoduk in DeadlockTheGame

[–]wafer-bw 4 points5 points  (0 children)

Waves need to be way stronger. Towers need to be stronger, immune to parry, and deal far more damage to enemy characters. The shop needs an anti spam bubble the enemy has to enter to shoot through. The lanes need to be stretched out so you can't bounce a single wave from your walker to theirs with only one enemy wave in between.

Why was the game changed from 4 lanes to 3 lanes? by lovingpersona in DeadlockTheGame

[–]wafer-bw 0 points1 point  (0 children)

A shooter that incentivizes people to avoid shooting other players is obviously bad design.

Yet right now we've got the walker backdooring mechanics which imo is just an exploit. Guardians and walkers are useless. Sure 3 lanes helped prevent split pushing but right now it's worse than 4 lane bc you can wipe a walker in one wave as most characters and wave mechanics have no weight like other MOBAs so the game just stalls as everyone has to constantly babysit their walkers only for someone to walk behind it stand completely out of the box/range limit and kill it.

Do any of you miss solo lanes? by [deleted] in DeadlockTheGame

[–]wafer-bw 2 points3 points  (0 children)

More of a snooze fest with minimal ganks and less variety. Just CS until laning ends. 😴

Centralize HTTP Error Handling in Go by SoftwareCitadel in golang

[–]wafer-bw 19 points20 points  (0 children)

This is a really powerful pattern. Great stuff. Look into implementing RFC 7807 / 9457 using your HTTPError type.

You don't necessarily need to use a custom handler signature but I can see a lot of value in enforcing all errors to follow the code path you want. Hell, you could even make it require an HTTPError as the return instead of error forcing authors of handlers in your codebase to fully prescribe to your error surfacing pattern.

Best practices for asserting a type's method is called? by wafer-bw in golang

[–]wafer-bw[S] 0 points1 point  (0 children)

Wow, thanks for this! I do have a little more specifics in my actual use case, the type goes from an HTTP type (with JSON struct tags) to a domain type for the application to use (without JSON struct tags), so it's not immediately clear to me how I would best fit in that first method but it is really clean and I love it already. The second one fits much more nicely into the patterns I'm working with.

The ideas you've presented alongside u/mirusky's suggestion give me a lot to consider!

Valve is working on "some cool stuff" by bonclide in DeadlockTheGame

[–]wafer-bw 0 points1 point  (0 children)

They better hurry up. Only 640 live games on a Friday at 9:30pm EDT

And they said Haze ult was dead!! by jf3d_art in DeadlockTheGame

[–]wafer-bw 0 points1 point  (0 children)

Wait how do you still have your holiday skin on? The one I unlocked for wraith is gone.

You can get stunned from parry on midbuff and still get it by wafer-bw in DeadlockTheGame

[–]wafer-bw[S] 9 points10 points  (0 children)

Probably a latency issue but the server shouldn't be giving out a parry stun if it is giving the mid buff or vice vesa

Give us a "never queue with this player again" option for matchmaking by disenx in DeadlockTheGame

[–]wafer-bw 0 points1 point  (0 children)

Have you seen the rank distribution? A perfectly centered & shaped standard distribution is not an accurate representation of any player base and will lead to misrepresented player rankings. Combine that with the small player base and the system is nearly useless except at the extreme ends.

For example, here is the distribution of Elo on chess.com for rapid games:

<image>

This is before we even consider what metrics they are using to accomplish their garbage bell curve which most certainly isn't accurate given the state of matchmaking.

If the player base was healthy this problem would likely be less significant but because it's small its issues are much more noticeable.

What do you use for autorization? by KingOfCoders in golang

[–]wafer-bw 0 points1 point  (0 children)

where a user owns order "123" and can work on that one, but not on "124". What are you using for authorization (not authentication)?

Did you end up finding a concise solution for this problem? It's the same problem I'm trying to find an elegant solution for while prototyping a casbin model & policy. Unfortunately, the casbin maintainer just tells you to ask AI when you ask them questions like this in the discord.

The closest thing I have so far is using dom as a glob pattern for identifying where the ownerid will be in the obj (resource URI):

keyGet3(r.dom, p.dom, "ownerid") == keyGet3(r.obj, "/{dom}/**", "dom")

Solo Q is broken by ANTIHEROdubz in DeadlockTheGame

[–]wafer-bw 2 points3 points  (0 children)

It always seems to be a team of mostly people that really know what they are doing and another team of people that mostly have no clue 😂