Costolo instilled discipline and a new work ethic by coming back to the office after dinner and working side by side with employees who stayed late.
He also made sure that the company fixed the massive technical issues causing service outages while keeping Twitter up and running, a feat he compared to "laying down new track as a train is barreling down the track."
Most important, he was instrumental in devising a new form of advertising, the most successful of which is the "promoted tweet." It looks like a regular tweet, but advertisers pay for it to appear at the top of users' streams of updates and in search results.
He also set Twitter's sights on the most lucrative advertising market — television — and positioned the service as the second screen on which TV viewers discuss what they're watching.
"It wasn't a silver bullet, but a lot of lead bullets," Horowitz said.
Still, Twitter faces challenges that will increase in difficulty as a publicly traded company.
Growth among U.S. users has slowed to a crawl. Twitter's losses are widening as it invests money in expanding internationally, where many analysts wonder whether it can succeed. Three-fourths of Twitter users live overseas, but only one-fourth of its revenue comes from overseas advertisers.
Twitter does not yet have the scale or nearly the success that Facebook had before it went public last year. Facebook reported an annual profit of $1 billion and revenue of $3.7 billion before its initial public offering of stock. Twitter reported a net loss of $79.4 million on revenue of $316.9 million in 2012. As for users, Facebook has 1.2 billion compared with Twitter's 232 million.
And the pressure to sharply grow its popularity and revenue and turn a profit will only intensify from Twitter shareholders.
Last week Costolo embarked on an eight-city tour to persuade mutual funds and hedge funds to sell investors on the Twitter IPO.
It's the most crucial performance of his career. The onetime improvisational comedian stood before packed rooms of money managers to pitch a company that is going public at a value of $13.9 billion or higher.
Twitter said last week that it would price its shares at $17 to $20, a far more conservative range than analysts expected. With demand soaring from institutional investors, Twitter on Monday raised that range to $23 to $25. And some people think that the company will increase the price of the IPO on Wednesday.
From the start, Costolo has gone to great lengths to make Twitter's IPO as low profile as possible in an attempt to avoid the massive hype that surrounded the Facebook IPO.
He donned a blue blazer but no tie last week as he made the customary rounds of the investment banks to kick off the Twitter road show.
At JPMorgan Chase & Co., Costolo was introduced by the firm's top deal maker, Vice Chairman James B. Lee Jr.
Behind Lee hung a banner with the logos of many of the companies that JPMorgan had taken public. Twitter's blue bird logo was spotlighted in the center. Facebook and Google were relegated to the bottom.
Costolo thanked Lee for the introduction and then joked: "I fully expect that when you welcome Airbnb for their IPO that our bird is still going to be at the center of this banner."
Analysts and investors say Twitter could not have timed its IPO any better, because it is entering one of the strongest and most receptive markets in years. Institutional investors are clamoring for a piece of a hot technology company with growth potential.
"Generally there seems to be real positive sentiment," said an investor who attended one of the meetings.
Money managers are concerned about the "lack of profits and rising losses," this person said. Additionally, investors aren't sure whether Twitter can make enough money overseas, where most of its users and growth are.