Rick

2.7K posts

Rick banner
Rick

Rick

@rick01

100x (Ch)(D)ad Developer

USA เข้าร่วม Haziran 2013
1.3K กำลังติดตาม1.1K ผู้ติดตาม
Darren Shepherd
Darren Shepherd@ibuildthecloud·
I'm a man of the people, that's why I use windows, to experience the peasant life.
English
3
0
9
866
Rick
Rick@rick01·
@tsoding My typing speed went up significantly when I stopped doing that.
English
0
0
0
629
Тsфdiиg
Тsфdiиg@tsoding·
You don't write code by hands because you use AI. I don't write code by hands because I type with my dick. We are not the same.
English
72
103
1.9K
42.7K
Rick
Rick@rick01·
@Aaronontheweb Fallback and trying to support every use case it’s ever written. Yes, Claude… you are allowed to make breaking changes to the code you JUST wrote. 😂
English
0
0
14
1.2K
Aaron Stannard
Aaron Stannard@Aaronontheweb·
One of the most insidious tics LLMs have when coding is this obsession with adding "fallback" behaviors everywhere These are extremely toxic because they hide real bugs and most importantly, introduce lots of potential privilege escalation vulnerabilities everywhere
English
64
44
1K
53.6K
Rick
Rick@rick01·
@robertmclaws @davidfowl At least we still have the tools to fix it ourselves. ConfigProvider.LoadAsync would be nice tho.
English
0
0
0
228
Robert McLaws
Robert McLaws@robertmclaws·
@davidfowl @rick01 There’s still time to fix it. Just like there’s still time to make ConfigurationProviders async.
English
1
0
2
515
Rick
Rick@rick01·
Confession time: I cannot stand IOptions. The others, I can see... but IOptions solves nothing for me. If you're solving a problem with IOptions it's probably worth solving properly and not using framework 'magic'. I can't be alone on this.
Milan Jovanović@mjovanovictech

Injecting settings in .NET? You have 3 main interfaces to choose from. But picking the wrong one means your app might completely ignore your config changes. Here is the simple breakdown: 1️⃣ IOptions • Read once at startup. • Cached for the entire lifetime of the app. • Perfect for static settings that never change. 2️⃣ IOptionsSnapshot • Re-evaluated on every single request. • Picks up appsettings.json changes without restarting your app. • Perfect for web APIs (Scoped lifetime). 3️⃣ IOptionsMonitor • Real-time updates. • Triggers an event exactly when a setting changes. • Perfect for background services (Singleton lifetime). The Rule of Thumb: Use IOptions for static config. Upgrade to IOptionsSnapshot in web apps. Reach for IOptionsMonitor when you need change notifications in background workers. Want a deeper dive into how the Options Pattern works under the hood? Read my full breakdown here: milanjovanovic.tech/blog/how-to-us… Which of these three do you find yourself using the most? --- Tired of writing the same boilerplate code for every new project? Skip the setup and start building features immediately with my Clean Architecture template: milanjovanovic.tech/templates/clea…

English
8
2
39
20K
Rick
Rick@rick01·
@wdolek You can certainly make it fit. I just think there are better fits. I don’t typically use single config files, and the validation could be useful if you want validation by attribute. Not my style.
English
0
0
0
21
Zdeněk
Zdeněk@wdolek·
@rick01 I'm old enough to remember implementing things over configuration sections and 💩, and I find options better (namely - you don't need to reinvent wheel all the time)
English
1
0
1
33
Rick
Rick@rick01·
@alexyakunin @davidfowl I would stop way short of calling it the worst. .NET has plenty of baggage, but we make it worse by abusing patterns and forgetting that .NET also lets us create whatever we want.
English
0
0
0
243
Alex Yakunin 🇺🇦
Alex Yakunin 🇺🇦@alexyakunin·
@davidfowl @rick01 Sorry, but that's one of the worst inventions in .NET. Especially in k8s age, when your services restart smoothly on way more significant changes than just a configuration related one.
English
2
0
1
355
Rick
Rick@rick01·
@davidfowl Agree. We certainly love our ceremony. This is aimed at the folks who overcomplicate it. I really dig the direction you all, and dotnet have been headed. 👌🏻
English
0
0
2
1.1K
David Fowler
David Fowler@davidfowl·
@rick01 I had a hand in creating this. IOptionsMonitor and IOptions<T> should have been the same thing. People over complicate it, it’s just a factory.
English
5
0
55
7.6K
Rick
Rick@rick01·
@ExtinguishedEng Really? It’s usually the purists that refuse to deviate from IMicrosoft. I see it online and in Enterprise™️ code all the time.
English
0
0
0
336
Rick
Rick@rick01·
There's an ever so slight use-case that I'd concede for library authors that want to opt-in for the validation. Even if I wouldn't use it.
English
0
0
1
37
andi0b
andi0b@andi0b·
@inforhino @rick01 There is a validation pipeline you can use for ioptions. But it's a very lightweight abstraction over configuration and it's also fine to directly read configuration. Configuration handles multiple sources and refreshing.
English
2
0
3
57
Dario Griffo
Dario Griffo@dariogriffo·
Is part the INonsense in dotnet. Solves nothing but allows to mock some sh#t that does not need to be mocked. That validation on startup is as useful as a review mirror on a plane. We use sealed records, register them via convention (all them end with Settings, so we register the section by name - Settings) and that's it. If your app fails at start you have failing processes that you need to fix, not add some crap.
English
1
0
4
603
Rick
Rick@rick01·
@andyboothuk IOptions doesn't fit anywhere for me. I'd rather just use a POCO and register it with DI.
English
0
0
4
638
Andy Booth
Andy Booth@andyboothuk·
@rick01 IOptions doesn’t fit config for immutable environment deployments?
English
1
0
1
637
Darren Shepherd
Darren Shepherd@ibuildthecloud·
I'm trying to build an agent that has access to all my credentials, all the time. I'll give it my 1password account. I want it to do everything.
English
11
0
7
2.3K
Rick
Rick@rick01·
Chuck Norris didn’t write dotnet, but he did use it every time he used a government website.
JSONB@vyrotek

But you used them. A testament to @dotnet's greatness. Despite the government's best attempts, the devs still shipped something and it survived over the years.

English
0
0
4
622
Devin Goble
Devin Goble@devinbgoble·
@rick01 Oh no. There's a motivational speaker.
GIF
English
1
0
1
21
Devin Goble
Devin Goble@devinbgoble·
Oh no. It's company annual meeting day. Why do companies act like this is supposed to be some kind of profound thing, when it's really just a bunch of stuff that could be in an email that I could have AI summarize?
English
1
0
0
65
Rick รีทวีตแล้ว
Greg Price
Greg Price@greg_price11·
I'll always remember Chuck Norris as the man who changed the course of dodgeball history by casting the deciding vote that allowed Average Joes to play in the championship of the Las Vegas International Dodgeball Open where they upset the heavily favored Globo Gym Purple Cobras. RIP. 🙏
English
247
9.1K
84.1K
2.5M