Slashdot Mirror


Immortal Code

ziani writes ""... Sometimes a piece of code is so elegant, so evolved, that it outlasts everything else." Nice article at Wired wondering how much great (and lousy) code is lost due to business failures."

11 of 354 comments (clear)

  1. Immortal code - which do you know? by jschrod · · Score: 5, Interesting
    There are code pieces I think might get immortal. Henry Spencer's regexp routines come to mind.

    What other basic code pieces, used in hundreds or thousands of programs, do you know?

    --

    Joachim

    People don't write Manifestos any more -- what's going on in this world? [Frank Zappa]

  2. The Book by s20451 · · Score: 4, Interesting

    I'm reminded of what mathematicians call "The Book". This is based on a quote from Paul Erdos, who said that God keeps a Book in which He writes the most elegant proofs -- as a mathematician, you don't have to believe in God, but you do have to believe in The Book, and strive to make your proofs Book-worthy. Maybe God keeps a Book of Hacks, too?

    --
    Toronto-area transit rider? Rate your ride.
  3. Oldest working code... by Anonymous Coward · · Score: 5, Interesting

    I'm always curious as to what may be some of the oldest "working" code that's publicly available. Code that was written ages ago, but still used today.

    I'm sure that there are other examples, but I'd like to put forward the first candidate of such code: Squeak Smalltalk.

    The reason I put it forward is more because of my knowledge with it. Of course, I may be wrong also, but...

    Anyway, the first time I saw the predecessor to Squeak was back at an Apple sponsored event at college in 1985. They were showing off the Macs and new Mac Plus.

    One fellow there managed to have a copy of the original Smalltalk-80 image that Apple worked on with Xerox. It was a fascinating piece of software.

    That image was sourced from the original work done at Xerox in the late '70s and early '80s.

    When they decided to bring forth Squeak, they started with the original Apple image (which started with the original Xerox image).

    So, I'd like to think, though I don't know, that there are lines of code within that Squeak image that literally date back to the late '70s and have never been changed since. Coded late at night by some hacker at Xerox and simply pulled along with the Smalltalk image, never needing to be tweaked.

    No doubt there are the zillions of line of code still kicking and screaming within industry, but I'm more interested with code that is out in the wild, and still being used somewhat actively.

    Any other contenders?

    1. Re:Oldest working code... by jridley · · Score: 4, Interesting

      There are millions of lines of code running in financial institutions from possibly as early as the late 50's for which the source is lost. That's why there are emulators. I've heard that some places have emulators running emulators running emulators running their original compiled code.

      Much of it may be replaced by now but when i was taking my CS classes back in the 80's I was told this was true.

  4. Lifetime of code... by mseeger · · Score: 4, Interesting
    Hi,

    there are several limitations for the lifetime of code:

    • Hardware lifetime: hardware specific code may loose its usefullness once the hardware itself becomes obsolete.
    • Purpose lifetime: A lot of code serves a temporary purpose. Once the purpose is achieved or dropped, the code will die.
    • Language: A code in an obsolete programming language will probably be dropped as there is no one to judge the elegancy of it.

    Perhaps we should look at it that way: If all good code would and could be reused, more than the half of all software engineers would be ou of duty soon. I think i once read a figure that less than 20% of all code written is "new".

    Yours, Martin

  5. Makefiles by HisMother · · Score: 4, Interesting
    This story reminds me of the old saw that there is only one Makefile; everyone edits it for their own projects. There is grain of truth in that.

    A modern-day analogy might be the line

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    that opens XSL stylesheets -- NOBODY ever types that by hand.

    --
    Cantankerous old coot since 1957.
  6. Re:It's nice by pVoid · · Score: 4, Interesting
    you can't see microsoft code because you don't look.

    Download the friggin DDK from their site, and they have working samples for almost all their core drivers.

    Stripped of a license, the samples in there are as good as OSS.

    And btw, they are nice cleanly coded samples. There is just as much pressure on programmers there to keep that code clean: it's in their DDK, and they don't want to show shody samples. So I'm sure the code review processes are just as stringent.

  7. is there anything that a markov matrix can't do? by AssFace · · Score: 5, Interesting

    That article talks of Baker using statistical probability towards speech recognition.
    That immediately makes me thing of the markov matrix/chain.
    The two ways I would have looked at speech without having read anything on it would be FFT and neural nets, and/or markov matricies (likely also with fft).

    When I first learned to use them in speech generation (either written or spoken) and also general analysis that became my favorite tool to abuse (my hammer making everything look like a nail?).
    I immediately thought of how I could use them in image recognition, game ai, and stock analysis...
    But mostly I used them to post to newsgroups and web discussion boards and then laughed at people responding to them as if they were regular users and usually fighting with them.
    I wrote a Poe generator (would write stories/poems based on his matrix) and also a radiohead song generator.

    Now my current hammer(s) are neural nets and genetic algorithms - but the markov matrix is stuff fun as all hell.

    It never says straight out in the article that Baker uses those - but the general concept that is discussed seems to point at them.
    (and yeah - I know the article was about losing code - but that's boring - what is cool is the code discussed)

    --

    There are some odd things afoot now, in the Villa Straylight.
  8. Voyager by tellezj · · Score: 4, Interesting

    is in its 25th year, and still communicates daily. I'm sure the bus has been running the same code for the whole mission, although I'm sure the payload may have had some code revisions uploaded along the way.

    --

    End of Line.

  9. Re:Excuse me? by On+Lawn · · Score: 5, Interesting

    I'd bet that most if not all coders get themself copies of their code and keep it in their own portfolio to reuse and recycle it.

    I worked for a dot-bomb, and a company that is still around. I erased all of it. Not for security or copyright issues, but becuase there wasn't anything of use.

    Most of the broad purpose code was like re-writing CVS (yes I'm not kidding), or gnu-E. One of my qualms in working for those companies was their hush-hush secretive attitude. And when you get past to find out what the secret is, its like "your doing that? Why not just use this GPL code right here?"

    I realize my experience might be out of the ordinary, but I got rid of it just becuase I had no use for it.

    __________________________________
    OnRoad: Boldly reporting the SUV war from the middle of the road.

  10. Re:Duff's Device by swillden · · Score: 4, Interesting

    Actually, Duff did this the most elegantly in C. However, I had seen the equivalent in assembler much earlier.

    Duff had also seen, and written, the same construct in assembler many times. His Device was born out of frustration that he would have to drop down to assembler to unroll his loop. His fit of genius led him to try to construct it in C, and he was surprised when it compiled without complaint and ran perfectly.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.