Saturday, September 7, 2013

Primal Computer started out as a throwaway joke during a job interview some thirty years ago. Nowadays programmer interview questions are all about how you can efficiently scale the storage and retrieval of megapixel images of cats, but back then the questions centered on how quickly you could manipulate just a few bits (if you take Moore’s law in reverse, you’ll see how slow the CPU’s were then, and you’ll realize the value of saving a clock cycle or two in a bitwise manipulation).So there I am in an interview, and the guy asks something like “Imagine a standard binary bit-pattern CPU architecture, but with every other bit being a negative value instead of positive (for example: 1, -2, 4, -8 and so on) how would you…”“Stop right there,” I said. “I see where this is going and it’s clear these questions are not going to be very challenging.” (I had a lot more spunk back then and, to be honest, I had seen a similar question before.) “So let’s make this more interesting: Let’s imagine that each higher bit represents the next prime number (e.g., 1, 2, 3, 5, 7, 11, 13, etc…).”“Interesting…”“Now let’s go through some questions:” I said, taking firm control of the interview. “How do you increment? decrement? add? negate? subtract? multiply? divide?”“Multiply and divide become trivial,” he said, “but addition and subtraction, let alone a simple increment… gee, I gotta think about that one…. Hey, I know what to call it:” he said, laughing. “Primal Computer,”I laughed, partly because I was in an interview and I wanted the guy to like me, and partly because it was slightly amusing, since it played on “Prime Computer” (aka “PR1ME Computer”) which was a next-big-thing computer company at the time.If you can get your interviewer laughing with you, while you both work on solving your interview question rather than his own question, then you have won the interview. I totally won that interview. (For the record, they offered me a job as a manager, which I turned down because, geez, what whiz-kid, hot-shit programmer wants to be a manager?)Anyway, back to Primal Computer. For a few years after that interview I couldn’t get the idea out of my head. Wouldn’t it be cool… What if… How…So off and on over the next twenty years, between jobs, getting married, and raising kids, I kept working on basement-level schematics and prototypes for The Primal Computer, because, I mean, wouldn’t it be cool?Finally, over the past 8 years, with a little money in my pocket and the kids out of the house, I set off to Just Do It, because, I mean, wouldn’t it be cool? (Also, a couple of technical advancements had happened by that time to make it finally feasible to develop a Primal Computer. First was the price and availability of FPGAs. Second was the introduction of rentable cloud computing, specifically Amazon’s EC2. The importance of these two market changes will become clear as I describe my implementation choices.)Once I had worked out the logic, there remained many technical challenges to building a final, working, Primal Computer. First was the problem my interviewer had first pointed out: although multiplication and division are trivial, even the simplest addition and subtraction are incredibly hard. I finally determined addition and subtraction would be so time-consuming for my CPU that I had to break the computer into two cooperating systems, one to handle standard binary operations and the other to handle a few operations at which the standard computer sucked, which turned out to be only some division and extremely-large integer multiplication, and the rare times when an integer needed to be broken into it’s prime factors. I developed a bus between these two computer sub-systems, and with FPGAs was able to program most of the logic I needed; unfortunately these components slowed things down quite a bit overall.The second problem was that the representation of numbers in the primal system isn’t trivial. It ends up taking a lot of memory. The cloud clusters are needed simply to create what is effectively a whopping giant register. To handle ever-larger numbers it requires extra capacity at the rate of about ln(N); so it goes up less quickly as numbers get bigger, bit it always goes up. This added cost to the system, as well as slowing everything further when the local custom architecture needed to communicate with the cloud cluster.Here’s an example of the inadequacies of the system: I tested with an emulated implementation of DOOM. It worked, but before starting it took almost an hour (and $24) to boot the needed EC2 instances, and while it was running I only saw something like 2 FPS.But DOOM did work! and on a Primal Computer! And that was so cool!

-------

I’ve noticed that it is becoming common lately to discuss one’s startup failures. It’s a lesson to others, and cathartic (I hope) for the teller. So back to the company. As you probably already guessed from the title of this piece, Primal Computer was ultimately a failure. It was terribly tough to admit this to myself, after 30 years of effort, but admit it I have. Move on, I will. (Write like Yoda, I do :-)The fundamental problem is that I was doing something because it was cool! But “because it’s cool” is no reason to invest one’s life in a new business. Cool is good, but only if it meet’s someone’s needs, relieves someone’s pain, or increases someone’s profit. First and foremost, there has to be a market and your product has to fit that market.As I’ve already said there was only ever one client for a Primal Computer. It was a 3-letter government agency. I don’t know exactly what their use case was, but to prove the technology and make the sale they asked me to show that a Primal Computer could solve some basic factoring problems on a bunch of 15360-bit integers (that’s 15360 binary bits, not primal). It took a couple of weeks to get the system up and running, and I had to refinance my home just to pay for the EC2 compute time, but once it was prepped the Primal Computer had no problem doing the factoring on any number they gave it. (For some integers factoring took over 500 milliseconds, which really bothered me, but the customer didn’t seem to mind.)So I made that one sale, which was a big one (enough to buy my house back a few times over), but it was the only sale. They only bought one Primal Computer. And they were the only customer!!!! Primal Computer was a failure. :-(You know what: now that I’ve told my fail-tale, I do feel better. Thanks, internet!So that you don’t make the same mistakes I did at Primal Computer, here are a couple of lessons learned:

Startup lesson #1: Don’t just do something just because it’s technically interesting (i.e. “cool”). You must first determine if there’s a market need and fit for your product.

Startup lesson #2: Don’t waste 3 weeks trying to come up with a company slogan, only to end up with something stupid like: “Our computer doesn’t add or subtract so good, but when it comes to factoring, The Primal Screams!”