.NET
The Awesome New C# 12 Array You’ll Never Use (via Nick Chapsas)
- It’s very unlikely you’ll create inline arrays, because Microsoft put this in the language as something they needed.
- [InlineArray(size)] above a public struct; then declare a private field in the struct. This is stack allocated.
- This is a fixed-size buffer, and this is being put in place to interface with unmanaged APIs.
6 C# Mistakes Microsoft Wants You to Fix (via Nick Chapsas)
- Method input variables can be marked with [ConstantExpected]. You can also set min and max values. (Performance improvement)
- Use .Length != 0 or .Count != 0 for enumerable things instead of .Any(). (Performance improvement)
- Instantiate constant arrays as a static readonly class field instead of within the method. (Memory performance)
- .NET 8 has helper methods like ArgumentNullException.ThrowIfNull(…). (Readability)
- (Difficult to describe way of dealing with inherited objects for compiler optimization)
- The analyzer looks for usages of OfType<T>(..) and Cast<T>() that will always be empty or throw an exception.
Culture
Is Remote Work Better Than Being in the Office? It’s Complicated. (via TED)
The presenter makes a good point that there is no perfect solution here (“one size fits none”). He also states that COVID lockdowns proved some could work remotely, but this ignores the cultural aspect that everyone was in survival mode. Being in person or remote is neither good nor bad — it’s different. For example, there are advantages of not having a commute, however some used their commute to listen to audiobooks. It’s not just about the ability to work remote, but about delivering to stakeholders, attracting/retaining talent, and maintaining the culture.
Leadership
Don’t Eliminate Your Middle Managers (via HBR)
- It’s a standard cost-cutting play to eliminate middle managers; however, they are the bridge between individual contributors and senior leaders.
- Middle managers help attract and retain talent for what today’s employees want/need especially when it comes to inclusion and psychological safety.
- They are better equipped to provide continual coaching and address performance issues.
- They help connect employees to company goals by understanding what each employee values, then connecting that to the bigger picture.
- Leaders must prioritize trust over bureaucracy and discard the popular “player-coach” model that has managers balancing two jobs instead of focusing on one.
Self Management
How Taking a Vacation Improves Your Well-Being (via HBR)
“The bottom line is that employees will benefit mentally, physically, and spiritually from vacation. Employers will benefit as well. And making sure your people regularly take time off is key to creating a more sustainable workplace with healthier, happier employees.” The article links to the specific benefits and the studies done to measure them.