.NET
The Best .NET Mapper to Use in 2023 (via Nick Chapsas)
- Items tested: AutoMapper, Mapster, Riok.Mapperly, TinyMapper
- Most mappers work on reflection or expressions, which make for some heavy lifting during runtime.
- Mapperly does some code generation behind the scenes, so if there are errors it will fail the build.
- Mapperly was about 7 times faster than AutoMapper.
The Problem with Time that .NET 8 Finally Fixed (via Nick Chapsas)
- DateTime.Now is problematic when it comes to unit testing.
- There is a new abstract class TimeProvider that allows you to do things like TimeProvider.System.UtcNow. You can now register TimeProvider in the IoC container then make the service depend on that type.
- Note that when you mock TimeProvider, you’ll also need to mock TimeProvider.LocalTimeZone.
- TimeProvider also gives a .GetTimestamp() method (along with .GetElapsedTime()). This uses StopWatch behind the scenes.
Culture
Beware a Culture of Busyness (via HBR)
- Busyness has become a status symbol
- Effort justification — the harder you work to achieve something, the more you value it
- Idleness aversion — people will choose to do something that keeps them busy
- Customer equate effort with worth
- To reverse course…
- Reward output, not just activity. (Note the “just” in there. If you reward output only, people maximize that and can cut corners.)
- Assess whether your org is generating deep work and eliminating low-value work.
- Force people off the clock. Surveys show most US workers don’t take all their PTO, and often work on vacation.
- Model the right behavior.
- Build slack into the system, as that makes it more resilient. Examples: more time/money/space/people/equipment, reallocation of existing resources, ability to deviate from the standard operating procedures, human redundancy.
How to Tell If a Potential Employer Has a Burnout Culture (via HBR)
This article has multiple questions for the following categories: lack of autonomy, lack of fairness, unsustainable workload, lack of reward, lack of community support, and misaligned values.
Learning
Don’t Learn the Wrong Lessons from Failure (via HBR)
- Don’t only look at why failures are failures; also look why successes happened.
- “…good outcomes aren’t necessarily born from good processes.” Your successes may be due to cutting corners for short-term wins.
Machine Learning
A Framework for Picking the Right Generative AI Project (via HBR)
This space is gaining significant attention from many fronts. Many companies are trying to figure out how to leverage it, my own included. This article breaks down the risk/demand matrix for certain kinds of problems companies are trying to solve.