Professional Development – 2023 – Week 43

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

.NET

“Stop Using if else if else In Your Code!” | Code Cop #005 (via Nick Chapsas)

  • The original content creator suggested using the ternary (?:) operator wherever possible. The example was four if/else-if blocks that converted into a very long statement that’s difficult to parse.
  • Typically a switch statement or a switch expression are easier to read.

“Stop Using Structured Logging in .NET!” | Code Cop #006 (via Nick Chapsas)

  • The original author argued that having templatized strings for structured logging was worse than simple string concatenation.
  • An even faster approach is to create a special logging method decorated with the LoggerMessage attribute.

Communication

A simple way to inspire your team (via TED)

Focus on “who is served by the work that we do” is stronger than the “why” of your work. (Pro-social motivation)