I could fill a pretty long book with all the stories of times I thought that an idea was stupid and could never work, only to discover that, in fact, it was pretty inspired. The two bad calls that I'm most proud of? That's easy: eBay (NYSE:EBAY) and Wikipedia.

I became aware of eBay in the mid-1990s, when a friend started using it to buy and sell comic books. I thought it was the stupidest concept ever. I absolutely could not comprehend why people would send money to complete strangers they had found on the Internet. It seemed that there was no protection against fraud and abuse, and the whole arrangement would become a hunting ground for scammers until it fell apart.

That turns out not to be what happened.

I had similar reservations about wikis, which I heard about long before Wikipedia was created. A group of programmers created the first wiki, something called the Portland Pattern Repository. When I heard about it, I thought I must have misunderstood something. Anyone can edit any page? What's to stop some bored kid from deleting your whole website? I just didn't get it. This idea obviously wouldn't work.

There, too, I was completely and totally wrong.

But then I came across a story from, of all things, the history of naval gunnery. It showed me exactly where I had gone wrong in my analysis of eBay and Wikipedia. Moreover, it taught me a fundamental lesson about the nature of technological innovation.

You see, around the turn of the previous century, a junior U.S. Navy officer, William S. Sims, was shipped out to the China station. There, he met Admiral Sir Percy Scott, of the British Navy, who had recently developed a mechanism used for targeting artillery. The system was vastly more accurate than anything any navy had ever had--it increased accuracy by as much as 3,000 percent, according to one estimate. It was called continuous-aim firing.

Imagine you're on a ship at sea, firing one of those big guns at a target on land. Maybe it's a lifeguard hut at Malibu Beach. Now, the sea is not steady. The waves are gently rolling the ship back and forth. If you look through the telescopic sight at the lifeguard hut, it's moving up and down.

Under the old system, you would look through the sight, aim at the target, then wait a few seconds until the ship rolled back and the target came back into view. But you couldn't wait until then to fire: You had to predict when the target was about to be in your sight and fire at that exact moment.

Needless to say, the old system didn't work too well. You couldn't fire very rapidly, given that most of the time you were waiting for the ship to roll to the right spot. Nor was the guess-and-shoot method very accurate. The bottom line was that you hardly ever hit the target. I imagine the lifeguards of the 1800s sitting casually at their stations, sipping virgin daiquiris and applying suntan lotion without even noticing the shenanigans of the British sailors as they run around like the Marx brothers and try to squeeze off a shot.

The British innovation was deceptively simple. The gunner looked through his telescopic sight at the target and then started turning a little wheel on the gun back and forth. The wheel raised and lowered the gun continuously to compensate for the rolling of the ship. As a result, the gun was always pointing directly at the target, and the gunner could fire whenever he wanted. The technology was not complicated, but its impact was substantial. Continuous-aim firing radically improved a gunner's accuracy.

The American officer, Sims, spent several years trying to persuade officials in Washington to adopt continuous-aim firing throughout the Navy. His commanders refused to listen to him.

"Continuous-aim firing is impossible," they replied.

Officials at the Bureau of Ordnance in Washington set up a gun in the local Navy yard that matched the guns used in the fleet and tried to simulate continuous-aim firing. Lo and behold, they discovered that it was really hard to turn that wheel, and you just couldn't do it fast enough to keep up with the roll of the waves. It will never work, they told Sims with authority, before adding some nasty comments about how if there was any problem with the accuracy of firing, it must have been Sims's fault.

The Navy's tests failed, of course, because the bureaucrats in Washington had forgotten Newton's first law: An object in motion tends to remain in motion. The experiment on terra firma failed because the sailors struggled to raise and lower the gun. But on a rolling ship, it's quite easy to raise and lower the gun to compensate for the constant motion, because that's what the gun wants to do anyway.

Despite the fact that continuous-aim firing was already in use in the British Navy, it took Sims years to persuade his superiors to embrace the innovation. Ultimately, he wrote a letter to President Theodore Roosevelt--who, surprisingly, read it, investigated the situation, and ended up promoting Sims to be in charge of target practice for the entire fleet.

The reason I love this story is that it's as stark an illustration as I can find that "seeming impossible" is practically a requirement for a truly great innovation. If something seems possible, that's probably because someone is already doing it. When something seems that it can't possibly work, nobody tries it. Real innovation happens when someone tries anyway, overlooking an obvious flaw, and finds a way to make an idea work.

For example, eBay's original solution to the fraud and scam problem was a simple online reputation system. That system has grown to a department of 2,000 to 3,000 people working on "trust and safety," so it's probably no longer accurate to call the solution "simple." But from the very start, it effectively dealt with users' concerns about fraud.

What about the problem with wikis--that any kid could delete all the good work of others in a fit? This was true, but I hadn't noticed that wikis keep a complete history of every version of every article, so if someone erases or defaces a page, it takes about three clicks to put it back the way it was. Vandalism is a waste of time when repairing the damage is so much easier than messing things up in the first place.

eBay and Wikipedia are almost magical, huge successes--online monopolies, for all intents and purposes. That's not just because of the innovation, which anyone could copy (and many have tried). It's because in both cases, they have really strong network effects: The more people are there, the more people will want to be there.

Think of it this way: If you want to buy a Pez dispenser, you want to go to the auction site with the most sellers, because that's where you will find the biggest selection and the best prices. If you want to sell a Pez dispenser, you want to go to the auction site with the most buyers, because that's where you will get the most bids. In online auctions, the market leader has a huge advantage over the market followers. When Amazon (NASDAQ:AMZN), Yahoo (NASDAQ:YHOO), and Microsoft (NASDAQ:MSFT) tried to get into the auction business, they didn't stand a chance. And the interesting thing is that Amazon, Yahoo, and Microsoft didn't try to get into the auction business until it was already too late and eBay's lead was cemented. Why? Because online auctions seemed--to them, at least--to be impossible.

The combination of "seems impossible" and "strong network effects" is about as close as you can get to the magic formula for incredible, sustainable success, as with eBay, Wikipedia, and Google. (People thought Google would never succeed because other search engines already existed.) You do have to be careful, though. All those crackpots with schemes of perpetual motion machines, unified theories of physics, and DeLoreans that travel in time while simultaneously converting toothpaste to gold happily regale you with countless stories about how "they said Galileo was crazy."

Just because they say you're crazy doesn't mean you're not crazy. Yes, things that seem impossible can be great innovations. On the other hand, they simply may be impossible. But on those rare occasions when you realize that something nobody thinks can work really can work--well, on that day, you just might change the world.

Joel Spolsky is the co-founder and CEO of Fog Creek Software in New York City and the host of the popular Joel on Software blog.