How to Improve Code Quality
Common techniques:
- Remove unused code
- Use better names
- Reduce duplication
- Simplify logic
- Fix bugs
Code quality often improves after these changes.

Common techniques:
Code quality often improves after these changes.

Need to retrieve data from a database?
A typical SQL query consists of these clauses:
SELECT to choose columnsFROM to specify the tableJOIN to combine related tablesWHERE to filter rowsGROUP BY to group resultsHAVING to filter groupsORDER BY to sort dataOFFSET / FETCH or LIMIT to paginateNot every query needs every clause, but this is the structure you'll see in most SQL statements.

Understanding what each clause does makes reading and writing SQL much easier.
Need to run logic for every incoming HTTP request?
Use ASP.NET Core middleware.
Common middleware scenarios:
Middleware executes in the order you register it in the pipeline.
Each middleware can inspect the request, perform work, and pass execution to the next middleware.

Want to protect an API endpoint?

Add the [Authorize] attribute.
Common authorization options:
[Authorize][Authorize(Roles = "Admin")][Authorize(Policy = "EmployeeOnly")][AllowAnonymous] for public endpointsProtected endpoints require authenticated users before your action executes.
Public endpoints without [Authorize] are accessible without authentication.
How do you organize authorization in your APIs?
SpaceX announced the acquisition of Cursor, the popular AI-powered code editor used by millions of developers.

According to sources close to the deal, the acquisition was initiated after Elon Musk noticed Cursor subscription charges appearing on SpaceX expense reports.
"I asked why we're paying Cursor every month," Musk reportedly said. "They explained subscriptions. I asked how much it would cost to stop paying forever."
The acquisition process started shortly afterward.
While analysts discuss strategic benefits, AI capabilities, and developer productivity, insiders claim the business case was much simpler.
"Elon doesn't like recurring payments," said one source familiar with the negotiations. "Paying once felt more efficient."
SpaceX has not disclosed the financial terms of the deal.
When asked whether buying a company to avoid a monthly bill was a reasonable financial decision, Musk reportedly replied:
"Have you seen how much those subscriptions add up over time?"
Cursor will continue operating as usual.
Former subscribers can now enjoy the satisfaction of knowing their monthly payments eventually funded an acquisition designed to eliminate monthly payments. 😄
Consider parallel execution.
Common approaches:
Task.WhenAll()Parallel processing allows multiple operations to run at the same time rather than waiting for each to finish.
For example:
Of course, parallelism isn't free. Databases, external APIs, and infrastructure still have limits.
But if your workload is independent, parallel execution is often one of the simplest ways to increase throughput.
What was the biggest throughput improvement you've achieved?

A NullReferenceException occurs when an object is null.
Possible solutions:
Objects that are not null tend to produce fewer null exceptions.

Microsoft announced Runtime Async in .NET 11, moving much of the async execution machinery from the C# compiler into the CoreCLR runtime.
The company mentioned on Microsoft Build that the change improves performance and simplifies asynchronous execution. It also appears to solve another long-standing problem.

"We noticed many developers use async/await every day, but struggle to explain how async state machines work during interviews."
For years, the C# compiler generated state machines behind every async method. Developers learned terms like MoveNext(), AsyncTaskMethodBuilder, and continuations, often hoping nobody would ask for more details.
With Runtime Async, interviewers are expected to update their question lists.
"State machines were one of our favorite topics," said one anonymous architect. "Now we'll have to return to covariance, contravariance, and memory models."
Microsoft confirmed developers should still understand asynchronous programming concepts.
Queries running slowly?
Consider adding an index.

Indexes help SQL Server:
Not every column needs an index, but columns used in WHERE clauses often benefit from one.
What is your favorite indexing strategy?
Want asynchronous database writes in EF Core?
Use SaveChangesAsync() instead of SaveChanges().

Benefits:
What other EF Core performance tips do you use?