.NET
Reviewing Bad LinkedIn C# Advice (via Nick Chapsas)
- One example compared two snippets that accepted a string and returned a string. The last snippet accepted and returned a ReadOnlySpan<char> (which isn’t comparing apples to apples).
- The word as in the base class library means casting to a different type, not creating a new instance. Instead use to because the base class library uses this scheme to create a new object based on the input.
- It’s fine to have an HttpContext as a field, as long as the object containing it is transient or scoped in the DI container.
The Weirdest Bug Your C# Code Has Right Now (via Nick Chapsas)
Comparing arrays involves references by default. You can use IStructuralEquatable and EqualityComparer<object>.Default to compare contents. In the C# code there’s a bug in ValueTuple that skips comparing the fourth item of the tuple. (This is has been fixed, though.)
Interviews
Should you give candidates feedback on their interview performance? (via SWLW)
This post gives some concrete reasons why feedback may not be appropriate. I like his middle ground: “sometimes give feedback, under specific conditions.”
Time off
Stop Overworking After Vacation (via HBR)
- Many people rush back into to working at 100+% when they return from vacation, primarily because they feel guilt about people covering for them or that they’ve fallen behind.
- Periods of rest are essential for us to prevent exhaustion, low motivation, poor performance, and burnout.
- Make plans for your first two days back where you catch up on things.
- Be mindful of saying yes to new requests.
- Review, communicate, and maintain your boundaries.