What Is the Oldest Code Written Still Running?
Consul writes "What is the oldest piece of code that is still in use today, that has not actually been retyped or reimplemented in some way? By 'piece of code,' I'm of course referring to a complete algorithm, and not just a single line." The question would have a different answer if emulation, in multiple layers, is allowed.
Interesting, a quick search on Google reveals that there isn't much on this topic other than people talking about the oldest computer they have. One post talks about some old IBM Series 1's and S/360/30. One good one is to say the computers onboard some of the oldest spacecrafts like Pioneer 10 (1972), Voyager I and II (1977). Although they haven't received anything from Pioneer 10 since 2002. But you could say that the computer in it might still be running.
Somehow I doubt that many of the people that would be running such old computers such as ones from before 1970 would be reading Slashdot. And if you think about it, people conceptulized computers differently back then. I think you'd be hard pressed to find mention of a specific program but more of mention of a computer itself. Its too bad there is such a big disconnect between the generations of computer programmers and administrators.
...which was implanted in his chest shortly before his escape from the Viet Cong. 1,700 lines of COBOL, and still going strong!
Sadly, it has a Y2K bug. This explains why the John McCain of 2008 is not the same as the one from eight years ago.
Genetic code.
I'd go for the Babbage Difference Engine in the London Science Museum.
There's still code running for nuclear power plants that was written in the 60's or earlier; given the challenge of certifying emulators we ran it on the original machines; embedded code in machinery was probably been older. Although, most really old stuff was mechanical not based on ICs.
Some military hardware may be even older; reliability and certainty is often more important than the latest and greatest.
I'm a consultant - I convert gibberish into cash-flow.
Check the various satellites. Voyager 1 is about 31 years old and significant portions of its programming remain unchanged. It is expected to keep running until about 2020. There are older operational satellites, but I'm not sure which ones were hardwired vs programmable controllers.
And, not only is it still in existence, it is still running!
-k
Generally, bash is superior to python in those environments where python is not installed.
20 Dixit quoque Deus "Fiat firmamentum in medio aquarum"
http://xkcd.com/224/
Knowing full well that I haven't got a clue, my guess would still be microcode embedded in some special purpose device - i.e. not a general purpose computer.
:)
I don't remember when digital watches started appearing, but I suppose there's a bit of code in there? Various industrial machines from waaay back that are still in use ought to be good candidates as well.
Kudos to Consul for a remarkably interesting Ask Slashdot. The best one I've seen in a long while
May we live long and die out
I wonder if there are any Jacquard looms still running.
"Firmware" updates have been occasionally uploaded to the Pioneer and Voyager spacecraft when necessary.
Da Blog
...but some insensitive clod recently deleted it.
I find it amusing that most conspiracy theorists - whether the conspiracies are true or not is immaterial - tend to write long rambling screeds like that that cause people to lose interest after the first sentence, and then use that as proof that the world is against them.
It's all about the packaging.
For linux tips: http://www.linuxtipsblog.com
...because even if the code hasn't been replaced, you can bet the source control software has. My guess would be old cores of for example banking systems, I know there our company has COBOL code written in the 60s and the system is still in COBOL and in use today. If someone wrote a correct, useful algorithm back then it could very easily still exist today. I can at least assure you that they don't exactly do rewrites very often...
Live today, because you never know what tomorrow brings
Once they rebuilt the Manchester Mk. 1 ten years ago, Alan Turing's program became the oldest program runnable without emulation. It clocks in at 60 years old, being written in 1948. The code finds the highest common factor between any two integers expressable in 32 bits. Not bad, given that the Mk. 1 had only one arithmetic operator, subtract.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
1 "Let there be light"
2 create universe()
3 while (1)
4 # I'll finish this up later
The Science Museum has card decks for Jacquard looms that are more than a century old. Bletchley Park has a replica Colossus machine, which needs programming in the shape of switch positions. IDK if the code they use was preserved, or reverse engineered along with the rest of the machine, though.
FANG, from 1972, is probably one of the oldest applications you can still download and run. It's a copying utility for UNIVAC mainframes. UNIVAC Exec 8 was way ahead of its time, with full support for threads, multiprocessors, and concurrent I/O from the late 1960s. FANG was one of the first applications to use that concurrency effectively. You could put in a series of commands to operate on multiple files, and it would do them as concurrently as possible, keeping track of any dependencies in the file copies.
Not quite a cheat, but I'd say that the original instructions used to calculate log tables might be close.
It's code (well, instructions - same thing?)
While it has been retyped many time, I'm sure the original paper-based instructions are still in a library somwwhere, and would work on a suitably old calcuator (hand-cranked, of course)
It's definitely a complete algorithm
politicians are like babies' nappies: they should both be changed regularly and for the same reasons
Ada Bryon's Notes on the analytical engine contains the oldest running code today. It can be run here.
Of course Charles Babbage holds the claim for longest vaporware project at 153 years. And also apparently the longest unfixed bug.
True, but what's really the definition of "still running" for purposes of it being the same code? If you patch one byte, is it the same code? Sort of a Ship of Theseus problem, no?
Done with slashdot, done with nerds, getting a life.
By which I mean production code, not the 'Hello World!' you did in Jr. High. I'll go first. In the mid 90's I wrote a COBOL program to link a mainframe to a HP printer to print transcripts at a uni. The SYSPROG set up the VTAM lines and I glued the PCL together with COBOL. I checked in about 3 years ago and a friend of mine said they were still running it. So at that time it was pushing 10 years. Which makes me proud actually.
Anyone else with a story?
putting the 'B' in LGBTQ+
It came about because the developers of the IBM 360 Operating System suddenly realize a few weeks before it was ro be released that they had no method of actually allocating resources for a job. In a panic, they hacked together a version of their assembler macro language to parse the control statements. so the format of the language was the same as assembler language macro calls
label opcode operands
Spaces were significant, everything had to be upper case, syntax was arcane.I guess they could be, depending on how far you're willing to stretch the definition of computer. It seems quite obvious this the definition used in the question, though. But assuming we somehow agree that DNA is code, you'd still need a religion to refer to it as 'written' instead of 'generated'.
The add font dialog is probably the oldest piece of Windows code still running in Windows... it's from Windows 3.1, and still looks the same in Vista!
What time is it/will be over there? Check with my iPhone app!
It's amazing to me that NASA has the foresight to design such a remote update system years before the concept of a "firmware update" was ever applied to consumer technology. The innovations that have come out of NASA's labs is vastly underappreciated -- one wonders where our technology would be today if we invested more in the space program and less in killing one another (that is _not_ a condemnation of any particular country, pointing fingers doesn't solve problems...if anyone is offended by that remark I apologize).
Syntax error in line 10
Internet Explorer?
I thought he got the artificial heart after he was shot through the heart by Aaron Burr (who was, as Vice Presidents go, a much better marksman than Dick Cheney).
"Convictions are more dangerous enemies of truth than lies."
If by "program" you mean a stored program on what is conventionally meant by a computer today, I have a candidate. IEFBR14 was used on the earliest version of OS/360 in 1964 as a do-nothing program. It is still in use today, unchanged on the latest version of z/OS. Its function is to execute a JCL step which does nothing, but in the process of doing nothing, the job scheduler is invoked. This is one method of creating and deleting datasets (files). It is also the shortest valid OS/360 (and z/OS) program, containing two executable assembler statements and two assembler directives. The comments are mine.
IEFBR14 CSECT START PROGRAM SECTION
SR 15,15 SET EXIT CODE TO 0
BR 14 RETURN AND EXIT
END TELL ASSEMBLER END OF PROGRAM
Interestingly, the first version of this program had a bug, which was subsequently corrected by doubling the program length. It omitted the SR 15,15 statement, which meant that at program exit register 15 had an unpredictable value -- and the program exit code was therefore unpredictable. Since a zero exit code is used to guide the conditional execution of subsequent steps, a failure could be indicated when there was none.
And contrary to another post, I believe there are a lot of people with computer experience predating 1970 who read Slashdot. But I don't want to start a flame war over that.
Of course, it depends on what you count as code and what you count as running.
People have already mentioned DNA, and I guess I'd give that high marks. But maybe we mean things invented by man.
An abacus is a hardware program that is programmable with data and will yield numeric results. So is a sliderule. And there are others like the card sorters for punch cards, which predate programmable computers by several decades and yet performed very useful computation long before general purpose computers. And there are analog computers for predicting the motions of planets or for controlling the locks of the Panama Canal. But maybe we meant code implemented in software.
The Babbage Machine is mechanical so if it stops, does that mean the machine has crashed or does it just have a long cycle time? People have mentioned that, and that's certainly a worthwhile contender.
Mathematics also codes up algorithms, some of which are extremely old, and some of which you might regard as code, and so there might be something there that's competitive. But in a forum like this, full of nerds, I think "math" is too easy an answer and isn't provocative enough to get people thinking, so I'll go with this one:
My personal favorite is just something done in human language. Human language has codified the execution structure of organizations and processes for quite a long time. The US Constitution defines an engine that runs the United States, for example. Roberts Rules of Order is a program that is an interrupt-driven system that runs meetings. Contract law in the US (and perhaps world-wide) reminds me a lot of the structure of bootstrapping TCP (reliable transport of packets under a contract) from unreliable pieces (the contract terms and offers); the whole business of how you can send an offer and what constitutes acceptance in the face of data loss and things arriving in the wrong order is very much analogous to what you see in modern networking systems, but just used to work via pony express instead. So I'd put my vote on one of those. I just don't have the time to work out the timelines to figure out which one came first... probably something in English Common Law. It also depends on whether you want a "framework" or a "packaged application" or whatever, because some of these I've mentioned are in different categories in that regard. These may not be quite as old as some mathematical algorithms, but I bet they're more overlooked.
Now that I think of it, though, I bet food recipes (which are algorithmic in nature) predate even the earliest work of mathematicians, and it wouldn't surprise me if the recipe for making hot tea is the oldest, even if it's been upgraded a few times for changes in available hardware.
Kent M Pitman
Philosopher, Technologist, Writer
Just a few weeks ago, one of my guys was looking at an old system that we have running. It is an old IMS application running on an IBM mainframe used to manage some factory equipment. We want to replace that system (even though "it just works"), so my guy was looking into it to see how it worked, as documentation is, of course, non-existent.
The source code was written by my first CIO in the mid 1980s (who retired in the early 1990s), and it had a comment at the top which stated that it was created in January, 1968. It is quite sloppy... clearly before anyone thought about writing pretty code. There is no doubt in my mind that it was originally written on coding forms, and subsequently loaded into a machine via the long-defunct keypunch department. The program, of course, is running on much newer hardware now, but the code that is running was written in 1968.
I speculate that there is a bunch of older code outside of my company.
"Firmware" updates have been occasionally uploaded to the Pioneer and Voyager
They had to, because Voyager kept calling itself "Vger".
Table-ized A.I.
1. The US air traffic control system is 1960s vintage and I'd bet that there's still code in it that is unchanged since it was written.
2. Some airline reservation systems are of equally antique origins. Although I'm sure the hardware has been updated in the ensuing years, I'd say there's probably a lot of code that hasn't been rewritten. Back in the '80s when I was doing some work with an airline and asked about that, I was told, "That code is older than you are."
3. Don't know if this is still the case, but back in the late '70s, Navy carriers had computers so old that they were having to scrounge up germanium transistors to keep them operating. They wanted to keep them operating because nobody wanted to pay to rewrite the gazillion lines of reliable and tested assembly-language code that ran on them. If any of those are still around, they'd be my top candidate for having unchanged code still in operation. I'd guess that, in general, military systems (of the non-COTS [commercial off-the-shelf] type) are the most likely "oldest code" candidates, because of the lengthy and expensive qualification process and the long service life of such systems.
The Harvard Mark 1, http://en.wikipedia.org/wiki/Harvard_Mark_I, still runs periodically throughout the day in the Harvard science center, IIRC. It was delivered in 1944.
EvilCON - Made Famous by
We probably wouldn't be as far along. Military technology, especially in times of conflict, has resulted in a great deal of progress. Among other things, there's clearly defined failures (eg, someone defeats your army in battle or you have to abandon some location or policy). In comparison, what's failure in space development? It's obvious when things blow up. But what happens when things just aren't done? Is that a failure or just something that can't yet be accomplished? As I see it, it's far easier for a space program to plug along without any real measure of success and failure. That has complicated our efforts to do things in space.
I saved this post from alt.folklore.computers. Terribly impressive. I'm
not sure his age estimate is necessarily accurate -- the final
incarnation of the Leo ceased to be manufactured in the later half of the
60s.
I don't know if some modern incarnation of the Orange Leo made it past Y2k. If it did, my guess is it will still be around for a long time...
From: Deryk Barker
Subject: Re: Multics
Newsgroups: alt.folklore.computers, alt.os.multics
Date: 1998/11/09
[*snip*]
When my wife was working for Honeywell, in the 1980s, one of the
customers she had dealings with was British Telecom.
BT, at one location, had what they called the "orange Leos".
Now, for those who don't know this, the LEO was the world's first-ever
commercially-oriented machine (1951). Even more amazingly, the Lyons
Electronic Office was designed and built by the J Lyons company,
best-known as manufacturers of cakes and for their nationwide chain of
corner tea shops.
Anyway, an "orange Leo" was an ICL 2900 mainframe (they came in orange
cabinets), emulating an ICL 1900 mainframe, emulating a GEC System 4
mainframe emulating a LEO.
30+ year old executable code over 3 architecture changes....
My uncle used to run embroidery machines in union New Jersey. These were built in the late 1800 and were about 100 feet long 10 feet wide and 2 stories tall with 1000's of needles stitching constantly. Literally were built as part of the building they were housed in.
Where it gets interesting is these were driven by a large mechanical computer that ran from paper punch cards. The device itself was about a 1 meter cube. There were adders, and carry, multiples, and I think even branches and loops. It used to move paper cards back and forth as it created post man patches or frillies part of ladies undergarments.
Don't know if this counts though and I think it's decommissioned anyhow, but it was sure was cool to watch.
I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso
Sort of depends on definition of "still running". If you mean in use when necessary and essentially an unchanged algorithm and logic, we have a lot of FORTRAN code written in the early 60's still running in daily use. I predates Fortran IV, but I would suspect that the same code started in ALGOL and They are generally math function routines (convert Euler Angles to Quaternions, that sort of thing). Originally it was on cards but then implemented into files. I still have some of the card decks. I would guess that with some work I can find some older than that (that is character-wise identical except for the comment cards).
Brett
Most likely not the oldest code running, but how about, perhaps, the oldest widely distributed code, and still being distributed, running code.
Squeak is not just "a" Smalltalk implementation, but it is also, in many ways, "the" Smalltalk implementation.
I may be completely wrong about this, but it makes a good story nonetheless, so I'll make my case.
Back in the late 70's, the group at Xerox PARC were working on what would become Smalltalk-80. An interesting artifact of the Smalltalk implementation is that rather than being developed as individual facets of source code that are then compiled in to a final distribution, like a C program for example, Smalltalk is distributed and developed by directly making changes in to a running image. At times, that image is replicated and copied to other users.
Smalltalk can certainly be, and is, distributed as solely source code. But even today I do not believe there is a Smalltalk system that can be built from the ground up purely from source code. They typically rely on an instance of an image of Smalltalk to start with.
At the minimum, this is how the PARC Smalltalk-80 is developed.
Since Smalltalk was written on top of a VM architecture, in order to port Smalltalk from one machine to another, you only have to port the VM itself, then an existing Smalltalk image would run on top of that VM. So, the easiest way to port Smalltalk was to start with an existing Smalltalk image, and a VM spec.
In essence, the VM spec is exactly what the famous "Blue Book" was. It was the documentation of the Smalltalk VM.
While PARC released Smalltalk-80 on to the world in 1980, via the August issue of Byte Magazine, they also managed to work with four different companies who were also interested in the Smalltalk technology. One of those companies, as many may well know, was Apple Computer.
In order to facilitate the bootstrapping effort, all of the companies were given an existing Smalltalk-80 image which they would use on their own internally developed Smalltalk VM. At this point, this Smalltalk image could well be considered to be a copy of the original Smalltalk image that PARC itself was using for internal development. Xerox's master, base Smalltalk image.
I personally saw this image running in 1985, when an Apple employee demonstrated it to me at a Mac show being held on our university campus. It was a very enlightening experience. And for anyone who has read the "Orange Book", this image showed the exact same system as documented in that book, with it's browsers, workspaces, inspectors, scrollbars and pop up menus.
Fast forward to the mid-90's, when Squeak was announced to the world.
Squeak is a portable Smalltalk runtime and image, written within itself. It is self hosting and a "full blown" Smalltalk environment. The Smalltalk used to create the VM is a specific subset of Smalltalk that can be compiled down to C, linked with some system primitive functions, and compiled to be hosted on any of several systems. Once the VM is ported, the image "just starts". Squeak is widely ported.
Squeak is a direct descendant of the Apple Smalltalk effort from the early 80's. In fact, it's being build by the same folks who worked on the original Smalltalk at PARC. The early goal of the project was simply to get a portable VM to run the standard Smalltalk image. And by standard Smalltalk image, I mean Apple's Smalltalk image, which is a direct copy of the the image used by Xerox in Smalltalks infancy.
What I assert, though I cannot prove, is that there is code, and perhaps even large chunks of code, within the modern Squeak image, that was placed there by the original authors pushing 30 years ago. I argue that the code is still there, and that it could be code that worked so well, there has not been any call to change it in all these years.
Now, it's fair to assume that the actualy byte codes may not be the same (I imagine they're not, minimally at an object pointer level), but whatever byte codes we have
"Wise men talk because they have something to say; fools, because they have to say something" - Plato
If we're counting earth-bound code, I was going to vote for "DNA."
512 MB RAM, 20 GB disk, 200 GB transfer, five datacenters. $19.95/month.
For that matter, how often does it need to run in order to be "still running"?
If you run the oldest piece of hardware with the earliest software ever written once or twice per decade for historical reasons, is that code "still running"?
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
Sputnik 1 was in orbit for only a few months.
.sig withheld by request
Believe it or not, the Jaquard Loom - 1801 (which is still in operation today), is the oldest known powered, programmable 'computer'. It's output is not text or numeration, but textile. :)
If there is a hole (or binary 1), it allows thread to go through. So it is digital and not an analog computer. http://en.wikipedia.org/wiki/Jacquard
It is debatable if it is a computer, but the original post wanted to know about code running today.
Well the code is there as punch cards. Each set of cards can make a particular pattern in textiles. Copies of the code still run today.
Also, Babbage wanted to use a similar punch card system to program his engines.
Now if we are talking analog computing 'code' then that is a different story.
It's all there folks!
Don't be apathetic. Procrastinate!
Comment removed based on user account deletion
RNA had you beaten, I guess.
I think that "RNA" was actually in use even earlier and is still used a bit.
http://en.wikipedia.org/wiki/RNA#RNA_genomes
https://en.wikipedia.org/wiki/Inverted_totalitarianism
The oldest extant computer architectures are IBM System/360 (now called System z, but able to run object code from the 360) and Burroughs B5000 descendants (now called Libra). Both architectures date from the early 1960s (1964 for the System/360 and 1961 for the B5000), so we can guess that the oldest running programs date from the same period, or about 40 years ago.
This also fits well with one of the unwritten requirements of the questions: that there be a language in which to write the lines of code. The earliest computer languages (LISP, COBOL and Fortran) date from only a few years prior to the introductions of these systems (LISP was invented in 1958, COBOL in 1959 and Fortran in 1957).
This also fits well with a couple of long lived software systems with which I am familiar: The IRS tax return processing system dates from 1964, written in a combination of COBOL and System/360 machine code, it only now being replaced by C++ code (the project is called CADE and has been featured in a number of newspaper articles over the past 10 years as a monumental failure). The airline reservation system, SABER, dates from around 1960 and has been in constant use since it went live in 1964. While SABER was originally written for IBM 7090 mainframes, it was transitioned to System/360 in the early 70s.
Embedded systems aren't a consideration at this time scale (the first microprocessor didn't appear until 1971), so we don't need to worry that some washing machine from the 1950s is still running some program written at that time. Still, it sounds like the oldest running programs must be about 50 years old.
just a ghost in the machine.
Actually - it wasn't always this way, although this technology was deployed fairly early in the space program.
I remember reading an article about one of the earliest Mars probes. Both the US and the USSR launched probes around the same time. However, when the probes began to approach Mars a huge dust storm ensued obscuring most of the surface for quite a while. The US probe was reprogrammable, while the Russian probe was not. The US was able to put their probe into hiberation during the storm, while the Russian probe expended its energy relaying photos of haze.
So, the value of this ability was proven fairly early in the space program. I'm not sure what the timing was relative to Pioneer but it almost certainly predated Voyager.
yeah, communicating effectively with people instead of flaming them is certainly cause to get "fed up".
When you try to express a concept that might piss people off, and you aren't trying to piss people off, saying so and expressing sensitivity to their beliefs isn't "PC", it's basic technique of a civilized person in conversation.
note the word "civilized" typically connotes that you are attempting to be a civil person. While being an opinionated asshole is easy and fun (believe me, I know!) it is not effective communication unless your goal is to intimidate your listeners.
I share your impatience with people with thin skins; I also share on a personal level your disdain for those people's "maturity". but the fact is, people are different, and some people have thin skins for legitimate reasons you have no knowledge of. recognizing that is simply showing your listener that you have a basic respect for them as a human being, and it typically goes a lot further to achieve final understanding that just beating them about the head with their own "hot buttons".
in short, showing a little respect, deserved or not, is what it means to be civilized, IMHO. I don't always follow this. But whining about PC stuff is old and tired. Yeah, some people suck and are stupid and wussy; and it's still cool to be cool to people, by and large.
the NASA/JPL spacecraft was Marinner 9, the USSR spacecraft was Mars 2 and 3 in 1971 http://mars.jpl.nasa.gov/missions/past/mariner8-9.html
----- The man who trades freedom for security does not deserve nor will he ever receive either. -- Benjamin Franklin
DNA is in a more or less constant state of "editing". But yeah, there are trees that are almost 5000 years old which presumably haven't evolved in that time.
Ah, so it's like Emacs?Essentially they just modify the executable itself rather than having the code and recompiling it. The types of people who do this also tend to be good at things like debugging programs by reading a raw core dump. From the quintessential article on the matter: "For this reason, Real Programmers are reluctant to actually edit a program that is close to working. They find it much easier to just patch the binary object code directly, using a wonderful program called SUPERZAP (or its equivalent on non-IBM machines). This works so well that many working programs on IBM systems bear no relation to the original Fortran code. In many cases, the original source code is no longer available. When it comes time to fix a program like this, no manager would even think of sending anything less than a Real Programmer to do the job-- no Quiche Eating structured programmer would even know where to start. This is called "job security"." http://www.pbm.com/~lindahl/real.programmers.html