There have been some claims that some software developers were paid per line of code written:

I heard that Microsoft has a tradition of needlessly long and complex programs in part because when Bill Gates was starting out, he was paid by the line (rather than by the job or the hour) for codes

Recently, I was told that Microsoft paid its programmers according to the number of lines of code they generated. Is this really true?

so it made sense to managers to count lines of code as a measurement of a programmer's productivity

  • 5
    If Bill Gates was paid per line of code, it would be base on the shortness of that code. He wanted fewer lines, as when he developed his OS, memory space was at a premium. Based on that, I think this is false. – Evorlor Jun 1 '15 at 19:39
  • 1
    @Evorlor: The claim is "Bill Gates was paid", not that "Bill Gates paid". As in that IBM has paid for DOS based on LoC count. Doubtful, though I can imagine that at some point in negotiation they could have used LoC as argument (as a proxy for number of hours spent). – vartec Jun 1 '15 at 20:01
  • 2
    @vartec Please reread. I said "Bill Gates was paid", not "Bill Gates paid". – Evorlor Jun 1 '15 at 20:11
  • 2
    @Evorlor: you say "He wanted fewer lines", but why would that be relevant, if it was IBM who was paying? – vartec Jun 1 '15 at 20:14
  • 2
    @vartec no. And I doubt they were directly. But fewer lines of OS meant more memory left for programs. So indirectly, they paid for it. I never claimed they paid per line. I said if they did, then it would be paid for fewer lines, not more. – Evorlor Jun 1 '15 at 20:33
up vote 36 down vote accepted

This may be a reason for the claim, that "Bill Gates" was paid per line of code:

Ars Technica wrote

OS/2 was plagued by delays and bureaucratic infighting. IBM rules about confidentiality meant that some Microsoft employees were unable to talk to other Microsoft employees without a legal translator between them. IBM also insisted that Microsoft would get paid by the company's standard contractor rates, which were calculated by “kLOCs," or a thousand lines of code.

There's a similar story in Wikipedia's SLOC article,

In the PBS documentary Triumph of the Nerds, Microsoft executive Steve Ballmer criticized the use of counting lines of code:

In IBM there's a religion in software that says you have to count K-LOCs, and a K-LOC is a thousand lines of code. How big a project is it? Oh, it's sort of a 10K-LOC project. This is a 20K-LOCer. And this is 50K-LOCs. And IBM wanted to sort of make it the religion about how we got paid. How much money we made off OS/2, how much they did. How many K-LOCs did you do? And we kept trying to convince them - hey, if we have - a developer's got a good idea and he can get something done in 4K-LOCs instead of 20K-LOCs, should we make less money? Because he's made something smaller and faster, less K-LOC. K-LOCs, K-LOCs, that's the methodology. Ugh! Anyway, that always makes my back just crinkle up at the thought of the whole thing.

Apparently this was a reason why they broke up:

The two companies had significant differences in culture and vision. Microsoft favored the open hardware system approach that contributed to its success on the PC; IBM sought to use OS/2 to drive sales of its own hardware, including systems that could not support the features Microsoft wanted. Microsoft programmers also became frustrated with IBM's bureaucracy and its use of lines of code to measure programmer productivity.[15] IBM developers complained about the terseness and lack of comments in Microsoft's code, while Microsoft developers complained that IBM's code was bloated.


  • 1
    +1, but I'd note that, by 1985, it isn't clear that Bill Gates was personally writing much code. – Oddthinking Jun 2 '15 at 4:11
  • 2
    @Oddthinking Technically too it isn't clear that IBM paid programmers: the quote says they paid "contractors". When I worked at IBM in the late '80s as a contractor, they wouldn't hire/pay me directly: instead they used a recruiter/contract agency (IBM paid the agency who paid me) and agency didn't even pay me: the agency made me create a company (of which I was director and sole employee), so they can pay my company instead of employing me. So it was all based on inter-company contracts. – ChrisW Jun 2 '15 at 9:33
  • The company got paid per line of code that does not mean the programmers did. – Chad Jun 2 '15 at 18:57
  • 1
    @Chad You're right: it implies that MS developers were collectively (not individually) paid by the line. – ChrisW Jun 2 '15 at 22:09
  • 2
    When I worked for IBM in the mid 1990s they were still counting programmer productivity in kLOCs, to the point project teams that reduced the size of their code base during optimisation and Y2K code cleanup sessions were reprimanded for doing so. – jwenting Jan 2 '17 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .