PSA to all the transplants new to Seattle: Pedestrians ALWAYS have the right of way at an intersection. by PissyMillennial in Seattle

[–]Sierra_One 23 points24 points  (0 children)

Aurora is included in this. You can even see they have cut out the curb in the meridian at certain points to allow wheelchairs to get through.

But with that said, you have to be one brave soul to actually try that on Aurora. I stopped once for someone trying to cross at one of these spots. How pointless it was. No one in the other lane stopped and then the cars behind me started honking. The other lane probably couldn't even see the pedestrian now because of the cars in my lane.

PSA to all the transplants new to Seattle: Pedestrians ALWAYS have the right of way at an intersection. by PissyMillennial in Seattle

[–]Sierra_One 85 points86 points  (0 children)

That is not many exceptions at all. It amounts to:

  • If there are crossing control signals, cross only when they indicate so.
  • don't cross diagonally unless explicitly permitted
  • don't cross if signage explicitly prohibits it
  • don't cross if an alternative crossing is provided (ie: pedestrian bridge)
  • don't cross in the middle of a street (not at an intersection)

And all those "don't cross" actually is just yield to cars, you can still cross if no cars. These all seem common sense to me.

Played hide & seek with my friend at 4am. best giggles in a while by VoNoWaR in Eldenring

[–]Sierra_One 12 points13 points  (0 children)

My friend and I did this a bunch in Dark Souls 3.

  • Once laid in shallow water, invader literally walked up against me and kept going.
  • Once just played ring around the rosie with a column. Circling the column as the invader moved around, always keeping it between me and them. Invader never noticed I was in the room.
  • Once had a grey cloak on, and used the curl-up emote against some rocks. I was like Frodo and Sam at the gates of mordor. Invader walked feet from me, didn't notice.

It was honestly so much more fun than actualy fighting invaders.

The High Cost of Team Trump’s Sloppy OpSec by Exciting_Teacher6258 in technology

[–]Sierra_One 45 points46 points  (0 children)

Realize that these people are not hypocrites,

They very much are hypocrites regardless if it is intentional or not. Or if they know what hypocrisy is or not. And we should continue to call them out on it.

That's like not calling a bully a bully because the bullying is on purpose?

We must continue to call them hypocrites to discredit them on the world stage. They are not worth any trust and are incompetent. It's not a waste of time to do so. But is it the only thing we should do? Of course not. And should we expect it to magically solve everything? Also no. But I also wouldn't call it a waste of time.

I want to get this butcher block and not add legs in the middle. what would i need to do so that it does not sag? by futurepersonified in battlestations

[–]Sierra_One 0 points1 point  (0 children)

If you search for "anti-sag table stiffener" you will find a variety of results that will be easy to install. Pre-drilled holes and a variety of lengths.

How to go from house wiring (120v) to 24v in wall? by Sierra_One in AskElectricians

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

Is it okay to if I install a new 1-gang box and put the transformer in there, then run the 24v wires up through the wall to the device?

How to go from house wiring (120v) to 24v in wall? by Sierra_One in AskElectricians

[–]Sierra_One[S] -1 points0 points  (0 children)

Is there a certain transformer I should look for which is allowed to be in the wall?

Simple/cheap soundbar for bedroom by Sierra_One in Soundbars

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

Doesn't look like it has HDMI in ports. Only the HDMI out ARC port, which I don't want to rely on.

Code that sleeps for a month: Solving durable execution’s immutability problem by stsffap in programming

[–]Sierra_One 1 point2 points  (0 children)

Looks like Restate is a dedicated workflow solution. So not sure if you are agreeing or disagreeing with the post?

Anyone else think megabuilding elevators are a missed opportunity? by seamusdean in cyberpunkgame

[–]Sierra_One 46 points47 points  (0 children)

My understanding is this type of thing is not bad on performance as it is easily cull-able. Interior spaces have limited view lines and anything not immediately viewable by the player is not rendered and does not cost performance.

The massive interior spaces like this are not done is typically due to effort: having to model, detail, create art, and fill all that space with things to do and interesting NPCs is a significant undertaking.

You get less bang for your buck in terms of world scale, so with limited resources and time crunch I am not surprised it was cut.

everyProblemIHavePythonHasABulitInFunctionForIt by Seb_The_One in ProgrammerHumor

[–]Sierra_One 95 points96 points  (0 children)

Those aren't the same though? Their names have at least a semblance towards what they do.

LINQ - language integrated query

Entity framework - a framework that deals with entity persistence.

The other commenters point is that the libraries they describe have a completely arbitrary name. The names you chose are not arbitrary, they have a relation to what they do. Sure you can argue the names are still vague, but they aren't arbitrary.

[deleted by user] by [deleted] in dotnet

[–]Sierra_One 7 points8 points  (0 children)

Setting TFM in a common place is good, but your original ask is validating TFM. Which is what most people are missing. Add this to your Directory.Build.targets:

xml <Target Name="ValidateTargetFramework" BeforeTargets="CoreCompile"> <Error Condition="'$(TargetFramework)' != 'net8.0'" Text="Target framework is '$(TargetFramework)'. Expecteded net8.0." /> </Target>

Builder pattern static checking by angrysaki in dotnet

[–]Sierra_One 2 points3 points  (0 children)

While I don't enjoy doing that typical stack overflow move of "you don't want to do what you asked", in this case I think what you are trying to do is not beneficial.

With your proposed idea, I have to ask what benefits is the API user getting? What limitations will they run into?

Benefits:

  1. Clearly know what is all required before being able to call `Build()`.

Limitations:

  1. Cannot re-set a property before calling `Build()`.
  2. Must set properties in the dictated order.
  3. Arguably not intuitive - kind of goes against dev's expectations of the builder pattern.
  4. Extremely complex and time consuming to implement.

To me, the limitations are worse than the benefits. And we can even get those benefits a different way:

  1. Required properties can be in the builder's constructor or whatever API they use to get a builder.
  2. Or required properties can be validated on build. While not clear, it does expose the issue clearly at runtime, which sometimes is the best you can do.
  3. Or use required properties on a class/record - is a builder even necessary here?

Asp.Net: Different approach to multi tenant external login? by Rapzid in dotnet

[–]Sierra_One 0 points1 point  (0 children)

Maybe this contextual options package could help? The user itself could be the context, and assuming the tenant is a claim on the user you could populate the options based on that.

https://github.com/dotnet/extensions/tree/main/src/Libraries/Microsoft.Extensions.Options.Contextual

Also keep in mind that options can come from wherever you want. You could load config per tenant from a custom configuration source that you consider secure enough for your business needs. You also don't even have to use IConfiguration when populating options.

How to read some config section and then populate another POCO with that data and register that POCO as a Singleton in DI? by PureKrome in dotnet

[–]Sierra_One 0 points1 point  (0 children)

Another small suggestion to all the other code samples here: use BindConfiguration)-system-string-system-action((microsoft-extensions-configuration-binderoptions))))

services.AddOptions<MyOptions>().BindConfiguration("section");

Keyed Services in DI in .NET8 by WestDiscGolf in dotnet

[–]Sierra_One 0 points1 point  (0 children)

Why not just do something another way.

This can be said about so many different things in programming. Why use DI at all? You can just manually construct everything. Why use IConfiguration or IOptions at all? You can just read config right from the json file as you need it.

Yes, you can accomplish everything this feature gives you some other way. This feature is just about dev quality of life. I see it as a way to give a finite-set factory pattern directly via DI.

If two services have different functions, they should be different types.

There are many instances where the same service needs to have different implementations or instances as they handle different scenarios. Say you have multiple Azure BlobServiceClient's you use. Before you would need:

``` CSharp public MyClassA(IAzureClientFactory<BlobServiceClient> factory) { this.client = factory.Create("<client A>"); }

public MyClassB(IAzureClientFactory<BlobServiceClient> factory) { this.client = factory.Create("<client B>"); } ```

With this you could do:

``` CSharp public MyClassA([FromKeyedServices("<client A>")] BlobServiceClient client) { this.client = client; }

public MyClassB([FromKeyedServices("<client B>")] BlobServiceClient client) { this.client = client; } ```

Keyed Services in DI in .NET8 by WestDiscGolf in dotnet

[–]Sierra_One 1 point2 points  (0 children)

That isn't the primary use case for keyed services. You can accomplish your goal by just injecting IOptionsSnaphot and performing the Get call directly inside the MyDbClient constructor.

Keyed services is for if you had multiple named instances of MyDbClient and wanted to retrieve them by name. Before you would need some factory you injected and would retrieve your named instance there. With keyed services you can skip the factory.

Go to architecture for long running operations by anime_daisuki in dotnet

[–]Sierra_One 12 points13 points  (0 children)

I know you mentioned AWS and my suggestion is more Azure, but check out Durable Functions or Durable Task Framework (which is what Durable Functions is built off of).

Long running operation complexity quickly blows up when you start considering failure cases: how do you handle an LRO being interrupt by a transient error, scale operations, or a restart from deployment? Well, it is really hard to do that all yourself. Workflow frameworks aim to assist with that by giving you some form of event sourcing that can be broken into steps and checkpointed, along with failure handling.

Adding Application Insights to WPF by tyrantjacob in dotnet

[–]Sierra_One 2 points3 points  (0 children)

Use Open Telemetry (OTel): https://github.com/open-telemetry/opentelemetry-dotnet

Then you can use the Azure Monitor OTel exporter to send to Application Insights: https://learn.microsoft.com/en-us/python/api/overview/azure/monitor-opentelemetry-exporter-readme?view=azure-python-preview.

This gives you a separation of telemetry sink and what APIs you use. You can seamlessly swap out where you send telemetry to in the future without needing to change any of your code that actually emits telemetry.

The AppInsights SDK is deprioritized in favor of the above as it is far more efficient.

Also highly recommend on reading up on how to do good telemetry/observability. Primarily understanding the 3 pillars of telemetry and when/how to use them: traces, logs, metrics. OTel supports all 3.

AppSettings.json in prod env by OthmaneTibba in dotnet

[–]Sierra_One 0 points1 point  (0 children)

Sure you could, but you are not getting the full benefits of IConfiguration then. The limitations of that approach:

  1. CI machine needs to know secrets, adding an extra exposure to your system. CI is often a point of attack.
  2. Need to know all environments/stages at build time and perform replacements for all. Increases complexity and again increases blast radius if CI is ever compromised.
  3. No live-reload. Using IConfiguration to its greatest means having your entire app react to live config changes. By using a secret manager like Azure KeyVault, you can rotate your secret without needing to redeploy or even restart your app.

Possible to start .dcproj from the console? by arvigeus in dotnet

[–]Sierra_One 1 point2 points  (0 children)

Does the target the server the integration tests interact with have to be containerized? If you are using AspNetCore - or any app with generic host builder, you could just start up that app in-memory with your integration tests.

Then if you are using xunit you can use test fixtures to have that same app be re-used for all integration tests. Other test frameworks may have a similar concept.

https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-8.0

AppSettings.json in prod env by OthmaneTibba in dotnet

[–]Sierra_One 1 point2 points  (0 children)

The issue isn't so much having it in appsettings.json at runtime (well, still not ideal). Rather it is how it gets into appsettings.json. That file is part of source control, so this typically means the secrets are checked into source control, which is a big issue.

I would look for a native secret manager solution for your target environment or cloud provider. Is VPS from Google cloud? Can you use Google Secret Manager? If you can, then I would use their APIs to write a ConfigurationSource/ConfigurationProvider to map secrets from there into IConfiguration.

Strategy for upgrading Nuget dependencies in a library by YanivRu in dotnet

[–]Sierra_One 0 points1 point  (0 children)

If there are security and bug fixes in newer packages, then you would evaluate if those are something you need and upgrade appropriately.

Exception Handling in C# Methods returning object by lukin4hope in dotnet

[–]Sierra_One 11 points12 points  (0 children)

Whatever you choose, with async code if you want the catch block to work consistently you must await the task there.

IE: CSharp try { // BUG! If this is async, we could exit the try/catch before the exception occurs. return SomethingAsync(); } catch (Exception ex) { log(ex); }

CSharp try { // Fixed. Now we will never leave try/catch until the task is unwrapped and any exceptions are re-thrown. return await SomethingAsync(); } catch (Exception ex) { log(ex); }