Thursday, March 31, 2011

Who Wrote How Much of the Original Microsoft BASIC Interpreter?

Today's Wall Street Journal account of Paul Allen's book about Bill Gates includes the following passage:

  • In the mid-1970s, when the two college dropouts were based in New Mexico, Mr. Allen says Mr. Gates asked for 60% of their partnership because of his greater contribution to the creation of software for running the BASIC programming language on an early PC, the MITS Altair 8800. Mr. Allen says he had assumed that their partnership was evenly split, but he agreed to Mr. Gates's request.

I had taught Bill Gates in a couple of courses during his years at Harvard. He used to doze through my lectures -- I figured out only later what he must have been doing late at night that made him so drowsy in the morning. I have never met Paul Allen.

Sometime after Bill pulled out of Harvard, a computer program listing turned up behind an old file cabinet. It was printed on 11x17" paper on the old, all-caps line printer that was hooked up to the PDP-10. As is well known, that BASIC interpreter had been written on the PDP-10. It was cross-assembled, which means that unused PDP-10 op codes had been given the names of the 8080 instructions, and when the PDP-10 tried to execute these instructions a "trap" occurred. In the trap code the programmers had added some emulation routines to make the PDP-10 do what the 8080 would have done if it had been executing the instruction. This made it possible to use the PDP-10 debugging tools to debug the 8080 code. Indeed, legend has it that they never saw an actual 8080 chip the whole time they were debugging the interpreter. Pretty clever bootstrapping exercise.

The original is in the Harvard Archives; a few pages are reproduced in a display on the wall of the ground floor lounge of Maxwell Dworkin, the Harvard computer science building donated by Gates and Ballmer. Here is what the listing says near the top:

TITLE BASIC MCS 8080 GATES/ALLEN/DAVIDOFF
…
SUBTTL VERSION 1.1 -- MORE FEATURES TO COME


-------------------------------------------
COPYRIGHT 1975 BY BILL GATES AND PAUL ALLEN
-------------------------------------------


WRITTEN ORIGINALLY ON THE PDPD-10 AT HARVARD FROM
FEBRUARY 9 TO APRIL 27


PAUL ALLEN WROTE THE NON-RUNTIME STUFF
BILL GATES WROTE THE RUNTIME STUFF
MONTE DAVIDOFF WROTE THE MATH PACKAGE

At the risk of violating the copyright, I am going to reproduce the first few lines right here.


Monte Davidoff was another undergraduate. I have never talked to him about his work for Gates and Allen, which resulted in his being acknowledged by them but not included on the copyright notice.

I leave it to the interested reader to speculate about whether the order of names has any significance. I can say that Gates was at Harvard and was the one who actually had a PDP-10 account; if Allen ever used the machine I was not aware of it.

I came to the office this morning planning to go through the listing and try to distinguish the three kinds of code, so as to infer something about who contributed how much. Before I even go there, though, I should say that "lines of code" is a very poor metric for percentage contribution. (Cf. the classic The Mythical Man-Month, by another Harvard great, Fred Brooks.) For example, rewriting some program you have written ten times before is less of a contribution than writing something much shorter new from scratch.

In Davidoff's case the code-lines contribution is easy to estimate, because the math routines are in a separate file. It is about 31 pages long, and includes all the expected things, right down to an ARCTAN function written in 8080 assembly code.

The main file is about 65 pages long. I may yet go through it page by page and try to do some classification, but when I tried this morning I realized that this is a BASIC interpreter, a program that takes in statements on the fly, parses them, and executes them. There are some data definitions and storage tables, which are surely non-executable. But it's not clear to me what else the "non-runtime stuff" might comprise. Perhaps the lexical and syntax analysis are considered non-runtime; there is a fair amount of that, though not enough to make me think Allen has a strong case for being aggrieved. 

In any event, I find Allen's attitude, as reported in the article, pretty irritating. It is just unseemly for one billionaire member of this team to be revisiting at this point that old issue of whether he should have gotten 50% or 60% of the equity based on how much he wrote of a program that was less than 100 pages long (at 60 lines per page) and of which a third was written by neither of them!

Friday, March 11, 2011

Encrypted Google?

Thanks to one of my Bits students for sending this screenshot along to me. Google is experimenting with an encrypted version of its search engine, so if I were searching, say, for the location of tomorrow's anti-government rally, the government couldn't see that that is what I am searching for, even if it were scanning all my Internet communications. Sounds like a good idea. Aimed to grab some of the positive press that Facebook has been enjoying for its role in helping dissidents organize? That would be too cynical an interpretation, I'm quite sure …

Sunday, January 9, 2011

No More Gun Metaphors

In the aftermath of the awful shootings in Tuscon, all the politicians are expressing sympathy and all are saying that nothing they or their partisans have ever said has anything to do with the acts of the alleged shooter, who is, they say, a nut case, pure and simple.


During his campaign effort to unseat Giffords in November, Republican challenger Jesse Kelly held fundraisers where he urged supporters to help remove Giffords from office by joining him to shoot a fully loaded M-16 rifle. Kelly is a former Marine who served in Iraq and was pictured on his website in military gear holding his automatic weapon and promoting the event.
"I don't see the connection," between the fundraisers featuring weapons and Saturday's shooting, said John Ellinwood, Kelly's spokesman. "I don't know this person, we cannot find any records that he was associated with the campaign in any way. I just don't see the connection.
"Arizona is a state where people are firearms owners -- this was just a deranged individual."


But you can't have it both ways. Yes, he has no coherent political philosophy; you can't read much into the fact that he has both The Communist Manifesto and Mein Kampf on his reading list. But if he is so far out of touch with reality, do you really think he came up with his anti-government rants by himself? People respond to what is in the air.

Here is a nice simple suggestion. Let's ask our elected representatives to foreswear gun metaphors in their political discourse. No more cute gunsights on congressional districts, no more "Get on Target for Victory in November. Help remove Gabrielle Giffords from office. Shoot a fully automatic M16 with Jesse Kelly."


No bans, just a voluntary compact. Or would you really have us believe that the only way you can inspire your supporters is with imagery of bloodshed?

Sunday, January 2, 2011

Watching You

Today's excellent report in the New York Times about successes in computer vision really only scratches the surface of what is happening. There are many, many tasks people do by watching or seeing that computers could do, imperfectly to be sure, but well enough to pay for themselves. I am thinking of things like watching for shoplifters (defined, say, as people who leave a store with more stuff than they entered with and did not go through a checkout process). I think one of the developing issues will be how to deal with false positives, when the computers alert authorities to something suspicious and really nothing untoward has happened. Will it be better or worse that the accusations are raised by computers than it would be if they were the result of bigoted, biased human judgments?

The single most interesting story was the last one, talking about the service Google offers to look up camera shots of buildings and works of art in its image database and return information about them:


Google could have put face recognition into the Goggles application; indeed, many users have asked for it. But Google decided against it because smartphones can be used to take pictures of individuals without their knowledge, and a face match could retrieve all kinds of personal information — name, occupation, address, workplace.
“It was just too sensitive, and we didn’t want to go there,” said Eric E. Schmidt, the chief executive of Google. “You want to avoid enabling stalker behavior.”
I am impressed by this show of corporate responsibility. But won't some entrepreneur do exactly this anyway, perhaps on a contract from the FBI or the NFL (terrorists at the Superbowl!) or the government of Singapore? Google may want to organize all the world's information and make it broadly accessible, and good for Google for trying to do that responsibly, but in the long run at least Google will not be the only guys capable of doing that.

Friday, December 31, 2010

The Winklevosses vs. Facebook

The New York Times has a good story on the business page about the Winklevoss twins and their effort to unwind the settlement they reached with Facebook.They claimed that they were deceived about Facebook's value when they signed the deal, and they are owed more than they got.


I am of two minds about this. On the one hand, as a legal matter, it's pretty technical, and depends on who said what to whom and when. I don't think all the emails and text messages have been disclosed and heaven knows what the legal requirements would have been on disclosure at the time the settlement was being hammered out. The twins may have a point. The article states,

"Yet days before the settlement, Facebook’s board signed off on an expert’s valuation that put a price of $8.88 on its shares. Facebook did not disclose that valuation, which would have given the shares a worth of $11 million. The ConnectU founders contend that Facebook’s omission was deceptive and amounted to securities fraud."
Well, who knows. Maybe it is.

But plainly the moral question is being raised again. "The principle is that Mark stole the idea," says one of the twins. And this is where my sympathies tend to go to Mark, for the simple reason that none of these guys invented the concept of a social network or using the Web to construct one, and even if they did, that's no reason for any of them to have exclusive control over those ideas. Those ideas were in the air at the time. So soon we forget! Friendster had almost two million members by October of 2003, and all the social complexities of when to accept friend requests and when to deny them were already the stuff of social discourse (see this Crimson column from the time, "Not a Friendster of Mine," for example). People "steal" other people's ideas all the time; that's the way the process of invention and discovery proceed. The people who succeed are the people who work at implementing the ideas. Bill Gates did not invent microcomputer operating systems, or word processors, or spreadsheet software either; that doesn't make him a thief.

As it happens, I had the sense in January of 2004, before Facebook was incorporated, that Zuckerberg was going to do something in the way of a social networking site, because he put me at the center of a prototype, "Six Degrees to Harry Lewis," in which the links were between people mentioned in the same story in the Harvard Crimson. David Kirkpatrick mentions this in his book about Facebook. (Mark asked me politely--I knew him already because he took the undergraduate CS theory class from me--if I would mind if he made the site public. He wanted to put me at the center of the network because I had been mentioned in a lot of Crimson stories. My response? "Sure. Seems harmless.")

Though it viewed Harvard through a distorted lens, I actually liked The Social Network (the movie) because of the way it toyed with this business of the movement and growth and execution of ideas, and when echoing an idea constitutes theft and when it is is the ordinary commerce in the gift culture that nurtures creativity. To complicate things, the movie throws in a scene in which Zuckerberg seems to be dishonest with his business partner, misrepresenting some documents he is asking him to sign. This is designed to make the viewer skeptical about Zuckerberg's integrity, but whether not this even happened has nothing to do with whether Zuckerberg "stole" the Winklevosses' idea. I tend to think he didn't.

Thursday, December 30, 2010

Neat Tech Products

Writing in the New York Times, David Pogue has a roundup of his favorite technology products of the year. Many of them are pretty unsurprising, which doesn't make them any less useful--a wall plug that adds two USB jacks for power alongside the usual three-pronged 115VAC power sockets. But one I really love is an iPhone app that translates Spanish to English--not a big deal except that you input the Spanish by pointing the camera at a sign, and the output is an image of the same sign with the translation written in English in exactly the same font! What a cool idea. It shows the power that comes when lots of technology building blocks become mature--text scanning, translation (probably nothing more than dictionary look-up, but this particular application domain doesn't require more than that), and some simple image synthesis tricks.

Wednesday, December 29, 2010

Is Wikileaks Like the Pentagon Papers?

Daniel Ellsburg, who leaked the Pentagon Papers, thinks so. Writing in today's Wall Street Journal, Floyd Abrams, who represented the New York Times in the Pentagon Papers case, doesn't. Abrams argues that Ellsburg was principled about revealing official wrongdoing but not injuring U.S. diplomacy. Assange, Abrams argues, is simply opposed to official secrecy in any form, and that, this view of how governments work being wrongheaded and naive, Assange is a bad guy. His acts have actually hurt American journalism by killing any chance of a federal shield law that would protect reporters' confidential sources.

Interestingly, Abrams seems to concur with Assange that he hasn't done anything illegal, if the facts about what he actually has done (merely receiving and not soliciting secrets from individual leakers) are as Assange represents. That being the case, it will be hard to criminalize what Assange did without simultaneously criminalizing what investigative reporters do all the time.

It is crazy that the one thing Assange might do that would make prosecution easy would be to reveal corporate secrets, because he then could be charged with copyright infringement. What a Swiss Army Knife of a statute the DMCA has turned out to be in the hands of creative prosecutors!

I am not sure I buy Abrams' claim that Assange has been indiscriminate and unselective in what he has revealed. (But of course I have only Assange's word about what he has NOT disclosed.)

I think far too much interest has been focused on Assange in this affair. The real question going forward is, what kind of protocols can be developed for sharing secrets within bureaucracies where they need to be shared but limiting access to those with a need to know? This is in large measure a technological problem, made more difficult by the fact that in the technology world, it is no longer reasonable for bosses to be able to do the jobs of the people who work for them. Low-level people therefore have access to enormous databases because they do the grungy work of maintaining computer systems and networks, and their bosses, though in principle more authoritative than these low level geeks are, have no sense of what the geeks are doing.