Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Many of you out there work for large companies that ship well-known software. I was wondering, how much of original code (basically, code that was "v1.0" release) is left in modern massive applications, such as, say, Firefox, Photoshop, Windows, Linux, etc? I'd really prefer first-hand experience and real-world war stories.

Thanks for satisfying my curiosity.


Turns out there's a degree of misunderstanding. What I'm after is basically as follows: when you blame/annotate source code, are there any parts or even whole files untouched since the initial 1.0 release.

share|improve this question
A river flows down a mountain. Water evaporates and soaks into the ground. New water arrives from other streams. When the river reaches the sea, is it the same river? How can you tell? What if no single molecule ever makes the entire journey from mountain-top to sea? If no molecule is the same, how can we say it's the same river? And how is this question any more meaningful than the dumb story about the river? –  S.Lott May 19 '11 at 9:54
In case of Firefox, possibly zero - since AFAIK it is a descendant of Netscape 6, which was already a total rewrite of the original Netscape. –  Péter Török May 19 '11 at 9:54
The question starts out OK, but this phrase "I'd really prefer first-hand experience and real-world war stories." is just inviting a list of answers saying "we still have X% of the original code" where X varies from 0 to 100. –  ChrisF May 19 '11 at 9:55
@Anton Gogolev: The point is this. Why ask? My real-world experience includes two products with 80% the same as 1.0 and 0% the same as 1.0. That's my experience. What do you know now that you didn't know before? What problem do you have that's solved? How does this help you? –  S.Lott May 19 '11 at 10:01
@Anton Gogolev: "Curiosity?" Sorry, that makes little sense to me. If answer was 17%, what then? What follows from that observation? –  S.Lott May 19 '11 at 10:17
show 10 more comments

closed as not constructive by gnat, ChrisF Feb 28 '13 at 11:22

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

5 Answers

up vote 30 down vote accepted

More than you'd expect and much older than you'd expect. Even with "total rewrites" and big refactors there are many modules that stay untouched.

Péter suggest that for example you won't find old Netscape code in Firefox. Which is wrong, if you search through source code you'll find quite a few files with disclaimer like:

* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000 

For example in Linux kernel headers you can find things like:

include/linux/if_ppp.h: * Copyright (c) 1989 Carnegie Mellon University.
include/linux/quota.h: * Copyright (c) 1982, 1986 Regents of the University of California. 
include/linux/coda.h:          Copyright (c) 1987-1999 Carnegie Mellon University
include/linux/mc146818rtc.h: * derived from Data Sheet, Copyright Motorola 1984 (!).
include/net/slhc_vj.h: * Copyright (c) 1989 Regents of the University of California.
share|improve this answer
Firefox is full of decade old code, seriously. –  kizzx2 May 19 '11 at 15:58
Hey, it still works (probably) –  Callum Rogers May 19 '11 at 16:49
@Callum Rogers: It works, but not well, and it is slow... A shame how Firefox has fallen like this. –  Anto May 19 '11 at 20:06
The MPL requires that the "Initial developer" thing is added, but it doesn't mean that's when the file was last touched. Firefox has plenty of old code, but not if it's slow - code that is slow enough for anyone to notice gets rewritten. –  Paul Biggar May 19 '11 at 23:22
@kizzx2 code doesn't rust.. –  user1249 Nov 1 '11 at 12:31
show 4 more comments

I don't know how much but old code is definitely there but slowly gets removed. E.g. in windows 2008 or vista go to c:\windows\fonts using explorer, right click on left pane and choose "install new font". The dialog box that is shown is from windows 3.1 days (check screenshot). If you see the same in Windows 7 it is now a much better control panel like UI.

Install New Fonts dialog

share|improve this answer
+100 I actually found this myself a few years ago –  Nicolai Reuschling May 19 '11 at 17:31
Yep, that's... msoOldStyleDialog(?) all right, still supported for legacy programs that are finished and therefore have stayed at 1.0.x. Like a simple file selector. Although in this case it's just a matter of a dialog they missed during the GUI overhaul(s). –  Henrik Erlandsson Feb 28 '13 at 17:51
add comment

I can't tell how old the code at work is. I can only go back to when it was put in Subversion, and there's a lot that dates back that far.

However, I have a friend who has worked on Microsoft Office code. A few years ago, he told me he'd removed some SaveA5World calls from it. That call had a purpose on the old Macintoshes with M680?0 processors, and has served no purpose since Apple went to the PowerPC Macs in the early 90s.

In my observations, any powerful software system that a company relies on was built with technology nobody really wants to use anymore.

share|improve this answer
add comment

"If they did their job exceedingly well from the start, a large part, otherwise a small part."

Strict languages display this trait. Very little has had to change in Nicklaus Wirth's languages, because they were planned with precision. (This has actually changed lately for Delphi, and will change more with the upcoming universal deploy version.)

There is also a flip-side to this, of course. Being deciding that the original code is good enough, such as in the case of Microsoft Windows, or lovely applications like ACDSee, text editors, or the well-known "spirit of Linux" command line applications.

Even though these applications may seem clunky to those who perhaps didn't love them in the first place, they display a well-planned trait as well as a well-defined featureset; even if they don't have bells and whistles, that may be preferred; they do what's on the tin, backward compatibility is great, and are likely to continue to function well in future.

Photoshop would have 90% the same code since 5.0, if you'd go by the featureset. ;P Does it? No. Why? Selling updates. You can't really do more with it today.

The featureset of a file manager, up to the point where it wants to do FTP, web, and cloud is largely the same for any platform for decennia. The only reason such an application still isn't at 1.0 is due to bad planning, whim, an urge to update - and atleast to a small extent the world changing around the application.

The answer is that some gems stay at 1.0 or 1.0.x because the developer has decided on the featureset, completed a bug-free program, and either does not profit from endlessly adding stuff and fixing the bugs in the added stuff, or has moved on to develop more gems.

All else is unlikely to stay anywhere near the code in 1.0. And why shouldn't you rewrite the application if you have a great idea? You should, it's fun to code! :) Except that's not what has taken place in many modern software products. Change for the sake of change (sales) and not motivated by featureset, and to a smaller extent updating to comply with changing platforms, is the order of the day.

And in this soup of interacting pieces of constantly updating software few codebases escape revisions. A few still keep to the dream of foundations and modularizing (and not releasing prematurely), but the vast majority are stuck in the release-fix-update cycle.

share|improve this answer
add comment

Even ostensibly 'cutting edge' systems used for games, like iD Tech and Unreal, would still have a fair bit of 1.0 code in them.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.