Professional Development – 2024 – Week 41

Image Credit: https://www.flickr.com/photos/54585499@N04/

.NET

The Alternative to Deleting Data in .NET (via Nick Chapsas)

  • The idea is to soft-delete items by marking them as deleted rather then deleting rows from the DB.
  • There are two columns needed to implement this: bool IsDeleted and DateTime? DeletedAtUtc.
  • Assuming you’re using Entity Framework, you can create a query filter per entity to check for IsDeleted as middleware in OnModelCreating. You can also add .HasIndex(x => x.IsDeleted).HasFilter("IsDeleted = 0") for performance. If for some reason you don’t want this, when using the context you can use .IgnoreQueryFilter().

Should You Use Controllers or Minimal APIs in. NET? (via Nick Chapsas)

  • This video was basically Nick going through comments on a Reddit post that asked whether people use Controllers of minimal APIs. Every instance where people used controllers, he pointed out how they were “wrong,” and that everyone should get on board with minimal APIs.
  • “Controllers are very archaic, and whenever I see controllers, it just screams ‘legacy’ to me.”

Leadership

Stop Ignoring Your High Performers (via HBR)

  • “Instead, managers focus on under-performers who demand immediate intervention. This unbalanced attention is costly, leading to disengagement, frustration, and ultimately, the loss of top talent.”
  • Recognition and appreciation — “They need to know that you see the specific ways in which they’re going above and beyond. “
  • Opportunities for growth and challenge
  • Clear pathways for advancement — make these regular conversations

Productivity

How to Manage – and Avoid – Mental Fatigue (via HBR)

  • Causes of mental fatigue: (1) mental heavy-lifting (complex problems, new skill acquisition, high-stakes decisions), (2) impulse resistance, (3) sustained attention with few/no breaks.
  • Take breaks frequently.
  • Limit intense work to 4 hours per day.
  • Use motivation to push through.