Slashdot Mirror


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.

26 of 903 comments (clear)

  1. The oldest code in existence: by LGagnon · · Score: 5, Funny

    Genetic code.

    1. Re:The oldest code in existence: by Keeper+Of+Keys · · Score: 5, Funny

      How about a 40 thousand year old year old shrubbery... Ni!
    2. Re:The oldest code in existence: by martin-boundary · · Score: 5, Funny

      Also, the oldest profession is to maintain that code...

  2. Oblig xkcd. by popmaker · · Score: 5, Funny
  3. BSD had a 25-year code still running... by Keyper7 · · Score: 5, Funny

    ...but some insensitive clod recently deleted it.

  4. Re:A rare topic by jacobsm · · Score: 5, Informative

    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.

  5. Alan Turing's First Program by jd · · Score: 5, Informative

    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)
  6. Oldest possible... by the_duke_of_hazzard · · Score: 5, Funny

    1 "Let there be light"
    2 create universe()
    3 while (1)
    4 # I'll finish this up later

  7. Re:A rare topic by WGR · · Score: 5, Insightful

    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 conceptualized 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. As someone who has been programming computers since 1966, I beg to differ with you. Code is more persistent than computers, since one can still run code written for an Intel 8080 on a modern dual core Pentium. The one main difference between programming them and programming now is that the cost of computers then meant that machine efficiency then was more important than human efficiency. Unfortunately too many programmers still think that way and are not willing to put in the code for security checks, clean user interfaces, etc. that are required. In many ways, computer science had a huge regression after the development of microcomputers. Instead of extending the lessons of mainframe computers like the Multics project about security, we returned to the "efficiency" goal because of the lack of power of early micros and still use that mindset when we have IPods that are more powerful than the largest mainframe of 1970.
  8. Ada Bryon's Code by ForexCoder · · Score: 5, Interesting

    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.

  9. Re:Depends on what you mean by code and running... by WGR · · Score: 5, Informative

    FYI: The oldest nuclear plant still in operation began operation in 1969 (Oyster Creek, NJ). There are reactors at Chalk River in Ontario that have been operating continuously since the early 1950's. Most of the world's medical isotopes come from them.
  10. Re:A rare topic by osu-neko · · Score: 5, Insightful

    And why should they? It works. It does precisely the job it was designed to do, and continues to do it at at least the level of ability it originally had, often better if the hardware underneath has been upgraded. Something only truly becomes obsolete when it no longer satisfies today's needs. A well designed, task-specific system could theoretically never become obsolete.

    --
    "Convictions are more dangerous enemies of truth than lies."
  11. Re:A rare topic by Ritchie70 · · Score: 5, Interesting

    Perhaps it's because they're stupid.

    At my job they're replacing a bunch of Tandem code that runs some of our core IT infrastructure with Wintel servers. It makes me ill to even be near the work, because they're taking something that just quietly works and "upgrading" it to something that doesn't.

    For those who don't know, Tandem is a high-availability platform designed to never go down. They had the power off to the building earlier in the year and the Tandem folks weren't sure they knew how to power the system on properly - that's how long it had been running.

    --
    The preferred solution is to not have a problem.
  12. Re:Pioneer and Voyager Comps Receive Uplink Update by Anonymous Coward · · Score: 5, Interesting

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

  13. Re:oldest code in existence by spike1 · · Score: 5, Funny

    Syntax error in line 10

  14. Re:Easy by metalcoat · · Score: 5, Funny

    Internet Explorer?

  15. IEFBR14 by aixylinux · · Score: 5, Informative

    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.

  16. 1968 for me. by lancejjj · · Score: 5, Informative

    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.

  17. Re:A rare topic by kevinmc · · Score: 5, Informative

    //* DELETE FILE FROM PREVIOUS EXECUTION
    //STEP0010 EXEC PGM=IEFBR14
    //OLDFILE DD DSN=MY.FILE.NAME,DISP=(MOD,DELETE),
    // UNIT=WORK,SPACE=(TRK,1),
    // DCB=(RECFM=FB,LRECL=80,BLKSIZE=80)

  18. Re:Jacquard loom by Chief+Camel+Breeder · · Score: 5, Informative

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

  19. Re:Pioneer and Voyager Comps Receive Uplink Update by im_thatoneguy · · Score: 5, Funny

    If you've discovered a way of getting billions of dollars of funding without having any clear objectives, please contact me privately at yeahrightwhatever@gmail.com.
    *cough* missile defense *cough*
  20. Re:Pioneer and Voyager Comps Receive Uplink Update by Haeleth · · Score: 5, Insightful

    one wonders where our technology would be today if we invested more in the space program and less in killing one another
    Sadly, we would probably never have developed any sort of rocket (beyond the toy phase) if they weren't such a darned convenient way of delivering explosives...

    if anyone is offended by that remark I apologize
    Please don't. I for one am fed up of our modern PC climate where everyone is afraid to exercise their right of free speech in case someone isn't mature enough to deal with different views. Save the self-censorship for when you're tempted to shout "Fire" in a crowded theatre, or "Jesus loves gays" in a crowded fundamentalist church, or some other speech act that's actually likely to endanger people's lives.
  21. Re:A rare topic by Anonymous Coward · · Score: 5, Informative

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

  22. Re:A rare topic by Uerige · · Score: 5, Informative

    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.

  23. Re:A rare topic by BrokenHalo · · Score: 5, Interesting


    Back in 1994 I did some contract work for a banking site that was still using some code that another firm I had worked for wrote in 1969, though it wasn't entirely unmodified. The source had somehow disappeared into the great filesystem in the sky, and it was my job to patch the binary directly.

    Sadly, that sort of procedure has pretty much gone out of fashion, along with the Real Programmer. (Sigh) That's why I am no longer in IT...

  24. Re:Easy by SnowZero · · Score: 5, Funny

    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?