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

94 of 354 comments (clear)

  1. It's nice by e12532 · · Score: 3, Funny

    It's nice to see some elegant code in this world of bloated redundant code... Is it me or does it seem that open source is written much more elegantly? Is this just because we can actually see the source :) I'd sit in a corner rocking back and forth if I was forced to read Micro$oft code...

    1. Re:It's nice by TerryAtWork · · Score: 2, Insightful

      That might be the case. I once had a BBS utility out there in the bad world but I never released the source code as it, frankly, embarrassed me.

      --
      It's Christmas everyday with BitTorrent.
    2. Re:It's nice by Anonymous Coward · · Score: 5, Insightful

      How can you tell if something is written elegantly if you cant see the source? Elegant code does not imply well working code and well working code doesnt mean that it is written elegantly. You can have a program that works great and never crashes but is written poorly and does not use the system efficiently. You can also have very buggy code that is written beautifully.

    3. Re:It's nice by josepha48 · · Score: 5, Insightful
      Well I can't see M$ code so I can't say. However the biggest advantage I see in open source is if the API is not clear you can look at the source to see exactly what the f*** is going on. I find this helps the most. (Debuggable, cause you have the code.)

      Also in open source, I find that if I write something someone else may have a mod that they want in it or they may make their mod on the code and then ask me to include it. I then review thier mod and determine the best way to include it in my code. They may also review my code and offer suggestions on how to improve the code. This does not happen all the time at corporations. I can't speak for all companies, but some that I have worked for, it is more important (read moneywise) to get the code done and to the client than to do it right and nicely. (Code review, by someone trying to modify it or by the owner?)

      Lastly in open source, developers are more likely to rewrite code and drop bad API's (gtk1.0 -> 1.2 -> 2.0 just look at the text widget, notebook and a few more) and do it right the second time around no matter how long it takes than private companies. (Rewrites and screw the client they'll get over it!). I think that this is becase in windows it has traditionally been much harder to have multiple copies of similar dlls than UNIX (not impossible, just more difficult, IMHO). Glibc is a good example of shared libs that you can have many versions of. M$ has a tendancy to wrap its API's on top of each other and keep old baggage around so you have no idea of what you are actually calling, or to change the API and then not tell you.

      --

      Only 'flamers' flame!

    4. Re:It's nice by Anonymous Coward · · Score: 5, Insightful

      I think it has to do with pressure of business that causes cruddy code. Often in my company we're asked to write full projects in 60 days or less -- that kind of tight schedule doesn't produce great code. Let's also not forget that open source code "matures", whereas in the corporate environment we rarely touch working code unless it's to add a new feature (in a day or two). It's a crying shame (and I frequently find myself crying), but we are just not allowed the time to go back and make the code "good".

      Rev 1.0 of any software is not as elegant as it could be; even in OpenSource. OpenSource has the luxury of not needing to move on to the next project ASAP to be profitable.

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

    6. Re:It's nice by Anonymous Coward · · Score: 5, Insightful

      "You can also have very buggy code that is written beautifully."

      I guess it depends on your definition of beautiful code. For me beauty is not in the formatting or the intricacy... but in simplicity. The same aesthetic that favors art with clean flowing lines that is punctuated with edges and corners or melodies and harmonies that smoothly slide in and out of each other applies to beautiful software. There are, believe it or not, beautiful pieces of Fortran IV out there --
      they do the job cleanly and efficiently while being easy to read and follow -- elegant. Elegant code tends to be less buggy because you can see what it's doing.

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

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

    9. Re:It's nice by scot4875 · · Score: 3, Insightful

      M$ has a tendancy to wrap its API's on top of each other and keep old baggage around

      Granted, but the 'have no idea of what you are actually calling' part would only be applicable for someone who doesn't read documentation.

      or to change the API and then not tell you

      I call BS. Can you give an example?

      --Jeremy

      --
      Jesus was a liberal
    10. Re:It's nice by Lodragandraoidh · · Score: 2, Insightful

      That must make you feel conflicted - giving your best for something that will not see the light of day.

      I feel that alot of coders *don't* give their all - for fear that their nuggets will be tied up and misused for profiteering via patent/copyright enfringment cases. They hold back their best work for open source or private projects - hence the blecherous state of most code bases. I earnestly pray that is the case, because it is more distressing to think of the alternative...

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    11. 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.

    12. Re:It's nice by spitzak · · Score: 5, Insightful
      Thus code that a programmer knows many others will look at appears to be well-written. This is as good of an argument for OSS as any other.

      I think if you look at a typical closed-source driver written by a hardware manufacturer based on this code you will see some really bad stuff. While open-source Linux drivers, even if based on sample code for other drivers, is a lot better. Closed-source linux drivers seem to be as bad as non-MicroSoft Windows drivers and crash a lot.

    13. Re:It's nice by theLOUDroom · · Score: 2, Informative

      They did announce that change- it was part of (I think) the transition from ODBC 2.x to ODBC 3. If the Devstudio docs still say the length is in bytes that's a documentation error since the API was changed and announced years ago.

      Now I call BS:
      If it's not in the API documentation, then it's undocumented.

      Maybe there's a note about it somewhere else, but things like changelogs are not an API reference. Documentation is meaningless unless it's in the right place. I'm not saying MS did this on purpose, but you've got to concede that he gave a valid example. You were just setting yourself up anyways. Did you really think that no one on /. would have a single example of an undocumented API change?

      Is it really that hard to believe that large software projects can have mistakes in their API documentation? It seems rather obvious to me. Whenever a project gets big enough, there are going to be a few bugs. OSS makes it easier to trace these bugs, because you don't have to blindly rely on documentation (which may be flawed). If something seems awry, you can look at the source. Then you know what you are actually calling.

      --
      Life is too short to proofread.
    14. Re:It's nice by JonK · · Score: 2, Informative
      Here's what's so great - consider:

      printf("%9d%23s%6.2f", int, str, float);

      which will, as you'd expect, print out an integer, a string and a number. Now, what happens when I type (by mistake) this:

      printf("%9d%23s%6.2f", str, int, float);

      The compiler's quite happy with it, isn't it. So, how about:

      printf("%9d%23s%6.2f", float);

      Again, the compiler's quite happy with it. So, that should be lesson #1: the compiler can't help you with printf() format strings. Instead you're on your own - better make sure you got them right. It becomes even more fun when the format string's being constructed elsewhere and then passed to you - better make sure that you and the guy who's coding the format string builder are singing from the same hymn sheet, 'cos otherwise it'll get messy.

      Secondly, what's the format specifier for a complex number?

      printf("%9d + %9di", myComplex.real, myComplex.imaginary);

      Not very pretty, is it? How about a matrix?

      Because you've overloaded operator << appropriately for your custom types, your types can behave the same way as the native C++ ones - this was, and is, one of BS's drivers for the C++ type system. printf() gives none of these guarantees, and imposes a whole heap of extra work on you - plus it's got this artificial model where emitting output to a file is different from emitting it to a buffer is different to emitting it to screen (yes, I know that the last one's not entirely true, but you get the idea). Then you get a second set of printf() functions to handle wide characters, such as you'd find in Unicode, or the MBCS encodings.

      Oh, and why are you using nine lines of couts - you can chain streams (operator << should always return a reference to a stream) so you get, instead of your example above:

      cout << setw(9) << myInt << myString.substr(0, 23) << setprecision() << setwidth() << myFloat;

      or even:

      cout << setw(9) << myInt << setw(23) << myString << setprecision(2) << setw(6) << myFloat;

      Take-home message: wake up in class and start thinking the C++ way - it's not C, and it's not Java either. It's a completely different language - it just so happens that most C programs are valid C++ programs too, and you can use C++ as a Better C, but you're missing out on all the fun...

      --
      Cheers

      Jon
    15. Re:It's nice by z01d · · Score: 2, Informative

      id like for someone to tell me what is just so great about cout (and its similar classes)

      by using cout, you can write the operator<<() for you own class, so the code looks a little bit more elegant than use printf():

      cout << instance;

      printf ("%s", instance.toString());

      and cout can prevent novice programmer to write printf (str); which may leads to unpredictable result.

      further more, cout is a instance of ostream, which means you can take the advantage of so called "polymorphism":

      ClassName::dumpTo (ostream &os);

      you can pass the cout as the parameter, you can use a ofstream too. well, i know you can use fprintf to do the job in C-style. but by write your own class which inherited from ostream, you can dumpTo socket/database/screen...you got the point.

  2. Like DNA? by Overand · · Score: 4, Insightful

    Code that lasts 'forever' and gets passed along, like DNA? How unusual!

  3. Here's some REALLY immortal code by Anonymous Coward · · Score: 5, Funny

    #! /bin/bash

    while true; do
    sleep 1
    done

    1. Re:Here's some REALLY immortal code by buzzsport · · Score: 5, Funny

      ^C

    2. Re:Here's some REALLY immortal code by marko123 · · Score: 2, Funny

      ^Z
      bg

      move along. nothing to see here...

      --
      http://pcblues.com - Digits and Wood
    3. Re:Here's some REALLY immortal code by poot_rootbeer · · Score: 4, Funny


      Immortal? Hardly. I was able to kill it.

  4. What was the point of that article? by jj_johny · · Score: 4, Insightful
    I read it and it says that people buy assets of failed companies and sometimes those assets are - oh mi ga - software code. Well I was as suprised as I have ever been that you could buy the software code assets of failed companies.

    Come on guys this is not a story at all. Good code gets bought and reused. Thats not news thats anti-news (it would be news if people didn't do it). So thanks for alerting me to another article that doesn't matter about anti-news.

    1. Re:What was the point of that article? by Anne+Thwacks · · Score: 2, Insightful
      Good code gets bought and reused

      Generally, if the programmer who wrote it has been laid off, the code is binned.

      --
      Sent from my ASR33 using ASCII
  5. Excuse me? by Anonymous Coward · · Score: 5, Insightful

    No way the code from busted companies gets lost. 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.
    And of course you don't destroy your copies just because another dot bomb has gone off.
    Imho that article is a nice myth...

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

  6. OSS and Immortal Code by Peter_Pork · · Score: 5, Insightful

    One of the true beauties OSS is its immortality. Given the "deep" copying of source code from OSS projects (there're many many repositories), it's hard to believe that we will ever lose any software developed in this way. In addition, good, useful OSS is iterated over and over. Just look at Emacs for example. I like to think that Science and OSS work the same way: result/programs are published and reviewed over and over by other scientists/programmers. Some projects will achieve amazing level of perfection, just as some theories, like quantum mechanics, are exceptionally accurate and useful. It took many iterations to get that theory right, as it takes many iterations to create perfect code.

  7. Elegant code like this? by StevenMaurer · · Score: 4, Funny

    int main()
    {
    printf("Hello world\n");
    return 0;
    }

    Seems like the most well known piece of code in programming history.

    1. Re:Elegant code like this? by JimDabell · · Score: 4, Funny

      So well known that you forgot a bit of it :)

      #include <stdio.h>
    2. Re:Elegant code like this? by PhxBlue · · Score: 2, Funny

      Wot, no commenting? :)

      --
      !#@%*)anks for hanging up the phone, dear.
  8. 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]

    1. Re:Immortal code - which do you know? by Anne+Thwacks · · Score: 4, Insightful
      The BSD TCP/IP stack - this must be the most re-used software ever - its in everything that does internet - and it has the famous BSD licence.

      --
      Sent from my ASR33 using ASCII
  9. 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.
  10. Re:Immortal code by Anonymous Coward · · Score: 5, Funny
    C:\>/sbin/iptables -I FORWARD -p udp --dport 1434 -j DROP
    The system cannot find the path specified.

    C:\>

  11. Hello World, of course! by Amsterdam+Vallon · · Score: 5, Funny

    ... in COBOL nonetheless!

    000100 IDENTIFICATION DIVISION.
    000200 PROGRAM-ID. HELLOWORLD.
    000300 DATE-WRITTEN. 02/05/96 21:04.
    000400* AUTHOR BRIAN COLLINS
    000500 ENVIRONMENT DIVISION.
    000600 CONFIGURATION SECTION.
    000700 SOURCE-COMPUTER. RM-COBOL.
    000800 OBJECT-COMPUTER. RM-COBOL.
    000900
    001000 DATA DIVISION.
    001100 FILE SECTION.
    001200
    100000 PROCEDURE DIVISION.
    100100
    100200 MAIN-LOGIC SECTION.
    100300 BEGIN.
    100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
    100500 DISPLAY "HELLO, WORLD." LINE 15 POSITION 10.
    100600 STOP RUN.
    100700 MAIN-LOGIC-EXIT.
    100800 EXIT.


    *nix.org - Featuring BSD, Linux, OS X, Solaris, & More!

    --

    Reply or e-mail; don't vaguely moderate. Ex-O'Reilly/MIT employee, now a full-time Google employee.
  12. Doubtful by dubbayu_d_40 · · Score: 4, Insightful

    I don't think they talked to many coders. Who doesn't keep a copy of their work, especially if it is good?
    Good code get reused, but in a more organic way...

    1. Re:Doubtful by dubbayu_d_40 · · Score: 4, Insightful

      Good algorithms transcend the media on which they are stored and their language of implemenation.

    2. 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
    3. Re:Doubtful by Salamander · · Score: 4, Insightful

      Good for you. Just last week a guy I was interviewing showed me (unasked) a spec he'd done, as a sample of his work. The copyright/confidentiality notice for a very large company was clearly printed right across the top. Needless to say, I told him to put it away and made sure he progressed no further through the interview process. I'm all for people distributing their own code freely, but I can't condone giving away someone else's trade secrets.

      --
      Slashdot - News for Herds. Stuff that Splatters.
    4. Re:Doubtful by chworktap · · Score: 3, Insightful
      Good point. (Poorly made, but good point).

      The best programmers are the ones who program at least partially because of its intrinsic rewards. Whenever I interview a potential programmer, I always ask them to describe the last coding project they did purely for fun. The best developers I know always have several projects going on in the back of their heads.

  13. YEAH LIKE WATFIV! by Mainframes+ROCK! · · Score: 2, Interesting

    WATFIV (and WATFOR, WATBOL etc) are the classic example in my mind. Made by the University of Waterloo, now languishing somewhere (at Sybase maybe?!)

  14. Who Is the Greatest Programmer? by Anonymous Coward · · Score: 2, Funny
    One of the first lessons that a student learns in his basic programming class is attention to detail. After typing in a program that I've given them, it is not uncommon to hear a number of students claiming that the program doesn't work. I reply, "If it doesn't work, it is because you didn't type it in correctly." This usually results in a great debate until I walk over to their computer and point out the missing parenthesis, spelling mistake, etc. Walla, the program now works!
    input "Your name is?" n$
    for x=1 to 100
    print "Hello ",n$
    next
    print "\n All done!"
    A computer program is simply a set of instructions that tells the computer what to do. Computers are not "smart" like humans, thus they require very specific instructions in order to do anything. These instructions must be entered precisely in a specific programming language (BASIC, JAVA, C++, etc.), and if a command is misspelled or a character is missing, the program will not run correctly (or at all).

    To write a program, it takes knowledge of the programming language, an understanding of logic, the discipline to pay strict attention to detail, and creativity. Programmers marvel as they sit back and watch the computer program "come to life" as it runs before their eyes. In the process of brainstorming, debugging, and thinking critically, they also gain a great respect for those who program on a regular basis.

    In fact, those who do program for a living or for their passion may wonder who the greatest programmer is. After all, programming is a science and art that requires time and skill. Who has the "bragging rights" to be the greatest programmer of all?

    To recognize the greatest programmer, we must first identify the greatest program. Is it Microsoft Word®? Is it Windows®? Is it Linux? Maybe it is the GCC compiler or Emacs. Maybe it is some top-secret program being written at the NSA. Maybe the greatest program is the one created to operate the greatest computer.

    So, what is the greatest computer? This may not seem to be an easy question as super-computer technology continues to improve at a swift pace. However, there is one computer that remains far more advanced than all the rest. We call it the human brain.

    Scientists will quickly agree with me that the brain is far more advanced than any computer we have to date. When you are reading this text, your brain is accomplishing a task that programmers can only dream about - true language comprehension. When you walk out to get a snack or drive your car to the store to refill the refrigerator, you outperform the most advanced computers money can buy. Therefore, is it safe to say that the "program" that operates your brain is the greatest program of all?

    What is this program that operates the brain? DNA. The amino-acid chains that form the DNA molecule store the "blueprints" and the "operating system" not only for the brain, but every cell and organ in your body. This incredible "program" is responsible for the formation and operation of the greatest computer in existence. So, who is the programmer?

    According to some of our great computer programmers, nobody. That's right, the program just happened. It was the random jumbling of atoms and molecules over millions of years that finally resulted in the greatest program and the greatest computer of all kind. We call this evolution.

    Computer programs evolve - we see it all the time. Each time a new version is released, it has hopefully evolved to include new features and bug-fixes since the last version. We are thankful for the intelligent programmers who work hard to improve their programs and add new features. However, how many programs evolve by the random shifting of bytes of data? In all my experience, these program "mutations" either result in either a dysfunctional program or a computer crash.
    In fact, we've been performing an experiment in evolution for years using computers. It is natural for data to randomly be scrambled due to everything from power surges to cosmic radiation. At the rate at which data is transmitted over our world-wide Internet, surely we should have seen some form of natural program evolution, if even on a small scale. According to those who support evolution, man evolved from ape which evolved from lower mammals which long ago originally evolved from single-cell organisms in the sea. Following this theory (and that's all evolution is), simple programs like text editors should someday evolve into operating systems or even some form of computer intelligence. Why don't we see this?

    A great programmer by the name of Richard Stallman wants the world to call Linux by the name of GNU/Linux. He wants the world to know that Linus Torvalds only created a small (but important) part of the overall Linux operating system. Much of what we call "Linux" is based on supporting GNU tools. He wants the credit due him for the intelligent, purposeful design behind the programs used to make Linux a complete operating system. In fact, most programmers would probably not take too kindly to not receiving some form of recognition for their work. Yet both Stallman and Torvalds (and many others) deny recognition to the greatest programmer of all, God.

    If I were to tell you that nobody wrote Microsoft Windows®, or Linux for that matter, but instead it just "happened" due to the random shifting of bytes in my computer's memory, you would wonder if I was attempting some form of dry humor. However, many people so easily accept the notion that both the greatest computer and the greatest program originated in just such a way. Logic dictates that if the simplest of programs requires intelligent, purposeful design, then so does the most advanced and complex program in existence. To say otherwise is foolishness.

    The answer to the question, "Who is the greatest programmer of all?" is quite simple - it is God. It baffles me how programming and atheism often goes hand-in-hand when the programmer shares the very character of God in his creativity and purposeful design. Therefore, it is God whom I honor above all other programmers, because God's "program", His creation, was perfect (not anymore, thanks to sin) and to this day has no equal.

    RMS talks about "Free as in Freedom." True freedom is knowing the creator. As a programmer takes pride in their work, so does God take pride in and love His creation. You are very special to God, and He waits for you to seek Him and find Him. If you don't know God but you would like to, I invite you to visit the Billy Graham website. Billy Graham is one of the most respected evangelists of our century and speaks the straight truth. I also encourage you to talk with the pastor at a local church, or a friend who knows God. Most importantly, talk to God - He's listening.

    "But if serving the LORD seems undesirable to you, then choose for yourselves this day whom you will serve, whether the gods your forefathers served beyond the River, or the gods of the Amorites, in whose land you are living. But as for me and my household, we will serve the LORD." Joshua 24:15
    1. Re:Who Is the Greatest Programmer? by jridley · · Score: 4, Funny

      Walla, the program now works! ...
      Computers are not "smart" like humans, thus they require very specific instructions in order to do anything.


      Yes, humans are able to know what you mean even when you type totally the wrong word, like "Walla".

    2. Re:Who Is the Greatest Programmer? by bmalia · · Score: 2, Funny

      Why did you turn computer programming into bible study?

      2Pet.2
      [16] But was rebuked for his iniquity: the dumb ass speaking with man's voice forbad the madness of the prophet.

      --
      There's no place like ~/
    3. Re:Who Is the Greatest Programmer? by PhxBlue · · Score: 2, Insightful

      I don't agree with the premise that DNA is "the program that operates the brain." DNA is the hardware; my personality, what makes me who I am, is built over that. A gene in my family that predisposes me to alcoholism doesn't automatically make me an alcoholic--it simply means there's an exploit in my OS which may be exploited through excessive alcohol use. The final decision on who I am, however, rests with me.

      True, some people are content to be nothing more than their DNA or their background dictates. But we can reprogram our brains, just as we can reprogram any other computer.

      --
      !#@%*)anks for hanging up the phone, dear.
    4. Re:Who Is the Greatest Programmer? by lyle_hanson · · Score: 2, Funny
      well... now that i've burned karma for no apparent reason...

      No problem, you're a Christian, you don't buy into that karma stuff anyway, right?

      --
      :q!
    5. Re:Who Is the Greatest Programmer? by lyle_hanson · · Score: 2, Funny
      It is natural for data to randomly be scrambled due to everything from power surges to cosmic radiation. At the rate at which data is transmitted over our world-wide Internet, surely we should have seen some form of natural program evolution, if even on a small scale.

      I'd like to introduce you to my friend, TCP Checksum. I don't think it's very probable that you'd see much 'evolution' based on random scrambling, since we're careful to guard against it. However, you should look into artificial life and genetic algorithms... now even atheists can play god!

      --
      :q!
    6. Re:Who Is the Greatest Programmer? by delcielo · · Score: 3, Funny

      Not necessarily true. In India, the man who sells code might be known as the "code-walla." Therefore, his worker-bee might just be inclined to exclaim "Walla! The program now works!"

      --
      Hot Damn! It's the Soggy Bottom Boys!
  15. 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 Frobnicator · · Score: 5, Insightful
      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.
      How about DNA?
      --
      //TODO: Think of witty sig statement
    2. 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.

    3. Re:Oldest working code... by n__0 · · Score: 2, Interesting

      Space war has been running since the 60s I think, on a website somewhere there is an emulation of the original machne running in java using the complete original code. I may be wrong though.

    4. Re:Oldest working code... by Blikbok · · Score: 2, Informative

      http://agents.www.media.mit.edu/groups/el/projects /spacewar/

    5. Re:Oldest working code... by Sinical · · Score: 3, Interesting

      Not exactly out in the wild, but not exactly purely for an industry, are mathematical routines and the like.

      For instance, a lot of aerodynamics code I've seen is written in Fortran IV or Fortan 77. It's often not the nicest formatting and stuff, but Fortran compiles cleanly, and the code still does it's job, so people still use it: it's also easy to interface Fortran and C/C++, which is a bonus. So you build on the core of this hard mathematical stuff that was written long ago.

      Of course, part of that's bad, because there's a chance there're some gotchas still in there that wouldn't be understood anymore, but thankfully a career in my industry is quite long typically, so there's often a gray-haired sage that you can consult.

      I think things that do math (even financial calculations) are more likely to last, because those kinds of operations endure.

    6. 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...
  16. the only truly "immortal" code... by Anonymous Coward · · Score: 2, Funny

    is BAD code, as bad code never dies... right?

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

    1. Re:Lifetime of code... by stripmarkup · · Score: 2, Insightful

      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

      In that case, a "software engineer" would be someone dedicated to designing and building systems by putting together building blocks of code, instead of writing code from scratch. Software would start to resemble other engineering disciplines.

      --
      See charts for twitter trends on Trendistic
  18. The article never makes its point by unfortunateson · · Score: 5, Insightful

    It shows no examples of immortal code. The closest thing they mention is that when Scour got bought, the new company archived the code, but never used it.

    That's hardly immortal, that's entombed.

    Examples of immortality would be things like

    * Bits of BIOS still in use from the original IBM PC through today's pentiums

    * Bits of Multiplan that percolated through Excel

    * Bits of CP/M still floating through Linux

    The article makes a bigger point on how transient software is, and how 99% of what's created is tossed out. How many times, when asked to fix code, do you just rewrite it anyway?

    --
    Design for Use, not Construction!
  19. Duff's Device by Tokerat · · Score: 3, Interesting


    Tom Duff once came up with this very useful yet ugly piece of C code for high-speed blitter routines, or any other instance where data must be moved as quickly as possible.

    I'd post it but the Slashdot lameness filter is just that: It makes posting code like this impossible, therefore making Slashdot lame. :-/

    There is a link to a full explaination here. Damn, if only we could all be this good.
    PS: Yea, I do believe it beats the living crap out of memcpy() or BlockMove() or whatever other routine your using ;-)

    --
    CAn'T CompreHend SARcaSm?
    1. Re:Duff's Device by Chocolate+Teapot · · Score: 3, Interesting
      Judging by your reference to BlockMove(), I take it you are a Mac programmer? In which case, you would gain a lot more by:

      a) Moving 32 bits at a time instead of 16

      b) Use four source pointers and four dest pointers, allowing the pipelining to really scream on the PPC

      c) Consider using Altivec (very Mac specific though)

      d) Lose that f***ing % operator, which will do a lovely job of stalling the integer pipelines while it computes the modulo. ( count & 0x03) does the same thing much quicker.

      In some cases, you can easily beat BlockMove(), especially if you know that your memory was nicely aligned on 4 byte boundaries. However, pit you code up against BlockMove() with mis-aligned data (especially if both the source and dest are on weird alignments) then BlockMove() will whip your sorry ass. My $0.02

      --
      Modest doubt is called the beacon of the wise. - William Shakespeare
    2. Re:Duff's Device by Chocolate+Teapot · · Score: 2, Insightful

      In my other response I omitted the cache manipulation stuff. That really rocks if you get it right. Assembly will seldom beat a good optimiser these days, but a good knowledge of disassembled code will help you write C/C+ code in such a way as to make life easy for the optimiser, whilst still maintaining a degree of portability to your code.

      --
      Modest doubt is called the beacon of the wise. - William Shakespeare
    3. Re:Duff's Device by Chocolate+Teapot · · Score: 2, Interesting
      In my experience compilers (nowadays) are quite good at deciding which to use:
      You would think so, wouldn't you, but last time I looked at this (last year) CodeWarrior didn't do this. Probably an old version I expect. AFAIR though, the Microsoft compiler seemed to benefit from explicitly using & in place of % as well. IMO, it's always worth double checking the disassembled output if the code is speed critical. You never know what a change in a compiler or it's flags might do. (Of course I meant & 0x07, not & 0x03)
      --
      Modest doubt is called the beacon of the wise. - William Shakespeare
    4. Re:Duff's Device by Chocolate+Teapot · · Score: 2, Informative
      Moving 32 instead of 16 is nice, but IIRC the PowerPC can move 64 in one instruction (note this may take 2 cycles)? I cant' find any of my reference material anywhere, but I could have sworn the 604e and higher can move a double straight up
      In my experience, using the FP registers in this way did not yield any performance increase on the PPC. In some cases it was slower.
      I'm not familiar with PPC pipeline optimizations, know a good source of reference?
      I guess Google is the best place to start. Basically though, the PPC (currently) can perform up to four integer operations in parallel and one floating point operation (hence my suggestion that you use four src & dest pointers, adding 4 to each pointer every time round the loop). If your code requires the completion of a floating point operation before further integer operations can continue, then you could be delaying all four integer pipelines.
      AltiVec wouldnt' really offer very much unless you're doing mass mathmatical operations while transfering (add 0 and move 128 bits at once? or does the answer go to a register or the original memory location? can you access memory directly with AltiVec?). Might be nice for some kind of Geiss/G-Force type effects though. Again I'm not familiar with AltiVec in the least, except that it makes complex math fast because it's many mathmatical operations in parallel, and it's only availible on the G4 (and hopefully higher).
      AltiVec needs to obtain it's data from somewhere. Consequently, it has 128-bit load and store operations (last time I looked at BlockMoveData() in MacsBug, I noticed that it used them when available. Check out Apple's AltiVec HomePage for a bunch of useful information. It also covers cache optimisation and memory alignment techniques. This (off-topic) sub-thread has kind of assumed that we are only talking about memory copies. Many of the optimisation techniques discussed also apply to other operations on large blocks of memory (e.g. masked copies). We haven't even touched on overlapping memory blocks :)
      --
      Modest doubt is called the beacon of the wise. - William Shakespeare
    5. 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.
  20. 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.
  21. Unbelievably depressing? by mellon · · Score: 5, Insightful

    Is it just me, or is that story just unbelievably depressing? The writer didn't really acknowledge this - those two people who spent their lives working on Dragon Dictate wound up completely hosed, and can't hack on their lifes' work anymore. I mean, *ouch*!

    1. Re:Unbelievably depressing? by ronfar · · Score: 2, Informative
      I find these types of stories amusing in an ironic sense, much the way gallows humor is amusing (I mean amusing to the person who is about to die). Dragon (which was devoured by the company that later imploded due to massive fraud) gets added to the list of companies that were destroyed when they were transfered from people who had pride and love for what they do into the hands of people who saw them as revenue streams, like Atari, Infocom, TSR Hobbies, and so on.

      You can always understand why the people did it. Warner Brothers assured Nolan Bushnell he would still be in charge of Atari before they forced him out. Many of TSR's problems were caused by Gary Gygax's sneaky venture capital guys (not to mention his vindictive ex-wife and the widow of a former partner). Some of the people at the top of Infocom from the very start were only interested in big bucks and wanted to enter the lucrative business software field and leave games behind. The founders of Dragon thought they would have time and money to pursue other projects related to their interests.

      Another thing, any company with a successful software product needs to be worried about embrace, extend and extinguish, not just from Microsoft, but from other big software companies. Look at Bleem! versus Sony. You'll always have to look over your shoulder for big, politically connected competitors with an unfair advantage in our mercantilist legal system. Money can help here, money can get you through frivolous lawsuits designed not to be won but to drain the life out of you. Money can even help you when your well-heeled competitors use pressure tactics at retail locations if they stock your product instead of theirs. Face it, in software or videogames and in most other businesses small only remains an option if you manage to remain under the big comglomorates and monopolists radar.

      Even a small company can face a hostile take over if any of its operating or startup expenses come from outside sources.

      --
      All the creatures will die, And all the things will be broken. That's the law of samurai. (Jubai, 1605)
  22. The code is not lost by Anonymous Coward · · Score: 5, Insightful

    The code escapes on floppies and CD-Rs. Developers are always swiping copies of good code to take home. Whether they wrote it or not. Good code resurrects itself again and again.

    We all know it happens. Many of us do it. We take code with us and "massage" it for the next job... or a job two years later.

    In they eyes of the law and in the eyes of society, it is wrong. To me and most developers I know, it is right. Nothing will ever stop this practice.

    1. Re:The code is not lost by frozenray · · Score: 2, Insightful

      > The code escapes on floppies and CD-Rs. Developers are always swiping copies of good code to take home.

      If Palladium* makes it onto the developers' PCs by order of the PHBs, these will be fond remembrances. Good for IP, bad for freedom and progress.

      Raymond

      *or whatever it's called today - a turd by any other name is still a turd

      --
      "There are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare." - Blair Houghton
  23. Elegant code by salimma · · Score: 3, Insightful

    Wonder how much well-designed assembler and punch-card code there is out there. While due to being platform-specific most would not be immediately usable, it would be nice to be able to read snippets to explore specific computer platforms for curiousity's sake.

    --
    Michel
    Fedora Project Contribut
    1. Re:Elegant code by hughk · · Score: 2, Interesting

      This is one of the reasons for the projects to emulate historical computers. It doesn't matter whether it is a PDP-11, an IBM 360 or whatever, there is often a simulator out there. The odd thing about it is that due to the speed of modern hardware, you can often run the emulations at the proper speed.

      --
      See my journal, I write things there
  24. the naturally speaking code by MadFarmAnimalz · · Score: 3, Funny

    Left with nothing, Jim and Janet Baker turned to the courts. In a failed attempt to retrieve Dragon from among the L&H assets that were now locked up by bankruptcy laws, they hired the powerhouse law firm run by David Boies.

    David Boies?

    MAN, is that code GONE.

    --
    Blearf. Blearf, I say.
  25. Immortality? (ObLovecraft) by Dr.+Photo · · Score: 5, Funny
    "That is not dead which can eternal lie, Yet with strange aeons, even Death may die."

    Ia! Ia! COBOL Ftaghn!

  26. Everybody Sing Along With Me by Anonymouse+Howard · · Score: 5, Funny

    THIS CODE IS YOUR CODE - you know what tune to sing it to

    This code is your code, this code is my code,
    To California from the south of Finland,
    From the GNU compiler, to the ELF binaries,
    This code was made for you and me.

    As I was trolling the threads on Slashdot,
    In Unreal Tournament, I need an aimbot,
    I saw before me the new KDE,
    This code was made for you and me.

    This code is your code, this code is my code,
    To California from the south of Finland,
    From the GNU compiler, to the ELF binaries,
    This code was made for you and me.

    Downloaded sourcecode, unzipped the tarballs,
    Dot slash configure, then make-installs,
    And all around me, my systems showed me,
    This code was made for you and me.

    This code is your code, this code is my code,
    To California from the south of Finland,
    From the GNU compiler, to the ELF binaries,
    This code was made for you and me.

  27. what about artistic code? by i.r.id10t · · Score: 2, Interesting

    Anyone remember the kernel source stuck between tags that was the color highlighted, so the whole thing was this big penguin? http://www.cc.gatech.edu/~ncb/penguin.html

    --
    Don't blame me, I voted for Kodos
  28. 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.

  29. 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.
  30. Ack! by M.C.+Hampster · · Score: 5, Funny
    ... in COBOL nonetheless!

    My eyes! MY EYES!!

    --
    Forget the whales - save the babies.
  31. Speaking about "deep code/knowledge" by jeorgen · · Score: 2, Interesting
    ...I bought Lernout and Hauspie (LHSP, the company featured in the article) shares in their heyday, thinking the tech was good. But all the technology isn't worth anything if they screw up other parts of their business.

    Incidentally I also bought Tanox (TNOX) at about the same time. Thought they could come up with some interesting immune system stuff. They did, it seems they've made a vaccine approved in Australia for getting rid of allergies (anti IgE). Still their share value lingers in the basement!

    So now twice I've betted on technology, been right, and still lost.

    Check E-trade account:
    LHSP: -99.96 %
    TNOX: -80.99 %

    Seem you need more knowledge than just a bit of tech savy. Bummer.

    /jeorgen

  32. DOS? or what? Clarification requested. by Anonymous Coward · · Score: 3, Funny

    Are we speaking of "immortal" in the sense of vampiric, blood- and money-sucking immortal code(Windows), zombie code(DOS) or of angelic/divine code(my database applications)?

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

  34. 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.
  35. Fear and Loathing by Lodragandraoidh · · Score: 2, Funny

    I think the breadth and depth of Eastereggs in a project is directly proportional to the inelegance of said project. Microsoft excels in this area exceedingly.

    --

    Lodragan Draoidh
    The more you explain it, the more I don't understand it. - Mark Twain
  36. I learned my lesson by Anonymous Coward · · Score: 3, Interesting

    Absolutely. When I went from my first to my second job, I foolishly took none of my source code with me. Since the second job was with the same company as the first, just a different division, I assumed I'd still have access to it. Hah. Many times, I regretted that as I had to re-create an object I should've been able to copy and paste.

    When that division folded and I moved on to the next job, this time I took a little more with me. Just some of the essentials I'd need for my portfolio, though, since I felt at the time that it would be wrong of me to abscond with the company's and clients' IP. I now very much regret that decision, because the company itself is gone and the clients have no access to the source - they're stuck with un-upgradeable software.

    At my current job, I am backing up everything I do. I will never touch or look at it except in case of an emergency, but this time if the floor falls out from under me I will be prepared.

  37. Woody Guthrie on copyright. by EdlinUser · · Score: 5, Funny

    "This song is Copyrighted in U.S., under Seal of Copyright # 154085, for a period of 28 years, and anybody caught singin' it without our permission, will be mighty good friends of ourn, cause we don't give a dern. Publish it. Write it. Sing it. Swing to it. Yodel it. We wrote it, that's all we wanted to do."

  38. tasteful by Anonymous Coward · · Score: 2, Funny
    the campus shaped like a gigantic inner ear.

    The heck with black leather couches - this HAS to be the new gold standard in flameout prediction.

  39. Re:SlashWired by Flamerule · · Score: 2, Insightful
    Sure, they're all interesting, but do we really need the editors to hold our hand and lead us to the biggest and most famous computer/culture magazine?
    At the upper-left corner of http://slashdot.org/, it says "News for Nerds. Stuff that matters." /. receives submissions on news stories the editors believe will be of interest to readers, and posts those stories. These stories come from many different sources, and save readers the task of browsing dozens or scores of websites to get content.
    READ WIRED!
    I read /. so that I won't have to read Wired... and Ars Technica, and C|Net, and any other online news source.
    [...] by SF god Neal Stephenson [...]
    Neal Stephenson is not a god.
  40. Murphy's Law of Immortal Code by russotto · · Score: 3, Funny

    That beautiful piece of elegant code you wrote will be lost in a system crash as soon as you move on, if not sooner. That horrid inefficient kludge you wrote early in your career will be retained forever, and when through the vagaries of the world, you end up at the company which owns that code, you will end up responsible for maintaining it.

  41. The book is freely available, but not the code. by obnoximoron · · Score: 2, Informative

    Moonbird, thats true.
    http://www.nr.com/otherstufftop.html links to some of their public domain code such as wavelet routines, but the rest of the code is licensed. I ought to correct my post as 'freely available code documentation'.
    I had used the NRC routines about a decade ago (our univ department had licensed copies of it) and yes, they were not all gems of programming, but I could use them a basic recipes, starting points for brewing own code.

  42. 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
  43. Re:Here's some immortal code... by rsearle · · Score: 2, Funny

    Unfortunatley, void main() has never been valid ANSI/ISO C. The standard states that main() shall return an int. Also note that the latest standard (C99) requires the type specifier to be present; you can no longer rely on main() defaulting to int.

    Output is not guaranteed to be displayed until either a newline is encountered, or a call is made to fflush(). So it is perfectly possible that the user will never see anything.

    For maximum portability, it is recommended that you return EXIT_SUCCESS or EXIT_FAILURE from main(). So, here is the correct version:

    #include <stdio.h>
    #include <stdlib.h>

    int main(void)
    {
    if (printf("Hello, World!\n") < 0))
    return EXIT_FAILURE;
    else
    return EXIT_SUCCESS;
    }

  44. Unbelievably depressing! by giel · · Score: 2, Informative

    Yes. I find it very depressing. It's because of human nature. I'm not talking about you, me, or anyone in particular but individuals in general. It shows that we are a disgusting bunch of raping, stealing, exploiting, killing and reaping vultures. We do nearly anything if we might benefit from it. It doesn't really matter if it comes down to intellectual property, animals, geologic resources or just the power to rule. We consume and thereby destroy.

    Immortality might be achieved by sharing. Explain why widely published and available algorithms or OSS products and unpatented/copyrighted work outlasts all kind of proprietary and strongly protected software. If an individual gets lost, its properties get lost, just by getting forgotten or falling into the wrong hands, anyway it's lost for the public. In the end the public should decide what is usefull. That's good because only some (brilliant) individuals introduce new ideas and the (average) public should adopt or abandon. That's the way traditions and culture work.

    I'm not against copyright or patent. Copyright was invented only to share visions respecting the one who came up with them. Patents were invented only to prevent people with big resources to produce someones invention at large scale and so run away with the possible profit - correct me if I'm wrong; I always seem to confuse copyright, trademark and patent. Both are very good socialistic ideas, but in a liberal world they don't work. I could simply hire someone to 'steal' ideas. Put a copyright or patent on them before their creator does. And that's what happens at large scale, most contracts disown programmers/developers from their intellectual property involved during their employment.

    Nowadays copying and sharing of ideas has become very cheap. No wonder owners of valuable ideas are scared to share them. But... sharing them is the only way to let them become immortal. If - for example - Microsoft looses its strong ruler it will crumble. Nobody (except those who were involved) will know anything about the structure of the OS. There will be nobody able to adapt the products to new techniques and ideas, because they will be prevented by copyrights and patents.

    We have to deal with a new phenomenon, digital media. The current opinion on 'rights' will have to change in order to get software and information industrie really productive and continues.

    --
    giel.y contains 2 shift/reduce conflicts
  45. TEST before your POST by multipartmixed · · Score: 2, Informative

    On most machines of that era, you would overrun I long before the loop completed!

    Sheesh!

    Not to mention the fact that the program won't finish the first loop, as "** GREG WAS HERE **" is not a legal key word in BASIC!

    (Hint - look at the semi colon)

    --

    Do daemons dream of electric sleep()?
  46. Re:is there anything that a markov matrix can't do by mandolin · · Score: 2, Funny
    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.

    As evidenced by your post to a web discussion board, your implementation is pretty decent; congrats :)