Editor’s note: James Altucher is an investor, programmer, author, and entrepreneur. He is Managing Director of Formula Capital and has written 6 books on investing. His latest books are I Was Blind But Now I See and FAQ ME. You can follow him on Twitter @jaltucher.

Ken Lang could perform miracles. In 1990 we would head off to a bar near where we were going to graduate school for computer science, and we would bring a Go board. Then we would drink and play Go for five hours. At the end of the five hours, after a grueling battle over the board, I remember this one time when magically Ken would show up with two girls who were actually willing to sit down and hang out with two guys who had a GO BOARD in front of them. How did Ken do that?

Fast forward: 1991, CMU asks me to leave graduate school, citing lack of maturity. The professor who threw me out still occasionally calls me up asking me when I’m going to be mature enough.

Fast forward: 1994, one of our classmates, Michael Mauldin is working on a database that automatically sorts by category pages his spider retrieves on the Internet. The name of his computer: lycos.cs.cmu.edu. Lycos eventually spins out of CMU, becomes the biggest seach engine, and goes public with a multi-billion dollar valuation.

Fast forward: Ken Lang starts a company called WiseWire. I was incredibly skeptical. I read through what the company is about. “No way,” I think to myself, “that this is going to make any money”.

1998: Ken files a patent that classified how search results and ad results are sorted based on the number of click-thrus an ad gets. He sells the company to Lycos for $40 million. Ken Lang becomes CTO of Lycos and they take over his patents.

$40 million! What? And then Lycos stock skyrockets up. I can’t believe it. I’m happy for my friend but also incredibly jealous although later in 1998 I sell my first company as well. Still, I wanted to be the only one I knew who made money. I didn’t think it was fun when other people I knew made money. And, anyway, weren’t search engines dead? I mean,what was even the business model?

Fast forward: the 2000s. Almost every search engine dies. Excite, Lycos, Altavista. Before that “the world wide web worm”. Lycos got bought by a Spanish company, then a Korean company, then an Indian company. To be honest, I don’t even know who owns it now. It has a breathing tube and a feeding tube. Somehow, in a complete coma, it is being kept alive.

One search engine, a little company called Google, figured out how to make money.

One quick story: I was a venture capitalist in 2001. A company, Oingo, which later became Applied Semantics, had a technique for how search engines could make money by having people bid for ads. My partner at the firm said, “we can probably pick up half this company for cheap. They are running out of money.” It was during the Internet bust.

“Are you kidding me, “ I said. “they are in the search engine business. That’s totally dead.” And I went back to playing the Defender machine that was in my office. That I would play all day long even while companies waited in the conference room. (See: “10 Unusual Things I Didn’t Know About Google, Plus How I Made the Worst VC Decision Ever“)

A year later they were bought by Google for 1% of Google. Our half would’ve now been worth hundreds of millions if we had invested. I was the worst venture capitalist ever. They had changed their name from Oingo to Applied Semantics to what became within Google…AdWords and AdSense, which has been 97% of Google’s revenues since 2001. 97%. $67 billion dollars.

Don’t worry. I’m getting to it.

Fast forward. Overture, another search engine company that no longer exists (Yahoo bought it) files a patent for a bidding system for ads on a search engine. The patent office says (I’m paraphrasing), “you can file patents on A, B, and C. But not D, E, and F. Because Ken Lang from Lycos filed those patents already.”

Overture/Yahoo goes on to successfully sue Google based on the patents they did win. Google settled right before they went public but long before they achieved the bulk of their revenues.

Lycos goes on to being a barely breathing, comatose patient. Fast forward to 2011. Ken Lang buys his patents back from Lycos for almost nothing. He starts a company: I/P Engine. Two weeks ago he announced he was merging his company with a public company, Vringo (Nasdaq: VRNG). Because it’s Ken, I buy the stock although will buy more after this article is out and readers read this.

The company sues Google for a big percentage of those $67 billion in revenues plus future revenues. The claim: Google has willfully infringed on Vringo – I/P’s patents for sorting ads based on click-throughs. I remember almost 20 years ago when Ken was working on the software. “Useless!” I thought then. Their claim: $67 billion of Google’s revenues come from this patent. All of Google’s revenues going forward come from this patent. And every search engine which uses Google is allegedly infringing on the Vringo patent and is being sued.

Think: Interactive Corp (Nasdaq: IACI) with Ask.com. Think AOL. Think Target which internally uses Google’s technologies. Think Gannett, which uses Google’s technology and is also being sued. Think, eventually, thousands of Google’s customers who use AdSense.

Think: “willfully”. Why should you think that? Two reasons. Overture already sued Google. Google is aware of Yahoo/Overture’s patent history. The patent history officially stated that Ken Lang/Lycos already has patented some of this technology. What does “willfully” mean in legal terms? Triple damages.

Why didn’t Lycos ever sue? After Lycos had its massive stroke and was left to die in a dirty hospital room with some uncaring nurse changing it’s bedpans twice a day, Google was STILL Lycos’s biggest customer. Why sue your biggest customer? Operating companies rarely sue other operating companies. Then there are countersuits, loss of revenues, and all sorts of ugly things. The breathing tube would’ve been pulled out of Lycos and it would’ve been left to die.

Think: NTP suing RIMM on patents. NTP had nothing going on other than the patents. Like Vringo/Innovate. NTP won over $600 million from RIMM once Research in Motion realized this is a serious issue and not one they can just chalk up to a bad nightmare.

Guess who NTP’s lawyer was? Donald Stout. Guess who Vringo’s patent lawyer is? Donald Stout. Why is Donald Stout so good? He was an examiner at the US Patent Office. He knows patents. They announced all of this but nobody reads announcements of a small public company like Vringo. It’s hard enough figuring out how many pixels are on the screen of Apple’s amazng iPad 3.

Well, Google must have a defense? Even though their AdWords results are sorted by click-throughs in the way described by the patent maybe they sorted in a different way (a “work-around” of the patent), and didn’t infringe on the patent.

Maybe: But look at Google economist Hal Varian describing their algorithm right here in this video. And compare with the patent claim filed in court by Vringo. You decide. But it looks like the exact same to me.

Maybe: But does Google want to risk losing ten billion dollars plus having all of their customers sued. The district the case is getting tried in rules 70% in favor of the plaintiff in patent cases. Most patent trials get settled on the court steps.

Maybe: But then there’s still Microsoft /Yahoo search which, by the way, sorts based on click-throughs and has not been sued yet.

Guess what? Google’s patent lawyer is Quinn-Emmanuel. They are defending Google. Oh, and here’s something funny. Guess who Yahoo’s lawyer is? Yahoo is suing Facebook for patent infringement in the search domain. Quinn-Emanuel. So the same lawyer is both defending and accusing in the same domain. Someone’s going to settle. Everyone will settle. If anyone loses this case then the entire industry is going down in the same lawsuit and the exact same lawyer will be stuck on both sides of the fence. I’m not a lawyer but that smells. The trial is October 16 in the Eastern District Court of Virginia and will last 2 weeks. An appeal process can take, at most, a year.

I’ve known Ken for 23 years. I’ve been in the trenches with him when he was writing what I thought was his useless software. I watched his company get bought and we’ve talked about these technologies through the decades.

I’ve read the patent case. I watched Hal Varian’s video. Also look at this link on Google’s site where they describe their algorithm. Compare with the patent claim. I have a screenshot if they decide to take it down. $67 billion in revenues from this patent. Imagine: double that in the next ten years. Imagine: triple damages.

Vringo will have an $80 million market capitalization post their merger with I/P. NTP won $600 million from RIMM using the same lawyer. RIMM’s revenues are a drop in the bucket compared to Google. And compared to 1000s of Google’s customers who will be embarrassed when the lawyer shows up at their door also. That’s why I made my investment accordingly. Is Google going to take the risk this happens?

I doubt it.

You can think to yourself: “ugh, patent trolls are disgusting”. But the protection of intellectual property is what America is built on. Smart people invent things. Then they get to protect the intellectual property on what they invents. Other companies can’t steal that technology. That’s why we have such a problem outsourcing to China and other countries where we are worried they might steal our intellectual property. Patents are the defense mechanism for capitalism.

Ken can perform miracles. But no miracle would save me. At the end of one evening of Go playing and beer drinking in 1990 we gave two girls our phone numbers. I don’t know if Ken ever got the call. I didn’t. But I guess I’m happy where it all ended up.