When Microsoft took a $900 million writedown on unsold Surface inventory, it seemed like the writing was on the wall. At the time, Microsoft found itself at a fork in the road -- either abandon what looked like a failed experiment, or hold strong to its long term vision for what Surface could be. Microsoft opted for the latter, taking lessons it learned early on to help turn things around.

Panos Panay, corporate vice president for Surface Computing at Microsoft, spoke with CNN Money about those lessons and the "humbling" experience of having to write down in the general neighborhood of a billion dollars for a product that just wouldn't sell.

"When you look at that write down in that moment, you look back and go, 'Man, that was of course humbling, it was a really tough time.' The team never looked up, the self doubt didn't creep in. We knew what were building," Panay says.

According to Panay, former CEO Steve Ballmer and current boss Satya Nadella both strongly believed in Surface when the chips were down, and they all understood that it would take time, as well as big investments.

It's beginning to pay off. With each new generation, Surface gains steam and attracts more buyers. And with Windows RT no longer a thing, it's easier for Microsoft to know how to market Surface, which it pitches as a tablet that can replace your notebook.

"We go full speed, and sometimes we might be going in the wrong direction -- and that's OK," Panay said. "If you fail, this company is amazing. They will support you. You just have to learn about it. If you take some shots out there, you might come back with some beautiful things."

It seems like Microsoft is now on the right direction with Surface, and while Panay admits "that billion dollar writedown will never go away," he sees tremendous value in the lessons learned from Surface's early struggles.