32

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.

EDIT

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.

16
  • 37
    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
    Commented May 19, 2011 at 9:54
  • 4
    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
    Commented May 19, 2011 at 9:55
  • 10
    @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
    Commented May 19, 2011 at 10:01
  • 4
    @S.Lott I'm at a loss here... Curiosity? Isn't it fascinating to know that this Windows 7 Ultimate thing some of us are running still has code dating back to Windows 3.1? Commented May 19, 2011 at 10:04
  • 6
    @Anton Gogolev: "Curiosity?" Sorry, that makes little sense to me. If answer was 17%, what then? What follows from that observation?
    – S.Lott
    Commented May 19, 2011 at 10:17

5 Answers 5

36

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.
8
  • 1
    Firefox is full of decade old code, seriously.
    – kizzx2
    Commented May 19, 2011 at 15:58
  • 1
    Hey, it still works (probably) Commented May 19, 2011 at 16:49
  • 1
    @Callum Rogers: It works, but not well, and it is slow... A shame how Firefox has fallen like this.
    – Anto
    Commented May 19, 2011 at 20:06
  • 2
    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. Commented May 19, 2011 at 23:22
  • 3
    @kizzx2 code doesn't rust..
    – user1249
    Commented Nov 1, 2011 at 12:31
27

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

2
  • +100 I actually found this myself a few years ago Commented May 19, 2011 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). Commented Feb 28, 2013 at 17:51
6

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.

0
2

"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.

-2

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.

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