Marissa Mayer just had her first major mistake as Yahoo CEO.

She was forced to oust Henrique De Castro, her hand-picked, and highly compensated COO after just 15 months on the job.

From the moment De Castro was hired, people warned that he was a big mistake for Yahoo.

Yet, Mayer plowed ahead, hiring De Castro, likely because when she started at Yahoo she had a blind spot for how the ad industry really works. After almost two years on the job, she now understands the industry better and is trying to correct her mistake.

When Mayer hired De Castro, one source told us, "[Henrique] is very smart, but he has a difficult personality; both his teams and his clients dislike him ... He has no experience whatsoever running any kind of a real ad salesforce, let alone a 1,000+ team selling experiential media into brand buyers."

This source wasn't an outlier. De Castro had plenty of enemies.

He has his own parody Twitter account that tweets some of the outlandish things he's said, such as, "To the CEO of major UK TV broadcaster: 'This deal is like sex with a Russian prostitute. Veeeerry tempting.... but no.'"

At Google, De Castro oversaw the successful creation of its display ad business, but Yahoo's ad business is different from Google's ad business. De Castro was running systems that served/targeted/optimized/ display ads for Google. That sort of advertising is radically different from a takeover display ad that runs on Yahoo's front page.

Mayer was on the product/engineering side of Google, but not in the advertising part of product/engineering. She didn't have to think about advertising. And since ad dollars flowed into Google, she probably thought she could just pluck any Google ad guy out of a lineup and plug him into Yahoo.

To people like Mayer who didn't pay attention to the ad business, an ad is an ad is an ad. But there are important, nuanced differences.

Despite many warnings that De Castro was bad fit for Yahoo, Mayer still poached him with a giant payday. Executive compensation firm Equilar estimates De Castro will collect $109 million from his time at Yahoo.

His time at Yahoo yielded little in the way of results, as far as we can tell. Yahoo's ad business remained stagnant, and De Castro was clashing with Mayer and her top executives.

Kara Swisher at Re/Code reported, "In recent months, according to numerous sources, he and Mayer had developed a tense relationship that many in meetings with the pair found it hard not to notice."

De Castro was a no-show at CES, the big tech industry trade show where Yahoo had a massive keynote with all sorts of executives. That was a warning sign that De Castro was not long for Yahoo.

Now, he's gone. In a note to employees, Mayer didn't try to soften the news. She said, "During my own reflection, I made the difficult decision that our COO, Henrique de Castro, should leave the company."

While this is a high-profile mistake for Mayer, there's some reason for optimism.

First, the stock is only down 2% this morning. By firing De Castro, Mayer telegraphed that the ad business is not doing well. And still, investors don't care, because Yahoo remains (for the most part) a tracking company for Chinese Internet giant Alibaba. In other words, Mayer has time to find her footing.

Second, she made her decision relatively quickly. De Castro was only at Yahoo for 15 months. She didn't let his tenure drag on just to save face. She cut him before it got too ugly.

Moving on from De Castro is good, but there's already murmurs in the ad industry that she still hasn't solved the problem.

It looks like former AOL ad executive Ned Brody is going to take over for De Castro. We're hearing that he too was a "systems" guy at AOL. Mayer still needs to find a true sales person who understands the media business.