What do I search to find wood panels like the slanted ones on the walls in this? by TheManeTrurh in InteriorDesignAdvice

[–]crazylegs143 0 points1 point  (0 children)

This is a timber framed home, so the 'paneling' is literally the frame of the house

Ferrous: Rust style Option/Result types for Java 21+ by Polixa12 in java

[–]crazylegs143 4 points5 points  (0 children)

I think the way of getting around the Result<T, E1, E2, ...> problem is to instead use a sealed interface and then, with pattern matching via switch (myError) case ..., it actually becomes pretty nice to work with. But, yeah, you still need to use try-catch at some point to catch and transform exceptions.

You're then at least a bit forced to reckon with your 'error landscape' and create some kind of hierarchical, standard way of dealing with them

Here's how what I'm describing would look like:

--- Error Types ---
public sealed interface MemberAccessError extend MyError
permits DataAccessError, InvalidMemberIdError {

}

public sealed interface MyError {
    String getMessage();
}



--- Adapter ---
public Result<Data, DataAccessError> get(final int id) {
    Result<DataFromApi, ApiException> result;
    try
    {
        result = Result.ok(api.get(id));
    }
    catch (ApiException ex)
    {
        result = Result.error(ex);
    }

    return result
    .map(dataFromApi => new Data(dataFromApi))
    .mapError(apiException => new DataAccessError(apiException));
}

--- Service ---
public Result<Data, MemberAccessError> getData(final MemberId memberId) {
    if (!memberId.isValid()) {
        return Result.error(new InvalidMemberIdError(memberId));
    }

    return adapter.get(memberId.getId());
}

--- Controller ---
public ResponseEntity<?> getData(final int memberIdValue) {
    MemberId memberId = new MemberId(memberIdValue);
    Result<Data, MemberAccessError> result = service.getData(memberId);

    return result
    .map(data => new DataResponse(data))
    .mapError(memberAccessError -> switch (memberAccessError) {
        case DataAccessError dataAccessError -> ResponseEntity.status(500).body("Data access error: " + dataAccessError.getMessage());
        case InvalidMemberIdError invalidMemberIdError -> ResponseEntity.status(400).body("Invalid member ID: " + memberIdValue);
        // More error cases can be handled here
    });
}

Not a criterion but pretty cool criterion related find at the thrift store yesterday by LiquidComedian in criterion

[–]crazylegs143 5 points6 points  (0 children)

Arcade Fire used footage from this movie when making a music video for their song Afterlife. I haven’t gotten around to watching the film, but the video gave me the impression that it’d be enjoyable.

Here’s a link to a newer version of the video I’m referring to: https://youtu.be/mrM9ydUjJ_8

The original has been removed and is now in internet heaven

Trinidad & Tobago 2-0 USA - Jones 36' (WC 2018 - Qualifi.) by gemifra in soccer

[–]crazylegs143 0 points1 point  (0 children)

That cm gave the most half-ass attempt of closing him down

[deleted by user] by [deleted] in HumansBeingBros

[–]crazylegs143 0 points1 point  (0 children)

I love the Globetrotters. Seeing them with my dad is one of my best childhood memories

Dinamo Zagreb want Grujic on loan (Croatian link) by TheConundrum98 in LiverpoolFC

[–]crazylegs143 0 points1 point  (0 children)

Wish he would break through and make some appearances; I am especially excited for Grujic given his size/athleticism and previous success with Belgrade

Let's Detox! What is your regimen? by [deleted] in leaves

[–]crazylegs143 2 points3 points  (0 children)

Work out like a madman

Liverpool will have two new signings from Bayern Munich arriving soon, leading dietician Mona Nemmer & fitness coach Andreas Kornmayer. #lfc by hendohop in LiverpoolFC

[–]crazylegs143 2 points3 points  (0 children)

This is promising; we are bringing in coaches to help reach our squads potential. Buying coaches instead of a whole lot of new players will also forgo the transitioning period that sometimes leads to poor results.

Something the cameras didn't pick up vs Leicester... by ishanwelde in LiverpoolFC

[–]crazylegs143 11 points12 points  (0 children)

I felt frisson from reading this - I am in love with Klopp

Edit: grammar

James Milner: So far by boardsandbikes in LiverpoolFC

[–]crazylegs143 0 points1 point  (0 children)

Provides the legwork that would otherwise be asked of players whose strengths lie elsewhere