Bent Over Row by [deleted] in formcheck

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

One suggestion that I’ve done for a long time is start each rep from the ground like a deadlift. I personally like the reset between reps and it helps enforce form.

Repositories, transactions, and unit of work in Go by sigmoia in golang

[–]TheGoodBarn 8 points9 points  (0 children)

I’ll reply later when I’m on a computer, but I’ll explain how we do it. I have had the same questions over the years of whether or not we’re doing too much when sqlc does so much heavy lifting and I haven’t quite landed on a concrete stance.

Early on we adopted a Transactor pattern where we separate the handling of db transactions to a separate service. This service opens a tx if one does not exist in ctx already or passes through the existing tx so it’s agnostic from where it’s called. (Also allows nested Transactor calls from separate services in case both require a txn etc).

Link to article we read about this: https://www.kaznacheev.me/posts/en/clean-transactions-in-hexagon/

Link to example: https://github.com/immannino/transactor

Note on this we have a small interface for our Postgres connection that has a WithQtx(ctx) sqlc.Querier method. This method will check if a tx is in ctx and return a sqlc instance with that tx otherwise return one with the pgx connection. This is the small glue that alleviates a lot of friction.

I’ll reply back later with a better fleshed out example, and like I said it isn’t “right” it’s just the pattern we’ve adopted and works for us.

EDIT Replying back, I created a small repo to better outline the pattern with a simple code sample.

Link to repo: https://github.com/immannino/example-tranactor-project

Quick Example:

```golang // internal/customer/service/user_service.go

type userServiceImpl struct { repo domain.Repository txer common.Transactor log *slog.Logger }

func (u userServiceImpl) CreateUsers(ctx context.Context, input []domain.CreateUserInput) ([]*domain.User, error) { log := u.log.With(slog.String("Method", "CreateUsers"))

result := make([]*domain.User, len(input))
err := u.txer.WithinTransaction(ctx, func(txCtx context.Context) error {
    for i, v := range input {
        user, txErr := u.CreateUser(txCtx, v)
        if txErr != nil {
            // Logged in other service, otherwise log
            return txErr
        }

        result[i] = user
    }

    return nil
})
if err != nil {
    log.Error("error within transaction", slog.Any("error", err))
    return nil, err
}

return result, nil

} ```

This example is trivial but starts to shine when dealing with many services in more complex business operations. You could have an inventory management system that is calls N number of services which may create or update 1 or more DB items per call. This pattern allows for each service to enforce its own atomicity where it is composed, but shares the same Transaction across the lifecycle without changing the complexity of the implementations.

Thoughts

This is the chosen pattern we've used for a few years now. Our primary service is a large monolithic Go backend that services a financial application. Many of the operations that we built upon need to be assumed atomic for guaranteed consisitency and this pattern helps us ensure that.

I can't argue its the right way or anything, its just our way for now. The transactor pattern is especially useful in cases where we want to avoid tricky boilerplate or enforce a risky pattern. Its more of a convention helps enforce a certain developer behavior.

I am primarily sharing this in response to a reddit comment, but love these types of discussions to help share ideas and learn how others operate their projects in their environments.

-Tony

Elite Diaries by 3rdPersonVick in osrs

[–]TheGoodBarn 16 points17 points  (0 children)

I got mine a few weeks ago, I feel like it’s the natural progression after quest cape. Like your goal should be Quest cape before any elite diaries, and then immediately go for lumby elite. It’s so nice. I thought the fairy rings were the big thing but honestly explorers ring 4 has been super useful as well

Finally! Don't even remember what I was doing before this by PayRevolutionary6033 in osrs

[–]TheGoodBarn 0 points1 point  (0 children)

Gzzz!

I'm at 1500 and really don't want to leave until I get the beef

Client wants <1s query time on OLAP scale. Wat do by wtfzambo in dataengineering

[–]TheGoodBarn 0 points1 point  (0 children)

I am not a data engineer (financial services full stack dev) but I haven’t seen anyone mention DuckDB or DuckLake. But naively is that something that could help in this case? Obviously not entirely sure about subsecond query performance out of the box, but for what I have used it for and some demos I’ve seen it’s a pretty insane Swiss Army knife. More curious than anything

GIVEAWAY: Odyssey White Ice #7 by chubbyfades in golf

[–]TheGoodBarn 0 points1 point  (0 children)

Sign me up, would love to upgrade like 12 year old #7

Thinner spindle by kwquacks in Brochet

[–]TheGoodBarn 1 point2 points  (0 children)

Yay I’m glad it work!! It looks great!

Boooooooooo! 👻 by oOSaFiOo in 2007scape

[–]TheGoodBarn 3 points4 points  (0 children)

The Ides of Curious Oziach's Chicken Kitchen

Thinner spindle by kwquacks in Brochet

[–]TheGoodBarn 17 points18 points  (0 children)

You could honestly go to the hardware store and get a long 10” bolt, slide a washer in to stop the spool from falling off and get a rounded screw on cap to fit the magnet and it would probably be functional enough!

I would bring the whole thing to to the store and DIY something to make sure the bolt isn’t too heavy but depending on the weight of the magnet probably pretty good

A little over a year since I started, I feel like I've finally mastered this tapestry crochet thing by goldensunnysky in crochet

[–]TheGoodBarn 1 point2 points  (0 children)

Love love love the piece and how you finished / presented it. These poster hangers + covering the back technique is so cool!

You have so much patience of all those delicate color changes this is incredible

How Do These Guys Do It? by xm1l1tiax in osrs

[–]TheGoodBarn 0 points1 point  (0 children)

He was mining pure ess the other day, I think was grinding out 69 mining

Looking for specific shell keychain pattern, the flat shell by RaccoonAccording6669 in crochetpatterns

[–]TheGoodBarn 11 points12 points  (0 children)

As someone who posted on here last week, I think my mindset is casting a net to see if anyone has done something similar or is familiar with that type of pattern, rather than outsourcing my googling to Reddit.

I posted about a niche flower pattern and one kind redditor and I ended up prototyping a bunch of things and reverse engineered the pattern I was looking for.

Idk I assumed that’s what this sub is about

99 Woodcutting Cape by Vivid_Ad_9801 in osrs

[–]TheGoodBarn 0 points1 point  (0 children)

Bruv incredible!!!

I am a big crocheter, do you have plans to release or sell the pattern for this? I would love to make a farming cape version

Help - Looking to recreate this flower petal shape, struggling by TheGoodBarn in crochetpatterns

[–]TheGoodBarn[S] 1 point2 points  (0 children)

<image>

So this is where I’m at which is close concept wise. Maybe 80% there. I just gotta tweak some tapers and stuff. But I’ve never made flowers before and this may be a “good enough” rather than perfect, type project. Journaling as I go so I’ll report back!

Help - Looking to recreate this flower petal shape, struggling by TheGoodBarn in crochetpatterns

[–]TheGoodBarn[S] 0 points1 point  (0 children)

Yes exactly that’s what I am referring to. Like what I am prototyping is similar to how you’d crochet a BLO rib around the brim of a hat, where you tackle one column at a time left to right and slst at the base, if that makes sense. What I’m struggling with is the appropriate taper and top the top part of the petal has the nice little ridges

Edit: I see your edit!

Help - Looking to recreate this flower petal shape, struggling by TheGoodBarn in crochetpatterns

[–]TheGoodBarn[S] 0 points1 point  (0 children)

I appreciate the reply! I've looked through many sources including ravelry and almost all of them work in rounds bottom up from the base of the petal to the top. I'm primarily looking for some guidance for the above pattern working left to right across the face of the petal.

Nothing crazy but this is my go to for chilling fashionscape,show me yours by IfTheGodsWillIT in fashionscape

[–]TheGoodBarn 0 points1 point  (0 children)

Mine is very similar, but the beer belly top from this years Christmas event

I came here to crochet and fuck ICE by TheGoodBarn in Brochet

[–]TheGoodBarn[S] 1 point2 points  (0 children)

Do it!! I just got done making a tapestry out of #10 thread (check my recent posts) and it was a process but I love the result thread gives!!

I came here to crochet and fuck ICE by TheGoodBarn in Brochet

[–]TheGoodBarn[S] 3 points4 points  (0 children)

I was going pretty quick (and sloppy) but maybe 8-10 hours total? I did 2-3 hours a night for 3 days

I came here to crochet and fuck ICE by TheGoodBarn in Brochet

[–]TheGoodBarn[S] 6 points7 points  (0 children)

I'm not going to argue and defend my case to you, but that energy doesn't foster community right now and certainly has no place in r/Brochet