Professional Development – 2024 – Week 10

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

.NET

“Stop Using Properties in C#, Just Use Fields” | Code Cop #013 (via Nick Chapsas)

  • You can use the init keyword on the setter of a property to make it initializable only. You can also remove the set portion of the property definition and set the value in the constructor.
  • By specifying the properties in the constructor of a record, you can also achieve this. For example public record User(string Name, string Surname, string Email). The compiler turns these into private readonly backing fields.
  • Records also support the with operator: var newUser = someUser with { Name = “John” }
  • Also, if you have everything as a field, common frameworks like EF won’t work.

Managing

3 Ways Humility Can Undermine Your Leadership (via HBR)

As with any management style, too much of something can be a detriment; it’s all about balance. Specifically with humility, you may be perceived as indecisive, you may hinder your career advancement, and you may be limiting your team’s development.