Professional Development – 2023 – Week 51

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

.NET

Don’t Use the Wrong LINQ Methods (via Nick Chapsas)

.All() and .TrueForAll() perform differently even though they yield the same behavior. The .All() method is slower and allocates memory because it uses a foreach loop, which requires using an iterator; .TrueForAll() uses a for loop and indexes into the list.

The New Data Protection Features of .NET 8 (GDPR) (via Nick Chapsas)

  • The Microsoft.Extensions.Telemetry NuGet package gives you the ability to create extension methods for logging certain things.
  • Sensitive data (e.g., PII) needs to be sanitized or obscured before being logged. Serilog has had this ability for some time, but not the built-in logging for .NET.
  • The Microsoft.Extensions.Compliance.Redaction NuGet package helps here. You can specify your data taxonomy (e.g., PII, sensitive). There’s an ErasingRedactor to not show anything, and a HmacRedactor that will show the hash of the data (be sure to store the key in a secrets manager). You can also make your own redactors.

Leadership

How to Get the Honest Input You Need from Your Employees (via HBR)

  • Choose curiosity over certainty
  • Make employees feel safe in sharing
  • Pose quality questions (i.e., those that help you learn something important from another person)
  • Listen not only for content, but for emotion and action
  • Reflect on the feedback given, and reconnect with the person who shared it with you once you’ve made progress, decided on actions, etc.