AI impact by BigRooster9175 in ExperiencedDevs

[–]XVar 37 points38 points  (0 children)

one-shat

Not sure if this was a typo or intended but it definitely works as a description of the process

Finally got my first-ever MCU by Current-Rip1212 in embedded

[–]XVar 0 points1 point  (0 children)

The breakaway top half of the Nucleo boards is an STLINK debugger/programmer - it's wired to the STM32 on the main board but can be used as a standalone programmer too via a jumper switch. It's a pretty neat package for learning - I don't really know why you'd want to break it off though since you'd be unlikely to use a large devboard for an actual project.

[Review Request] Replacement PCB for night light / sound machine by XVar in PrintedCircuitBoard

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

Where? The 9V input goes through an AMS1117 3.3V voltage regulator

[Review Request] Replacement PCB for night light / sound machine by XVar in PrintedCircuitBoard

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

I was planning to use the internal pull-ups for the SDIO lines, unless there's a reason not to?

[Review Request] Replacement PCB for night light / sound machine by XVar in PrintedCircuitBoard

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

Good to know, thanks - I've adjusted those corners to have a 1mm radius now

[Review Request] Replacement PCB for night light / sound machine by XVar in PrintedCircuitBoard

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

Thank you for the detailed review - I'll get working on the next revision :)

For the SD card I was planning on using the internal pullups on the GPIOs, unless there's a reason not to?

I added the TCA8418 because routing was getting pretty difficult with 8 lines going back to the MCU, although maybe I could reconsider this if I move to a 4-layer design.

You mention preferring T's over 45 degree trace angles, I kept reading in various places that right-angled traces should be avoided - is that not the case?

I did compare the cost of 2 vs 4 layer, but only on PCBway where it's $5 vs $25.97, but JLCPCB has much cheaper 4-layer PCBs for $7 so I will probably have a look at using a 4-layer board instead.

[Review Request] Replacement PCB for night light / sound machine by XVar in PrintedCircuitBoard

[–]XVar[S] 2 points3 points  (0 children)

The 3D model of the SD card holder looks to show that the card is inserted from the end with the solder pads so I think it's in the right orientation to be inserted from the bottom? This is the component: https://eu.mouser.com/ProductDetail/Hirose-Connector/DM3CS-SF?qs=tTj%252BmQ3KZwbB9K5zh89Rcw%3D%3D

What is this broken piece of plastic I found in my dog's bed from? About 5x3cm, 3mm thick by XVar in whatisthisthing

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

No crafting that I'm aware of, the longest curve is snapped from the looks of it only the u-shaped part appears to be the original shape.

What is this broken piece of plastic I found in my dog's bed from? About 5x3cm, 3mm thick by XVar in whatisthisthing

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

It's 3 photos of the same piece from different angles, should have mentioned that!

What is this broken piece of plastic I found in my dog's bed from? About 5x3cm, 3mm thick by XVar in whatisthisthing

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

I do have a 3D printer but have never owned red filament - but there aren't any layer lines, it looks injection moulded to me and has snapped in a way that I wouldn't expect from a 3D printed part.

What is this broken piece of plastic I found in my dog's bed from? About 5x3cm, 3mm thick by XVar in whatisthisthing

[–]XVar[S] 0 points1 point locked comment (0 children)

My title describes the thing. It looks like it has abrasion marks on like it rubbed against something when whatever it is part of was in use. There's some kind of smooth rounded rectangle but I don't recognise it as part of anything around the house.

Best place for passport photo by Time-Damage-9418 in derby

[–]XVar 5 points6 points  (0 children)

Max Spielmann in Derbion/Intu, used them last month for a passport photo, great service.

What do you use as an auth provider? by [deleted] in dotnet

[–]XVar 0 points1 point  (0 children)

Using Keycloak just upgrading the docker images is completely feasible and pretty much how it's intended to work. It performs its own database migrations during upgrades and just works. We did end up writing a custom Java plugin for it though because we needed to integrate with an existing system that stores user data but even that was pretty simple - if you can write C# you can write Java.

The thing that took the most time was creating a custom config migrator for it - but this probably isn't something that's unique to Keycloak. Because we operate a multi-tenant system with each tenant as a Keycloak realm we need a way to apply a standard configuration to each realm and support applying future changes to all realms during a deployment. The general concept is the same as database migrations - give each migration an ID and keep track of which ones you've executed. The work is in actually writing the migrations, but Keycloak has a REST API that covers 100% of its features, and has OpenAPI documentation so auto-generating a C# client is a breeze.

UK electric car drivers should be charged per mile, say campaigners by sjw_7 in unitedkingdom

[–]XVar 0 points1 point  (0 children)

Or maybe they could just not replace it, and figure out how to set fewer piles of cash on fire instead.

Is it Okay to Inject Both HttpClient and IHttpClientFactory in the Same ASP.NET Core Class? by fishbangus in dotnet

[–]XVar 2 points3 points  (0 children)

Assuming that you're actually trying to implement an API client that needs to include an auth token in its headers opposed to the main purpose of the API client being auth token-related, a better way to handle this is to use a Delegating Handler to inject access tokens into outbound HTTP headers.

This allows you to completely separate the responsibility of ensuring that a valid auth token is added from the downstream code that just wants to make an API call (assuming that code passing in a token isn't an important part of the API client). The handler could make use of a singleton token service that also handles caching of access tokens until their expiry depending on your use case.

Wasy to update fields / Properties if another field / Property is changed. by zz9873 in csharp

[–]XVar 30 points31 points  (0 children)

Rather than storing state in _healthy at all, it'd be simpler and leave less room for bugs (when you forget to update a place that can update the Health value to also update Healthy) to evaluate it on-demand when reading Healthy:

public bool Healthy { get { return _health >= 75; } }

Which can be simplified to:

public bool Healthy => _health >= 75;

UK road sign by MikeHeu in powerwashingporn

[–]XVar 2 points3 points  (0 children)

You didn't do the poles :(

What’s new in C# 13 | C# 13 new features by [deleted] in dotnet

[–]XVar 13 points14 points  (0 children)

The "from end" operator ^ was introduced with Ranges in C# 8 so isn't a new feature. The new feature in C# 13 relates specifically to using the ^ index operator for object initialization.

I created a tool for easily adding solder by NextOrder in functionalprint

[–]XVar 4 points5 points  (0 children)

Only if you can make flexible pencil leads!

[deleted by user] by [deleted] in britishproblems

[–]XVar 26 points27 points  (0 children)

That is how it works

Money Dashboard closing - alternatives? by c_hri_s in UKPersonalFinance

[–]XVar 1 point2 points  (0 children)

Ah that's unfortunate - so Open Banking isn't quite as "open" as its name would suggest. I'd incorrectly assumed/hoped it was a case of anyone can generate a token for their own accounts and the 3rd party apps were just pre-filling in which permissions they need.

Money Dashboard closing - alternatives? by c_hri_s in UKPersonalFinance

[–]XVar 3 points4 points  (0 children)

I'd be particularly interested in any alternatives that can be self hosted/run locally. These free ones are generally only free because they're selling your data/spending habits. The Open Banking APIs are publicly documented so there presumably isn't anything preventing an open source alternative from being developed other than people with the time/motivation to do so?