Source code is worthless

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:

  • TechCrunch, a nearly worthless website, got a lot of nearly worthless traffic from Digg.
  • I learned that Facebook doesn’t write very good PHP code. But since Facebook is worth $2 billion and Marco.org is worth $200, it may not matter.

In other words: nothing.

Here’s what didn’t happen:

  • The leak of any useful amount of code.
  • The release of any clones based on the code. (I saw it, and trust me, it’s worthless.)
  • Facebook’s doom.
  • A decrease in the ridiculously inflated Facebook buzz and valuation.
  • A decrease in Facebook traffic.

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?

Secret algorithms

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).

Even without source code, unique algorithms could be reverse-engineered from assembly, given enough time and effort. (This doesn’t apply to hosted web applications, since the source is never sent to the clients or executed on their computers except Javascript portions.) This is rarely necessary or justifiable.

But this is irrelevant. You’d never want to copy most code.

Copy what?

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.

What would you do with it?

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.

Marketing

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.