A new job, a baby on the way and an ailing internet giant to manage. Marissa Mayer has a major challenge on her hands.

Marissa Mayer, CEO of Yahoo

The last 24 hours have been pretty significant in the life of 37-year-old Marissa Mayer.

In an announcement not predicted by any industry commentators or analysts, Yahoo has appointed Mayer as its eight CEO, having spent 13 years at Google, where she was the search giant's 20th employee back in 1999.

She also announced that she is expecting a baby boy on 7 October with husband Zachary Bogue but will work through her maternity leave as she tried to engineer a U-turn in the fortunes of the internet behemoth that is (was) Yahoo.

Mayer will have little time to settle in. Having handed in her notice on Monday morning to Google, she will be behind her desk at Yahoo this morning (17 July) and facing into the company's Q2 2012 financial results, to be announced at 10pm GMT tonight. She hasn't even had time to update her LinkedIn account.

The appointment took pretty much the entire tech world by surprise. It had been assumed that, since Hulu CEO Jason Kilar had walked away from the process, the interim CEO Ross Levinsohn was a shoo-in for the job.

There has been a lot of support for Mayer since the announcement, not least from her former colleagues at Google. "Yahoo has made a good choice and I am personally very excited to see another woman become CEO of a technology company," Google's executive chairman Eric Schmidt said in an emailed statement. "Best wishes to Marissa and Yahoo."

Larry Page, who failed to hand Mayer a top role in his reorganisation of Google last year, said:

"Since arriving at Google just over 13 years ago as employee #20, Marissa has been a tireless champion of our users. She contributed to the development of our Search, Geo, and Local products as well as many other product areas. We will miss her talents at Google."

However, not everyone has been so positive, and following the initial elation of landing such a high-profile job, Mayer will have to face the realisation that she has an up-hill struggle on her hands to turn around the ailing online portal.

Here we outline just three of the challenges she will face:

Lowering Expectations

Yahoo
Yahoo's new CEO, Marissa Mayer needs to lower expectations at the company. Yahoo

It might seem counter-intuitive for a new CEO to come into a company and lower expectations among employees and investors, but if Mayer is to succeed, she will need to do just that.

Following the shock appointment last night, Mayer has been praised by everyone from her former colleagues to fellow-female CEO at HP Meg Whitman and Twitter co-founder Jack Dorsey. She is seen as a product-focused technologist who has a degree in computer science and artificial intelligence. There is a lot of excitement around her appointment from outside and inside the company.

The problem is, Yahoo is coming from a pretty bad place in terms of CEOs. Mayer's appointment came about because of Scott Thompson fudging his CV to include a fake computer science degree and being forced to resign.

Prior to him, it was another woman, Carol Bartz who was in charge. She left under a cloud of ill-feeling, emailing a parting shot to employees in which she called the Yahoo board "doofuses" who had "f**ked me over."

So a bright, young, hard-working, intelligent person like Mayer seems like just the panacea Yahoo needs. The fact Yahoo has taken her from Google will be seen as another plus, considering she had a hand in some of the most important Google products of the past decade, chief among them the cash cow that is AdWords.

However all this positive energy will not hide the fact that Yahoo is going to continue to lose ground to Google and Facebook in terms of display ads market share - according to eMarketer figures - and it will take years for Mayer to have a real effect on this company.

In his book Searching for a Corporate Savior: The Irrational Quest for Charismatic CEOs, Rakesh Khurana found that most of us have unrealistic expectation for companies CEOs. He found that people mistakenly believed a white knight can come in and save a company from financial ruin, and that dumping a CEO will automatically turn a company around.

Therefore if she wants to succeed, she needs to temper the hype which is surrounding her appointment and not get people's hopes up too much.

Being a woman in a man's world

Marissa Mayer, Yahoo CEO

While some may call it sexist to be even speaking about Mayer being a woman, the fact is that there are only a handful of female CEOs at companies of Yahoo's stature and this marks the first time a self-styled internet geek has been given such a position.

Mayer will also have to contend with being a mother for the first time come 7 October, when she Brogue are expecting a baby boy. She said in an interview last night that she first informed Yahoo of her pregnancy on 18 June and at a full board meeting last Wednesday. According to Mayer, no one raised any concerns about hiring a pregnant CEO: "They showed their evolved thinking."

Whether or not it had anything to do with her sex, Mayer seemed to have hit a glass ceiling at Google, have been moved sideways, or even demoted, in last years' reorganisation.

"From a career standpoint, from a legacy standpoint, she seemed unlikely to go beyond where she was at Google," said Allen Weiner, an analyst at Gartner in Austin. "In order to reach the next level, she would have to go elsewhere."

Mayer says she is going to take only a few weeks maternity leave come October and will probably spend most of that time working from home. Of course being a highly-paid CEO of a huge company like Yahoo will mean great childcare and a flexible schedule, so juggling a newborn child with the pressures of work won't be as difficult for her as it is for some.

However, she will be scrutinised by not only those in the technology and business sectors, but also by new and expectant mothers everywhere, to see how she copes. Being the most powerful pregnant woman in America brings with it its own challenges.

Making Yahoo Cool Again

Yahoo.com

At the turn of the millennium, Yahoo was the number one internet destination, offering a diverse range of content and products from news and email to stocks and games. It was cool. It was purple. It had an exclamation mark at the end of its name.

Skip forward to 2008 and Microsoft offered then CEO, and co-founder, Jerry Yang, $44.6bn for the company. Yang turned it down, to the chagrin of noisy investors like Third Point, and today the company is worth less than half of that sum.

Marissa Mayer is coming into a company which has been slowly but surely sinking for the best part of five years, and is showing only faint glimpses that it will survive. While it has 600 million users across all its products, it is not attracting new users at the rate of competitors like Google and Facebook - and with new users comes new ad revenue.

In order to reverse this trend, Mayer will have to make Yahoo cool again, make it attractive to investors and get employees excited about what they are working on. This is why Mayer could be the ideal candidate, as she understands the technology which drives the product which make the like of Google successful, better than any of the engineers at Yahoo.

"Marissa has a lot of street credibility with product managers and engineers, which significantly increases Yahoo's chances of attracting the right technology talent," said Doug Garland, a former vice president at Google and senior vice president at Yahoo, who's now the chief revenue officer at music-discovery service Shazam.

As Kara Swisher points out on AllThingsD, the four previous CEOs have all had different views of what Yahoo was about: Yang believed it was an advertising tech company; Bartz thought it was a data delivery company; Thompson focused on commerce while interim CEO Ross Levinsohn believed media was the future.

Yahoo has a hugely diverse portfolio of products and if it is to succeed it will have to kill the less usccessful of them. This will mean job cuts, with Yahoo having way too many employees compared to the level of growth it is experiencing.

So in order to make way for whatever new talent Mayer can attract, she will have to cut some of the deadwood from the current crop of Yahoos, which is not exactly the best way to endear herself to her new colleagues.