Tuesday, July 14, 2026

The AI Augmented Leader

When does AI come for the leaders?

So much of the focus around the AI discussion has been on what roles and jobs will just be automated out of existence. I keeping seeing comments that it’s coming for leaders and given the upheaval in the industry over jobs that were considered irreplaceable just a few years ago, I can’t help but think it’s now well within the realm of possibility.

Picture of the Terminator

But instead of wondering, "Is AI coming for leadership jobs?", I really want to change the premise and ask, "If AI can handle much of the tedium that managers do today, how should the higher-value work of a leadership role change in response?"

That's a strategic question every executive team should be wrestling with right now.

Question to the reader:
What’s one attribute or skill that will create more value in an AI augmented leader?

How does the role of an AI augmented leader change?

AI-augmented leadership will not simply make existing leaders faster; it will change what organizations value in leadership. As administrative work becomes easier to automate, the differentiator shifts from producing artifacts to setting direction, improving decisions, and creating the conditions for people to do meaningful work.

For decades, organizations may have unintentionally rewarded leaders for activities that consumed time rather than created value. Many leaders became a combination of administrator and decision maker, with status reports, forecasts, documentation, and project plans treated as routine parts of the role. As AI democratizes those activities, it may expose the difference between someone who manages work and someone who creates direction.

That possibility will create some discomfort because it implies career disruption for people whose value has been tied to administration and process ownership. It also creates an opportunity where leaders should have more time to focus on the higher-value work that only people can perform.

The leadership role begins to look more like decision management: ensuring the organization is moving in the right direction, not merely moving faster. As AI accelerates the pace of work, the cost of accelerating toward the wrong objective becomes more significant. This means skills like being able to ensure the correct problems are being solved, managing competing priorities and resultant tradeoffs, and building the necessary culture, become forefront activities in the new AI augmented leadership role.

Question to the reader:
What traits will best support a leader in a more decision-centric role?

What will differentiate exceptional leaders in the post-AI era?

In the previous section, I explored how AI changes the leadership role. Now, let's consider what differentiates exceptional leaders once AI removes much of the management toil.

I would argue that pure leadership traits will get amplified in importance to an organization. Qualities such as Integrity, Judgement, Vision, Communication, Empowerment, and Adaptability will remain as high-value qualities that drive high-performing organizations.

There is something reassuring about that, as the qualities that made leaders effective before AI are the same qualities that can make them exceptional after it. If leaders focus on those core competencies, and AI relieves some of the management toil, they will have more space to lead an AI-enabled workforce.

Let's take at each trait more closely. Specifically, what the trait looks like, how AI can augment it, and what the leader must still own.

Integrity

Trust is built when a leader's actions consistently match their words and actions. Trust is a cornerstone of an effective team. Just look at any military Special Ops team, they operate as a high-trust unit and combined with training is what makes them super effective.

AI can surface when a leader's actions drift from their stated principles or commitments, but only the leader can choose the consistent behaviors that earn and sustain the trust of their team. 

Judgment

The ability to make sound decisions with incomplete information, which is a form of big picture strategic planning. Being able to distinguish between good and bad decisions, and then own that decision, is a form of building trust. It's not about always being right, it's about consistently making decisions that move the organization forward while learning quickly when circumstances change. 

AI can augment judgement through analyzing data, and modeling scenarios, which allows the leader to apply their instinct and experience to make the principled decisions amid uncertainty.

Vision

Visionary leadership involves creating a compelling vision of the future that inspires and motivates others to act toward its realization. Leaders who provide a clear picture of where the organization is going and why, empower the team to get on the same page and act toward the same goals. 

AI can augment vision through drafting strategies, and highlighting trends, which allows the leader to focus on defining purpose and direction and how to align the organization toward the common goals.

Communication

Being able to articulate vision and strategy clearly while inspiring and motivating their team to work towards a common goal, is a crucial skill for an effective leader. But there is a corollary, a leader must also be able to ask great questions which means being a great listener. They need to show that they are curious and ask for ideas, input, feedback, and suggestions. They’re constantly pushing and probing to learn more. 

AI can help leaders tailor messages, summarize feedback, and identify communication gaps, but the leader applies communication by actively listening, asking thoughtful questions, and creating meaningful dialogue that builds the connection and clarity that drive effective communication.

Empowerment

Great leaders create environments where others can succeed. They delegate authority, develop talent, remove obstacles, and encourage ownership rather than micromanagement. Their success is measured by the growth and performance of their teams, not by their own individual contributions. Exceptional leaders push themselves and others to exceed expectations by fostering this growth mindset. 

AI can identify opportunities for delegation, coaching, and skill development, but the leader will apply empowerment by trusting others with meaningful responsibility, removing barriers to success, and creating a culture where people are encouraged to grow beyond their perceived limits.

Adaptability

Business conditions, technologies, and customer expectations continually evolve. Effective leaders remain curious, challenge assumptions, and adjust strategy without losing sight of long-term objectives. Adaptability is especially important during periods of uncertainty and disruption, such as in our current AI driven upheaval.

AI can augment adaptability by rapidly detecting emerging trends, risks, and opportunities. The leader applies adaptability by challenging assumptions, making thoughtful strategic adjustments, and giving people the confidence to navigate change together.

These aren't the only important traits, but they are foundational because they influence leadership direction and effectiveness at a fundamental level. AI can improve how leaders perform their responsibilities, but only leaders determine why they act, what they prioritize, and who they develop.

Conclusion

The leaders who thrive in this next era will not be the ones who simply use AI to do more work faster. They will be the ones who use AI to create more space to support their leadership. As the routine work of management becomes easier to automate, leadership becomes more human, not less. The opportunity is to let AI handle more of the toil so leaders can focus on the work that matters most: setting direction, developing people, and building organizations capable of making better decisions in a faster-moving world.



Friday, April 24, 2020

Benchmarking in .NET

I had a recent chance to code review a hot fix for our platform at work. One particular changeset caught my attention as it had a funny code smell. The method was removed in the final changeset due to a requirements change, but I still wanted to understand the ramifications of that code and see if there was something there. So, let's do some benchmarking...

Using BenchmarkDotNet

I had been introduced to this package last year, and was impressed after using it to profile some new code my team had written. BenchmarkDotNet is an open source profiling framework which allows you to build performance measuring projects into your solutions very easily. You simply add a new project, pull in the NuGet package, and start writing tests. A neat feature of this package is that it allows you to also get memory diagnostics, so you can understand the GC footprint of your code.

Name that Smell

Here is method that piqued my curiosity.


public IList<ResultMessage> CheckLoadFederalStimulusRules(int code, AccountStatusReasonCode reason)
{
    var allowedLockedReasons = new List<accountstatusreasoncode>
    {
        AccountStatusReasonCode.PASSWORD_ATTEMPTS,
        AccountStatusReasonCode.PIN_ATTEMPTS,
        AccountStatusReasonCode.UNLOCK_ATTEMPTS
    };
    var messages = new List<ResultMessage>();
    switch (code)
    {
        case (int)AccountStatusCode.Closed:
        case (int)AccountStatusCode.PermanentlyClosed:
            messages.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Closed));
            break;
        case (int)AccountStatusCode.Locked:
            if (!allowedLockedReasons.Contains(reason))
            {
                messages.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Locked));
            }
            break;
    }
    return messages;
}

This is a really simple method. It creates a list of allowable reasons, and then verifies if the operation is allowed. Knowing that the method will get called a lot, the memory allocations just didn't sit right. So I dig in to see if I can make it faster.

Build the Benchmark Harness

Typically you would want to build this right into your solution, but I use Visual Studio for Mac at home and this solution doesn't play nice without IIS, so I go an alternate route and setup a new .NET Core console app.

public class Program
{
    TestClass test = new TestClass();

    static void Main(string[] args)
    {
        Console.WriteLine(@"Let's test some code!");
        var summary = BenchmarkRunner.Run<Program>();
    }

    [Benchmark]
    [Arguments(0, AccountStatusReasonCode.NONE)]
    [Arguments(0, AccountStatusReasonCode.UNLOCK_ATTEMPTS)]
    [Arguments(1, AccountStatusReasonCode.UNLOCK_ATTEMPTS)]
    [Arguments(1, AccountStatusReasonCode.NONE)]
    [Arguments(3, AccountStatusReasonCode.UNLOCK_ATTEMPTS)]
    [Arguments(3, AccountStatusReasonCode.NONE)]
    public void TestOriginal(int code, AccountStatusReasonCode reason)
    {
        var messages = test.CheckLoadFederalStimulusRules(code, reason);
    }
}

The first thing I do is tear the method out of it's home, throw it into the test harness, and setup a benchmark to exercise the various code paths. The attributes drive the benchmarks and allow the developer to control how any particular method is tested. I wanted each code path evaluated to make sure I get a full idea of how the method behaves. Running the application kicks off the profiling process and dumps the diagnostics out to the console. Since I don't have anything to compare it to, I run through some simple optimizations just to see how much better we can get.

Let's Tune Some Code

I wrote three different versions of the method to get a feel for how each optimization affects the performance. I'll throw the code for all of them at the bottom of the page.

UpdatedCheckLoadFederalStimulusRules
I moved the List<AccountStatusReasonCode> object to a static class variable, so we only instantiate and initialize the list once.

OptimizedCheckLoadFederalStimulusRules
This version was a lot more aggressive. I noticed I could take advantage of the calling class where it treats a null response object as a success condition. Next, I unwound the switch block and turned it into if/then statements.

FinalCheckLoadFederalStimulusRules
This version also uses the null return to prevent creating an empty response list for success conditions. It also happens to be much more readable than the Optimized version above.

Benchmarking & Results

BenchmarkDotNet produces a bunch of statistical analysis graphs and files in the application folder, but I am really just interested in the console output for my purposes. The output breaks down each method and each test case and shows how it performed under load.


The results were actually a bit surprising and show just how expensive memory allocations are. For the fastest path, the final version produced a 91% decrease in runtime with no memory allocations. For the slowest path, we still produced a 26% decrease in runtime, and cut the amount of garbage collection almost in half.

The difference between the Optimized version and the Final version showed that they are almost equivalent, but to have the code be much more readable and maintainable is worth the tiny performance hit in the fastest code paths. For a little more insight into the underlying difference between these two methods, refer to this article on the differences between if and switch at the IL level.

Final Thoughts and Code

This simple exercise just goes to show how small items can eat into the performance of your application, and also how expensive memory allocations are. With just a little more care and attention by the original coder, we could have had a version that performed much better under load. The hope is that you can utilize this package to test the code you are writing and experiment with various constructs to better understand how to optimize your application and identify performance problems before your code hits the field.

Here is the code file in it's final tested form.

using System;
using System.Collections.Generic;
using Serve.Internal.Shared.DataContracts;

namespace Apr2020
{
    public class TestClass
    {
        static List<AccountStatusReasonCode> AllowedLockReasons;

        #region Constructors
        public TestClass()
        {
        }

        static TestClass()
        {
            AllowedLockReasons = new List<AccountStatusReasonCode>
            {
                AccountStatusReasonCode.PASSWORD_ATTEMPTS,
                AccountStatusReasonCode.PIN_ATTEMPTS,
                AccountStatusReasonCode.UNLOCK_ATTEMPTS
            };
        }
        #endregion

        // This is the original version of the method
        public IList<ResultMessage> CheckLoadFederalStimulusRules(int code, AccountStatusReasonCode reason)
        {
            var allowedLockedReasons = new List<AccountStatusReasonCode>
            {
                AccountStatusReasonCode.PASSWORD_ATTEMPTS,
                AccountStatusReasonCode.PIN_ATTEMPTS,
                AccountStatusReasonCode.UNLOCK_ATTEMPTS
            };
            var messages = new List<ResultMessage>();
            switch (code)
            {
                case (int)AccountStatusCode.Closed:
                case (int)AccountStatusCode.PermanentlyClosed:
                    messages.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Closed));
                    break;
                case (int)AccountStatusCode.Locked:
                    if (!allowedLockedReasons.Contains(reason))
                    {
                        messages.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Locked));
                    }
                    break;
            }
            return messages;
        }

        // We use the static collection for checking lock reasons and lessen memory allocations
        public IList<ResultMessage> UpdatedCheckLoadFederalStimulusRules(int code, AccountStatusReasonCode reason)
        {
            var messages = new List<ResultMessage>(1);
            switch (code)
            {
                case (int)AccountStatusCode.Closed:
                case (int)AccountStatusCode.PermanentlyClosed:
                    messages.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Closed));
                    break;
                case (int)AccountStatusCode.Locked:
                    if (!TestClass.AllowedLockReasons.Contains(reason))
                    {
                        messages.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Locked));
                    }
                    break;
            }
            return messages;
        }

        // Unwind the case statement and try and take advantage of the null
        // return handling here to shortcut processing
        // Less readable, but very optimized
        public IList<ResultMessage> OptimizedCheckLoadFederalStimulusRules(int code, AccountStatusReasonCode reason)
        {
            if ((int)AccountStatusCode.Open == code)
            {
                return null;
            }
            if ((int)AccountStatusCode.Locked == code)
            {
                if (!TestClass.AllowedLockReasons.Contains(reason))
                {
                    var messages = new List<ResultMessage>(1);
                    messages.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Locked));
                    return messages;
                }
            }
            else if ((int)AccountStatusCode.Closed == code || (int)AccountStatusCode.PermanentlyClosed == code)
            {
                var messages = new List<ResultMessage>(1);
                messages.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Closed));
                return messages;
            }
            return null;
        }

        // Back to the Switch construct, optimized for readability and speed
        public IList<ResultMessage> FinalCheckLoadFederalStimulusRules(int code, AccountStatusReasonCode reason)
        {
            switch (code)
            {
                case (int)AccountStatusCode.Closed:
                case (int)AccountStatusCode.PermanentlyClosed:
                    {
                        var result = new List<ResultMessage>(1);
                        result.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Closed));
                        return result;
                    }
                case (int)AccountStatusCode.Locked:
                    {
                        if (!TestClass.AllowedLockReasons.Contains(reason))
                        {
                            var result = new List<ResultMessage>(1);
                            result.Add(new ResultMessage(ResultStatus.Fail, AccountStatusCode.Locked));
                            return result;
                        }
                        return null;
                    }
                default:
                    return null;
            }
        }
    }
}



Saturday, July 29, 2017

Meditation: How can doing nothing be so hard?

My first attempt at meditation had everything going for it; time, environment, and mindset. What happens next just goes to show just how difficult it is to do nothing, which should be the easiest thing in the world. Picture this, sitting outside on a nice soft mat, next to a pool, on a beautiful summer morning. You're thinking, a simple meditation session will be an easy and relaxing way start to your upcoming hectic day. I mean, how hard could it be?

Well, karma's a bitch and she showed me in spades what a noob I am in terms of the meditational arts, and why doing nothing can be difficult.


But first a little background on how I ended up here. This whole personal growth journey I started just felt very necessary, as I needed something grounding to help balance the chaos that has crept into my life. Given the number of balls that I've been juggling lately, I just felt an utter lack of focus, which leads to being physically and emotionally overwhelmed at times. After listening to a couple of rather profound podcasts, I latched onto the idea of meditation as something which could add value to my life with just a small time investment. Besides, it's practically the same as doing nothing for a short period of time, easy bonus points!

So back to my first foray into meditation. The stage was set. I had my spot next to the pool, I was feeling relaxed and, dare I say, a bit Zen. My phone was set to make sure I didn't spend too much time in relaxation mode, not knowing that I'd end up turning it off early. The first minutes went by easily as I focused on my breathing, hearing nothing but the wind and birds quietly in the background. I could feel myself relaxing, and melting into the moment. Then the first sign of trouble appeared, a dull ache in my lower back.

So, if you haven't had the pleasure of working behind a desk for twenty plus years, then you've really missed out on screwing up your body in amazing ways. It seems that one thing they don't teach you in school is that prolonged sitting causes your hamstrings to shorten ever so slightly, especially when done over a period of years. This shortening will pull your hips slightly out of rotational alignment at times when you need them to be straight. Times like standing for long periods, or sitting on the floor, legs crossed, attempting to force a good postural position on a system of muscles and ligaments that just don't want to play along for more than a few minutes.


The dull ache starts to grow into a slow burn, as I struggle to sit up straight. I make a mental note that I need to do some soft tissue work in addition to hitting the weights at the gym. My focus is now wavering, but I still feel like I can continue. Then I notice the slightly obnoxious hum of the neighbor's lawn mower.  This typically wouldn't be much of an issue, but I made an association with the previous night as the same neighbor behind me had been mowing then as well. I was taking a swim in the pool and just chilling when the mower started up, chewing up branches and detritus in his lawn for what seemed like forever. He had a good sized lawn, but was using a tiny push mower, and being an older retiree, moved at a more leisurely pace. Let's just say I was annoyed and triggered, and ended up going inside to escape the auditory assault. So here he is the next morning, bright and early, finishing the job.

The pain in my back is intensifying as I find myself trying to shift around into any position to attempt to alleviate it, and it digs into what little focus I had left, which is now under assault by the sound of sticks and grass being chopped into little bits... slowly...

Still I'm thinking to myself ... possibly still salvageable. But like I said, karma is a bitch and she wasn't done making her point yet. The next thing I hear is from just inside the house, from the window, with both my wife and daughter audibly snickering. Whatever focus I had is now gone as I watch the ripples in the pool and attempt to shut out the world, who is so rudely tapping on my little bubble. The next thing I know, out pops the family, with comments like, "Are you doing yoga?" "You have really bad posture?" "Are we bugging you?" "I took some photos of him!"  I just love being their little amusement side show, and at that point I was just done, and only seven minutes in. I shake my head, as I gather my things before it get covered in sunscreen as my wife sprays down my daughter before she heads to the beach. The look of failure evident on my face...

I now understand just how far I have to go in this journey. Meditation isn't about controlling your thoughts, but about observing them with a relaxed and focused mind. Still not sure I can come to find my inner peace when it comes to a lawnmower, but I'll certainly give it a shot.