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

8 of 354 comments (clear)

  1. Re:It's nice by Pieroxy · · Score: 3, Informative

    I think a hell of a lot of nice code will never be used. I remember in my former company (a dot-com), the only thing worth a look was the engineering team. Their very nice code (some of which is mine) will never be used considering the useless people in all the other parts of the company (CEO-VPs...)

    The company will probably be - according to the CEO himself - out of business in a couple of month. And all this beauty will be forgotten forever.

  2. Re:It's nice by DeadSea · · Score: 3, Informative

    The code that the article is about is neither concise nor elegant. The article is about Dragon speech recognition software which as miraculously survived several companies and failures. The article refers to it as "deep" code. Code that to hard to do over from scratch. The code in question is archived on 5000 CDs (the version control repository).

  3. Numerical Recipes in C (NRC) library by obnoximoron · · Score: 5, Informative

    http://www.library.cornell.edu/nr/bookcpdf.html
    is a great example of long-lasting heavily reused library of frely available code. I have used the eigenvalue and matrix decomposition routines directly from NRC so many times I lost count.

  4. No! by Moonbird · · Score: 3, Informative

    NRC is (a) not free ... you'll have to pay a hell lot of money if you use the code directly and (b) shoddy code - at least the C code. I think it's just automatically converted Fortran code...

    --

    --
    All extremists should be taken out and shot.
  5. Re:Doubtful by Mr.+Slippery · · Score: 3, Informative
    Who doesn't keep a copy of their work, especially if it is good?

    Those who are afraid of being crushed by lawyers for violating NDAs, that's who.

    Last time I was job hunting I was asked for a code sample...all I could produce was a 2000 line Perl hack I did for my own amusement. Which was about all the Perl I've ever written, I'm a C/C++ guy. But I can't share anyone of the stuff I've done professionally, it's all copyrighted to my employers and trapped under non-disclosure agreements. (Well, some of the stuff I did back in grad school might be publically available somewhere.)

    --
    Tom Swiss | the infamous tms | my blog
    You cannot wash away blood with blood
  6. Re:It's nice by Anonymous Coward · · Score: 5, Informative

    >>or to change the API and then not tell you

    >I call BS. Can you give an example?

    Here you go:

    MSDN Library (which came with Visual Studio), ODBC 3.51 Programmer's
    Reference, API Reference for SQLGetDiagRec():
    BufferLength
    [Input]
    Length (in bytes) of the *MessageText buffer. There is no maximum
    length of the diagnostic message text. If the value returned in
    *MessageText is of a Unicode string (when calling SQLGetDiagRecW),
    the BufferLength argument must be an even number.

    Freshly downloaded Microsoft Data Access 2.6 SDK,
    same ODB 3.51 Programmer's Reference, API Reference for SQLGetDiagRec():

    BufferLength
    [Input]
    Length of the *MessageText buffer in characters. There is no maximum
    length of the diagnostic message text.

    It took me few days to figure that one out.
    Oracle ODBC call was corrupting heap.
    If length is in characters, no corruption.

  7. Re:Oldest working code... by jstott · · Score: 3, Informative
    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?

    Try www.netlib.org. It's all mathematical libraries, the old stuff is all in Fortran, and it does still get used even though some of it goes back to the late 60's and early 70's. Completely debugged code is hard to find, and when you get your hands on it, you hang on to it forever.

    -JS

    --
    Vanity of vanities, all is vanity...
  8. Another person who doesn't understand evolution. by aussersterne · · Score: 3, Informative

    As an anthropologist, I am always stunned by the misconceptions that some people have about evolution (primarily that it's just a one-time random snowstorm of debris that made man and beast out of nothing but mud).

    If you believe, as you seem to, that evolution is about producing something valuable from completely random events and matter, then you obviously have not studied evolution or the theories and hypotheses behind it, but have instead simply been listening to misinformation from the likes of Jerry Fallwell.

    Evolution does not function outside of one important context: the environmental context.

    Given this simple caveat to your post, we can now see that all programs are actually evolving.

    Consider this:

    A code snippet is written. But it doesn't function. What happens? It dies -- it is deleted, removed by its environment (i.e. the programmer and project) because it serves no purpose.

    Another code snippet is written. It works properly. Wow, it ends up in release 1.0! It has survived! It has a long and happy life on the retail shelf.

    But lo, another programmer comes along, sees the original code snippet, and adds to it so that it runs faster. Cool! Though 1.0 was very popular in its time, the 1.0 code snippet is removed and is never heard from again -- it has been out-competed by a new, more efficient snippet which works better.

    The new revision is so good, it becomes version 2.0! Soon it's everywhere; 1.0 is hardly ever seen any longer because 2.0 just works better and 1.0 keeps getting wiped and replaced by 2.0.

    Voila! Evolution.

    This exactly the way that natural selection (and by extension, macroevoluti) work on organic beings in the "real" world. Nature "proposes" a product by the mixing coding ideas (i.e. DNA) from different from individuals (i.e. SEX). If the result doesn't work -- if the code doesn't produce a functioning or an efficient product (i.e. individual) -- then the code dies and is never heard from again. If the code does work, then an efficient, functioning individual is born and survives into adulthood. The code lives! But now new ideas are infused into the code again (i.e. the new individual also has SEX!) and new DNA is born -- another new code snippet in the offspring. And yet again, if the code doesn't produce a viable product (i.e. individual), it eventually dies out -- removing it from the environment -- and it is never heard from again. But if the new code does produce a functioning, efficient individual, voila again! The code lives! Wash, rinse, repeat.

    Every time you or anyone else makes a baby, you are writing a new version of the code. Any time two whales mate, they are writing a new version of the code. The DNA is dancing, folks. If the new product works, it finds a place in the marketplace (the environment). It survives. If it happens to work better than anything else out there (Anna Kournikova, Natalie Portman), it dominates the marketplace and everyone wants a piece of it. As the generations pass, products with better code are better at survival -- getting food, getting attention, getting mates (and as a result, the good code doesn't die out).

    EVOLUTION.

    It's not random at all. It is actually an awful lot like software development.

    P.S...

    Voila! Voila! Voila! Voila! Voila!

    --
    STOP . AMERICA . NOW