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.
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.
"Firmware" updates have been occasionally uploaded to the Pioneer and Voyager spacecraft when necessary.
Da Blog
One of the original IBM System S360 programs, IEFBR14 is still in wide use today. IEFBR14 CSECT SR 15,15 BR 14 END Only two changes in over 40 years. It doesn't do much, in fact nothing except set a zero return code, but it is widely used for dataset allocation purposes in batch dataset allocation processing.
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)
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.
The US DoD has a system, called MOCAS ("MECHANIZATION OF CONTRACT ADMINISTRATION SERVICES") that was originally brought on-line in 1958.
I'm not too familiar with it, so I don't know if the code has ever been changed -- I suspect the hardware has been updated periodically, probably various IBM mainframes -- but based on my experience with government systems there is probably a fair bit of original code in there that nobody understands anymore, and thus doesn't touch.
There is very little information about the system online; here is an Internet Archive page about it, that's as close to an 'official site' as I can find.
"Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."
Old school devices such as digital watches use ICs. ICs are really nothing more than assemblies of discrete components (resistors, transistors, etc). To count, the device would have to use at least a PLC (Programmable Logic Controller). These devices could be considered to use 'Code'. The next challenge would be to find the oldest device STILL RUNNING.
Great Ask Slashdot!
There almost certainly isn't a line of code in them. "Digital" != "Computer". Digital watches are nothing but a clock, a counter, a display matrix and a little bit of logic for setting/resetting the counter.
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.
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.
Yes there are. The carpet-weaving industry in the UK still uses card-programmed looms (I have a friend who is employed to load card decks into the machines).
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
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
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!
>If there was a power outage, they might not be able to find the guy to turn on the machine? Then it's time to upgrade.
:)
:)
If it's a mission-critical system, then power outages aren't a concern: The system itself will have a UPS capable of keeping the system running for quite awhile once main power drops, and also will have a generator of some sort backing that up as well. It starts up after a specified amount of time, far in advance of when the UPS will fail.
Once mains power drops, and the UPS starts, alerts are generated to those responsible for keeping the system running, and one of the first things that those people will do is call the company that provides their electricity to ascertain the nature of the outage.
From there, they will arrange for additional fuel for the generator, should the outage be prolonged, and most likely will already have such arrangements in place, if they are doing their jobs properly. In addition, they will start alerting the people in charge of the department(s) that rely upon it, and will keep them informed as well, so that they can plan for it being shut down, should such be required.
However, for the most critical systems, plans will be in place for a transfer of services off-site, should such be necessary.
And, again, if it's mission-critical, regardless of its age - all of these things have been planned for, years since, and, if done properly, they are tested on a regular basis as well: Contracts are in place, points of contact as well, and all are updated regularly: Part and parcel of keeping the system running.
And trust me, if all else fails, and it needs to be shut down, then such has been planned for as well, including having "a guy" available to turn it back on, once reliable power is available.
In addition, such things as handling "what happens if it breaks" have also been planned for, and that includes migrating, when such is deemed necessary.
I'm not sure why you got modded up to +5 Insightful, since there's nothing really insightful at all about your post: It reeks of assumptions that simply do not apply in the real world for those of us in IT that actually support mission-critical systems daily, and do so with an eye towards service and availability for those that rely upon them.
But, this *is* Slashdot: Many here think that those of us in IT exist only to thwart them, because we are clueless, and afraid of their superior "skillz", by their estimation.
I trust I've proven that such isn't always the case
Captcha: archfool
That made me laugh - it's an amazingly appropriate summation of my opinion of the parent poster
And I say that with NO anger. If anything, I'm saddened that such a post was found to be insightful by anyone.
is there actually a joke in there?
The joke is that not only it takes four lines of unintellegible gibberish to do with JCL what we would today write as 'rm my/file/name', but also that, against all odds (and all that is holy), it still works today and is used in the exact same way it was used when somebody's grandfather first wrote it.
RNA had you beaten, I guess.
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.
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
There are system/390 mainframes well into their second decade of uptime, with no original electrical part still in place. Every board is upgradable as faster hardware comes along, without downtime, and in some of these systems only the actual frame is original.
Socialism: a lie told by totalitarians and believed by fools.