David Fowler Profile picture
Distinguished Engineer at Microsoft on .NET, Creator of NuGet, SignalR, https://t.co/PiydKAsC8g Core and Barbadian 🇧🇧, Tennis Player, Father, other half @symonefowler
5 subscribers
Oct 10 4 tweets 1 min read
Shiny!

#dotnet #aspire Image Yes, it supports .NET 8 (LTS) and 9 Image
Oct 1 11 tweets 5 min read
Aspire 9 upcoming features 🧵:

First, you'll be able to use Aspire 9 with .NET 8 and .NET 9! It will no longer require a call to dotnet workload install, and instead uses an MSBuild SDK. This should simplify CI/CD integration and getting started immensely! All you need is NuGet!

#dotnet #aspireImage Next is the first-class addition of "WaitFor". You can now wait for dependencies to start, be healthy or to be complete before running your resource.

This is much like "depends_on" in docker compose, but with the ability to write health checks in C#. Image
Apr 28 4 tweets 1 min read
A customer mentioned trying to use default interface implementations to do "mixin" style programming in C# and it totally nerd sniped me. 🤔

#dotnet #csharp Image Here's the sample: Image
Jul 11, 2023 22 tweets 7 min read
Here's some code that is on the hot path on your application and you want to optimize it. This is what a typical C# developer would write (actually copilot wrote this). It's pretty clear, but suboptimal. How could you go about improving it? #dotnet #csharp There are lots of allocations here:
1. The string[] splitting up query string parts by &
2. Each key value pair string[] splitting each part by =
3. The List<string> of new results
4. The final string
Dec 31, 2022 6 tweets 2 min read
Discrete events masquerading as a workflow should be expressed as such. Consider the following event-based model: #dotnet The game has 3 events:
- GameStarted
- GameEnded
- OnQuestion

The order of execution should be obvious from the naming...
Dec 31, 2022 9 tweets 3 min read
Currently designing how this trivia game will work on multiple servers. I have 3 architectures in mind (Twitter can help me pick one, but I have a preferred one). Both clients are part of the same game. Games are ephemeral and last a maximum of 2 minutes. Architecture 1 - Using Redis as the game state storage and SignalR backplane.
Dec 17, 2022 9 tweets 2 min read
It's Friday so time for spicy opinions. Every single sample ASP.NET Core project I see uses CQRS and the mediator pattern or CLEAN architecture. I'm over the over engineering 🙃. #dotnet I lean very heavily towards YAGNI and readable code with minimal abstractions until needed. I appreciate that every situation is different, but like anything it's hard to appreciate the benefits when the "scale" problem isn't evident.
Dec 11, 2022 4 tweets 2 min read
Another cool tye feature is networking support between containers and processes on the host. This nginx configuration is referring the process running on the machine by host name "sample" but that application isn't running in a container. It manages all of the tricky ways to communicate between containers and local machine using (host.docker.internal) etc. This lets you run and debug your processes normally and run what needs to run as containers in your inner loop.
Dec 9, 2022 5 tweets 2 min read
Maybe I’ll try having chatgpt3 make code lock free Disappointed. It did a busy wait. Let me see if I can motivate it 😅 Image
Dec 6, 2022 7 tweets 1 min read
Structured logs via the stdout is *NOT* a good idea. Standard out is a single stream, and you should be using it for human readable logs. Push structured logs via another output stream in your application. Modern logging providers can push logs out to various sinks in the "right" target format. Loggers are just serializers at the end of the day. I can produce a log that has with the text "Hello World", that gets packed and shipped differently depending on the consumer.
Oct 20, 2022 17 tweets 6 min read
We're working on making ASP.NET Core and EntityFramework work with trimming and ahead of time compilation (.NET NativeAOT). One of the big challenges is moving away from dynamic runtime code generation. Let's talk about what that means👇🏾 #dotnet #aspnetcore Why do we care about trimming and NativeAOT? Faster startup and smaller output. This is useful for reducing the size of your output, which can be impactful for things like smaller container images.
Sep 22, 2022 4 tweets 2 min read
OK C# coding challenge from today's discussion. This came up today in the context of "async and concurrency is *HARD* even for very experienced developers". I will share some techniques after seeing some answers. #dotnet #csharp First version is using a CancellationToken
Sep 20, 2022 4 tweets 2 min read
Declarative VS imperative, which do you prefer and why? #dotnet #aspnetcore ImageImage What about now? ImageImage
Jul 8, 2022 10 tweets 3 min read
Here’s another “auth is hard in .NET” thread reddit.com/r/dotnet/comme… #dotnet #aspnetcore To help the team contextualize why it is hard outside of the domain itself being hard, it would be great to see some code samples. Samples from other frameworks that are runnable. Most of these threads conflate everything under the auth banner and require 20 questions understand
Jun 27, 2022 5 tweets 1 min read
COVID will be “over” when people stop posting tests results on Twitter. It’s not “normal” or “endemic” yet socially. It feels pretty inevitable at this point, there’s still a guilt associated with having it (you could have spread it unknowingly). It’ll be “like the flu” and “normalized” socially when people stop doing that. So, IMHO Covid isn’t “over” yet…
Jun 27, 2022 11 tweets 3 min read
This thread was good because it helped clarify my thinking. There are 2 phases (for simplicity) where ClaimsPrincipal shows up:
- The authentication flow
- The authorization flow

Claims are typically used to store authentication data. #dotnet #aspnetcore 🧵👇🏾 That data is then used to look up more user information (profile data) usually store in a database/cache. This profile data usually also contains permissions and authorization rules are then run over this user for different types of application "resources".
Jun 26, 2022 4 tweets 2 min read
The oral history of Dave Cutler is a real gem:
Part 1:
Part 2:
Windows NT is a marvel of an operating system and his work has been immensely impactful on the industry at large. I also love that he's an engineer through and through. Some gems:
- Engineers should care *deeply* about the quality of the code they write (he hated when he had bugs assigned to him).
- Coding != Software engineering. They brought strong engineering culture to Microsoft from DEC.
- Go interview elsewhere to know your worth😉.
Jun 15, 2022 5 tweets 2 min read
New feature that came out with minimal APIs in .NET 7 preview 5 (devblogs.microsoft.com/dotnet/asp-net…), the ability to declare parameter list surrogates: #dotnet #aspnetcore You can refactor long argument lists into structs as a "zero cost abstraction". The struct's members will be bound as if they were parameters declared on the method.
Jun 15, 2022 7 tweets 3 min read
Let me take you on my @msftorleans journey. Let's say you wanted to define a class that let callers subscribe to an event C#. It could look like this: #dotnet This implementation uses C# events, but let's be a little more verbose and define the contract for subscribing and unsubscribing callbacks:
Jun 14, 2022 4 tweets 2 min read
I thought this was common knowledge by now, but software engineers at “big tech” and in some of the major tech hubs in the US makes lots of money. I’d encourage you to look at levels.fyi to see the potential earnings at these companies. #techtwitter #BlackTechTwitter That said this is about potential. This site doesn’t show how many people exists at these levels, let alone how many underrepresented people exist at some of these levels.
Jun 12, 2022 4 tweets 2 min read
Weekend tennis, opponent was too good today. Gotta put in more work, tournament season is coming up #tennis Ran down this drop shot 💨