The internet freaked out last month about a confirmed leak of the Facebook homepage source code. As usual, geeks jumped on it and the press predicted a bunch of upcoming Facebook clones based on the code.
Here’s what happened:
In other words: nothing.
Here’s what didn’t happen:
Two years ago, some Windows 2000 source code was leaked. It had a similar story: a bunch of geeks and journalists freaked out, and nothing happened.
Why not? Isn’t source code full of top-secret algorithms and trade secrets critical to the business, with thousands of competitors thirsting for a glimpse so they can copy it and kill your business?
Given a reasonable amount of time, any functionality can be copied by competitors.
Some algorithms are patented, but patents are tricky to enforce. A patent only covers a method, not particular output. If you can find alternate ways to get the desired result, you’re free of any patent lawsuits (as long as you can pay to defend yourself).
But this is irrelevant. You’d never want to copy most code.
Most code is boring: shuffle this data around and display it. It would be faster and more reliable to write your own than to try to understand someone else’s enough to copy it into your application.
Code usually depends strongly on other code in the project. In a different codebase, nearly all external code segments are useless and not worth copying.
The Facebook and Windows leaks were just segments of source code, and neither contained anything interesting or useful outside of the rest of their codebase. But what if they did?
What if you had the complete Facebook source code?
Even if MySpace got a copy of the complete Facebook source code, they still couldn’t make the press care about them anymore or get every Facebook user to go back to MySpace. And the code would be out of date immediately, with none of the original developers providing support, bug fixes, or new features.
What if OpenOffice.org had the source code to Microsoft Word? It still wouldn’t make most people care about OpenOffice.org or fix all of its horrible bugs, annoying behavior, and ugly interface.
Some products are distributed in source form because they’re written in a language that requires it, such as PHP. They’re not all free, either: FogBugz and vBulletin are both hundreds of dollars for most licenses, and every customer is given the complete source code. They maintain the same marketshare they’ve always had - nobody has succeeded in releasing a source-code clone to outsell either of them.
The immense value in software and websites is a combination of their brands, communities, support, and development talent.
Fundamentally, these can’t be duplicated.
Facebook is Facebook because of their name, service, and community, not because of the particular way they format their pages with PHP and HTML. eBay is eBay because that’s the place everyone goes for online auctions and flea markets, not because nobody else has figured out how to code an auction website.
Seeing or acquiring the actual source code to nearly anything is completely meaningless.