.NET
I Lied! The Fastest C# Loop Is Even Weirder (via Nick Chapsas)
These approaches are unsafe; you should know exactly what you’re doing. From a previous video, for is fastest safe loop. (In .NET 8, for and foreach are equivalent.) A faster (by 1.5x) approach is to use MemoryMarshal, which does pointer arithmetic. The new approach is to get the start and end references of the array and use a while loop to access the data and increment the pointer; the new approach is 1.8x faster. However, you can convert the array to a Span and get just as good results.
Making Entity Framework Core As Fast As Dapper (via Nick Chapsas)
This is a follow-up to a previous video where FirstOrDefault in EF Core was 5x slower than Dapper’s equivalent. You can make a Func that uses EF.CompileAsyncQuery and is a static member. This yields a 3.3x faster approach and uses 40% less memory. When doing a filter, you can also used a compiled query combined with async foreach, which is almost as fast as Dapper. You do pay a little bit of cost for the compilation and memory allocation at startup; also these compiled queries live for the life of your application.
AI
Generative AI Has an Intellectual Property Problem (via HBR)
This article talks about generative AI misusing IP. Although good intent was behind it, this area is following the same play (at least in the US): Get in and let the cat out of the bag before regulations/guidelines are established, then do damage cleanup later (assuming it can be cleaned up at all). The article also talks about vendor contracts having a statement about generative AI as part of risk management.
How to use AI to do practical stuff: A new guide (via Software Lead Weekly)
This post has tips/tricks to use various generative AI tools, where they fall short, and where you can find the most appropriate tool. It also points out antipatterns where people aren’t giving the tool enough context to do what it’s best at. I checked some of the linked articles, which were also helpful. You can use these tools to write stuff, create images, make videos, code, and learn stuff.
Interviewing
Three Steps to Better Interviews (via The Software Mentor)
I’m glad my friend Cameron is blogging again. This article has some tips on getting the answers you need without it sounding like a quiz using scenarios where the candidate would need to understand the concepts to answer well.
Management
Why Managers Should Think More Like Hackers (via HBR)
“Hackers are systems thinkers; they have an attitude that allows them to identify opportunities to make outsized impacts creatively, quickly, and resourcefully. Managers could benefit from thinking more like hackers. Hacking helps us take a step back from the worn-out management tenets of efficiency, long-term planning, hierarchical decision-making, and full information, to adopt instead more adaptable strategies. Adopting a hacker attitude can help managers work around obstacles, find opportunities across siloes, cultivate a culture of pragmatism, mobilize staff around processes instead of end goals, and navigate situations in which there isn’t an obvious answer or clear choice.”
You Need Two Leadership Gears (via HBR)
The two common modes of management involve leading from the front (telling people what to do) and leading from the back (being more “flat” an empowering others). The best leaders understand both modes and understand the situation to choose between them.
Numbers To Know For Managing (Software Teams) (via Software Lead Weekly)
I enjoy seeing rubrics or guides about metrics in the software engineering space. This had a solid list for things at the team and the org level.