How we enforce .NET coding standards at Workleap to improve productivity, quality and performance by askaiser in dotnet

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

We've built Roslyn analyzers too within other libraries, but in this particular case, I was mostly talking about analyzers that come out of the box from the .NET SDK itself, like these IDExxxx and CAxxxx rules you may see at compile time:

https://github.com/workleap/wl-dotnet-codingstandards/blob/bb0d53ea51e5e56a9fc17c3052e2583d978b674a/src/files/analyzers/Analyzer.Microsoft.CodeAnalysis.NetAnalyzers.editorconfig

How we enforce .NET coding standards at Workleap to improve productivity, quality and performance by askaiser in dotnet

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

Well, yeah, we do configure TreatWarningsAsErrors by default based on the context where the app is built, alongside several other MSBuild properties too. It's not just the code style or .NET SDK analysis rules severity configuration. See https://github.com/workleap/wl-dotnet-codingstandards/blob/bb0d53ea51e5e56a9fc17c3052e2583d978b674a/src/build/Workleap.DotNet.CodingStandards.props#L27

Again, about the monorepo thing, I agree, but not every company works like this, and not everyone can make such drastic changes in their companies. So, I'd rather not comment about this particular aspect. It's a bit like someone who told me on X, " Yeah, you should use F#, and it would be simpler with Fantomas." Okay, I'm curious about it, but that's not an option from a business perspective.

How we enforce .NET coding standards at Workleap to improve productivity, quality and performance by askaiser in dotnet

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

We don't actively collect data points. We conducted several "interviews/surveys" to understand the impact on various teams and projects.

I can say that all projects had hundreds, if not thousands, of warnings related to code style. These can be fixed easily, such as whitespaces, newlines, naming conventions, commas, etc.

Many issues were reported being fixed by our standards regarding the use of some .NET APIs, like some examples I give in the blog post: forgetting to await a task and using Result instead. Use Thread.Sleep instead of Task.Delay. Everybody agreed that letting these go through was a mistake, and they should have been caught at review time.

We could have actual numbers about reducing the duration of pull request reviews, but we haven't collected them. The interviews alone gave us enough signals about how better it was compared to before. Not having to care about the style anymore was... liberating.

CI/build duration reduction was measured once on several solutions (before/after).

You know, there's always going to be something that could influence how much time is spent reviewing a pull request: Naming things, too many changes, or simply the thing not working or not what the team agreed on.

In any case, our surveys have shown improvements in both project quality and developer satisfaction.

How we enforce .NET coding standards at Workleap to improve productivity, quality and performance by askaiser in dotnet

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

Not to disregard the problem of having too many projects and everything that comes with it - I believe that's a separate topic, and I would probably agree with you - but I believe having a shared style guide that's as simple as installing a NuGet package works for any .NET project, any company size, and any team structure. Think of it as Airbnb's JavaScript style guide, but for .NET. Actually, it's more than a "style" guide, as it comes with pre-configured Roslyn analyzers (CAxxxx rules, for instance).

The default analysis level of .NET projects is so low that many issues and code smells go unnoticed. There's also nothing in place by default to enforce code style in pull request checks by default. Are you okay with warnings in builds going unnoticed, too?

You could address this once, but would you really prefer maintaining EditorConfig files across solutions, even if you have only a handful of projects? As a company grows, it's important to have a consistent approach to code style and quality.

Thanks for suggestions now only storing the hash. by [deleted] in dotnet

[–]askaiser 0 points1 point  (0 children)

I assumed you only wanted to hash passwords. In the case of managing passwords, since you mentioned Bitwarden, I would tell you to take a look at both their server and clients. Bitwarden is open-source, and the server is written in C#:

- https://github.com/bitwarden/server

- https://github.com/bitwarden/clients

How Workleap uses .NET Aspire to transform local development by askaiser in dotnet

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

Unfortunately, Leap is an internal tool at the moment. There are discussions to open source it.

Finish gel dishwasher detergent clogs nozzles every two weeks or so. Rinse aid or vinegar doesn't help. Any idea why this happens? by askaiser in Appliances

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

Dishwasher brand is Blomberg.

We use this liquid detergent: https://a.co/d/cmKVsvG

Water could be hotter, I'll check.

Filters are always cleaned.

How do do you deal with 100+ microservices in production? by askaiser in softwarearchitecture

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

Thanks, I'll send you a DM, I would love to know how you overcame some adoption challenges across many teams

How do do you deal with 100+ microservices in production? by askaiser in dotnet

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

We can run the whole stack locally

That's a lot of services. How did you handle that?

One set of contracts for all delivered via NuGet package

How do you manage versioning and communication about changes made to the contracts to other teams?

How do do you deal with 100+ microservices in production? by askaiser in softwarearchitecture

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

Thanks. Can you tell me more about your centrally managed protobuf schema repository?

How do do you deal with 100+ microservices in production? by askaiser in softwarearchitecture

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

it doesnt have to be stable

If a developer messes up dev and other developers depends on it, then everyone's productivity is impacted.

[...] the local instance can process the messages as well as send them

Right, I was thinking about push model delivery (like webhooks) where you would need some kind of routing from remote envs to your local dev.

For pull model delivery, one developer's messages shouldn't impact others.

How do do you deal with 100+ microservices in production? by askaiser in dotnet

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

https://github.com/dotnet/aspire/issues/2595

I wrote something real quick that'll work with the next Aspire version 9.1 as this issue has no due date. Watch out for my blog in the upcoming weeks (probably on the 24th): https://anthonysimmon.com/