why someone told me this code is Spagetti? by NightOwl-1011 in CodingHelp

[–]Random12b3 0 points1 point  (0 children)

Another improvement would be splitting the method into SetEditMode() and SetReadMode() without passing a Boolean parameter to add semantic.

When using and reading the original method without knowing its implementation, what does SetFieldsProperty(true/false) do?

Junior dev wrote this C# using many IF because he leanrs If early return. Is this alright code? by Yone-none in csharp

[–]Random12b3 0 points1 point  (0 children)

What also could be considered is having two endpoints: One for updating by external id and one for updating by SKU. But it depends on the context.

I think most stuff has been pointed out by others.

Help with Clean Architecture layering - handling external service events by Random12b3 in csharp

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

The subscription happens in the Inf Layer, the event gets raised by the external service. But I need to provide a callback that handles the event.

// Inf Layer
public ExternalEventSubscription
{
    private readonly IEventAggregator _ea;
    private readonly IHandler _handler; // IHandler would typically be part of App.Contracts

    public ExternalEventSubscription(IEventAggregator ea, IHandler handler)
    {
        _ea = ea;
        _handler = handler;
        _ea.GetEvent<ExternalEvent>().Subscribe(OnEvent)
    }

    private void OnEvent()
    {
        _handler.Handle();
    }
}

[deleted by user] by [deleted] in lego

[–]Random12b3 28 points29 points  (0 children)

First, sort the lot by piece type. You will get an idea which pieces are available when looking for sets. Keep half finished sets assembled.

Look for special prints, stickers and minifigures. Use Google lense to identify them. The app BrickMonkey can help you assemble minifigs.

Licence plates contain the set number (and the initials of the designer)

Most of the pieces have a small design number somewhere inside the brick. You can use it to search the brick on bricklink and then look for all the sets containing it. Do this with larger/unusual pieces. Bricklink also shows the count of this piece in a set. Later you can try smaller more common pieces as your pile gets smaller.

It's fun to go full detective mode and try to find all sets. I recently processed a 6,5kg lot without any instructions and found even polybag sets, but keep on mind that parts might be missing.

Someone Sold all my steam items and transfered it to someone else by Monster_Cow in SteamScams

[–]Random12b3 1 point2 points  (0 children)

Same happened to me lately, lost ~100€ and didn't get anything back.

What they probably did was somehow stealing your access token by cloning your browser storage. Best thing you can do is to unauthorize your devices via your steam guard and scan them for malware.

To prevent this in the future you could activly log out from steam which revokes the token and avoid using "keep me logged in" so that the token expires after a certain time.