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."
← Back to Stories (view on slashdot.org)
I have always gotten my story submissions rejected. I must remember to suggest ancient stuff.
It's Christmas everyday with BitTorrent.
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...
Code that lasts 'forever' and gets passed along, like DNA? How unusual!
Yeah....that's why I always my code backward...
Offtopic, but there's an online peition for Palladium or whatever they're caling it now, here
#! /bin/bash
while true; do
sleep 1
done
Refreshing, like the "In modern-day France..." ones.
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.
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...
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.
int main()
{
printf("Hello world\n");
return 0;
}
Seems like the most well known piece of code in programming history.
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]
July 23rd, 1999
The speed of time is one second per second.
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.
The system cannot find the path specified.
C:\>
... 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.
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...
WATFIV (and WATFOR, WATBOL etc) are the classic example in my mind. Made by the University of Waterloo, now languishing somewhere (at Sybase maybe?!)
That one probably survived because it pre-dates those pesky NDAs...
there can be only one.
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
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?
is BAD code, as bad code never dies... right?
This is the third recent posting to Slashdot from the current issue of Wired Magazine: the 'Year the Music Dies' cover piece, the 'Civil War Within Sony' piece, and now this. 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? Aren't we geeks? Let me summarize for the slow: READ WIRED!
If you do need guidance in finding cool Wired articles, check out this 1996 gem on hacker tourism and the laying of fiber optic inter-continental cables by SF god Neal Stephenson, Mother Earth, Mother Board
Intentional Programming
OK, so I thought that this was a poorly written article, but this quote about sums up the stupidity:
"Yet if coders are happy to toss out what their predecessors create, and lawyers are pleased to hear about it (after all, property rotting in the garbage rarely leads to lawsuits)..."
Sure, lawyers hate lawsuits... I still don't understand this...
there are several limitations for the lifetime of code:
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
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!
Unless you are talking about the Clone method of immortallity (copy, paste) in which case you should be retired forcibly.
Andy J Hertzfeld's 68K asm code for various Mac user interface components (we're talking Mac original/ancient stuff now) is a pure joy to read.
It takes a while to comprehend but it's extremely small, sleek and witty.
In some cases, I save source code in the file code by commenting it out. There are some cases where I remove features, but leave the code behind where I think it may be brought back in the future.
Fight Spammers!
I ain't no programmer but one of my colleague wrote a stress-test perl script, that looked something like this :
:-)
while (1 == 1)
{
some i/o, memory, disk-intensive commands
}
It had to run 48 hours on a server before he plugged it on the network, to be sure it was stable. If it survived, well, it was ready !
for DragonDictate~
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?
ZLib is everywhere.
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.
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*!
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.
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
/* This will actually compile, and it uses neat li'l tabs! */
#include <stdio.h>
int main()
{
printf("Hello, world!\n");
return 0;
}
Note to M1-ers: a curt but otherwise insightful message is not "Flamebait" or "Troll".
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.
You had to be artistic...
10 FOR I = 1 TO 1000000
20 PRINT TAB[I]; "** GREG WAS HERE **"
30 NEXT I
40 GO TO 10
If you don't want to repeat the past, stop living in it.
You cannot change the license of GPLized code. Therefore, GPL license is immportal.
Less is more !
1. Start Software Company
2. Spend enormous amount on R&D
3. Sell few copies
4. Downsize company to just you
5. Wait until other companies use your codebase
6. Sue claiming stealing of IP
7. Profit!!!!
Well, I'd post the source, but the lameness filter refuses to take it - not sure if that says anything... If you have vim installed, check this out: /usr/share/vim/vim61/macros/maze/maze.c
That's where it is on all the installations I've seen - YMMV...
For those without, I'll try to describe it best I can - it's C source code that generates a maze, but hears the kicker - the source itself spells out the word "MAZE" in the whitespace! Really, if you get the chance check it out!
It's not my fault - greatness was thrust upon me.
Richard Dawkins, author of The Selfish Gene, would point out that all information, code included, survives, multiplies and mutates like genes. The code is to the gene as the application is to the organism.
Maybe it is time to start reading WIred again, so it is good for people to let us know that it is worth looking at.
See my journal, I write things there
Ia! Ia! COBOL Ftaghn!
"But reusing pieces of code is like picking off sentences from other people's stories and trying to make a magazine article. It might make your point, but not very well."
Ha! Like that would ever happen.
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.
int main()
{
Z: printf("MS is bad...\n");
goto Z;
}
Immortal code would be any of the lame out of date UNIX/POSIX api's which never ever ever get fundamentally rethought into a MODERN api (BeOS or for those geezers out there, mach)
So none of the mods here still see NIMDA/Code red hits.
Hint: Parent is FUNNY (well mildly amusing).
Sheeeeesh.
C'mon, it's insightful.
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
A whole pile of systems, local vs global optimisation, strange attractors, economics and equilibrium things I have not yet completely forgotten, what is left is like the cheshire cat grin from, damn I cannot nail the reference, I am sure it can be googled...
Hey how googleable is a search for functional code with no searchable function names...
Now I am disassociating... but it is slashdot.
Be Free: Free Software Tuition
"Software works best in its own environment so we always take the server." -- Marty Pichinson
A very pragmatic attitude reflecting an unfortunate truth. It can be very difficult to duplicate dev and production environments even when you have people to talk to who set it up in the first place...add in the mystery and history of Company X and you might really be in a bind.
SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
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.
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.
My eyes! MY EYES!!
Forget the whales - save the babies.
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.
Scansoft's CEO is Paul Ricci, a slime-breathing pond-scum who used to be an executive at Xerox. It doesn't surprise me that they are giving the
original creators of the software the shaft. Ricci managed to fail his way upwards out of Xerox, and is probably busy driving Scansoft slowly out of business now.
void main()
{
printf("Hello World");
}
Because they're stupid, that's why everyone does everything.
"Because I have balls like atom bombs, two of them, 100 megatons each. Nobody fucks with me."
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)?
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.
I recently rolled my own Markov chain generator in Perl...it was easier than I thought. I'd always wanted to feed one with the love poems from my community-based love poetry site... people thought Mark V. Shaney was a real guy, though they noticed he cribbed some phrases from their own work.
It's sometimes tough to find good raw input for Markov Chains, (tho not as tough as it was a decade ago...)-- my attempt to use the site's message board was hampered by the way every message starts with another user's username, the recepient of the message.
SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
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.
I'm not sure it fit the title of the /. post very well, but the story was really cool. I hadn't heard an in-depth discussion about the business happenings helped bring Dragon to life and it was just a good read.
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
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.
"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."
1000 SlashDot sigs
The heck with black leather couches - this HAS to be the new gold standard in flameout prediction.
when I've worked at BBN Planet (currently Genuity, in Chapter 11 status, being acquired by Level3), I had to write some code to monitor the end to end Tier1 performance. An asshole who controlled the project (has PhD in math but had no idea that a source code should probably be indented, to say the least) did not want me to spend any time to properly documenting the code, make it modular, easy to maintain, etc. I hope the code I left to them was partially responsible for the current state of affairs at Genuity.
a great source for raw data is the Gutenberg (sp?) project (always makes me think of he Police Academy series).
I used that when I originally got into using the MMs for breaking the Poe Challenge back in '99 (I wasn't the first one, there were at least 3 that did it before me).
That was when I discovered that all of Poe's works and most of his known letters and poems are all online in digital form... makes it easy to get all of his stuff.
When I made the radiohead song generator (or I should say "THE" generator - I have no clue if it is the only one - but the one I wrote at least), it tends to say the same things a lot since there is a pretty small amount of data with which to build the MM.
That is why newsgroups and discussion boards are so much fun.
I would train it on the religious newsgroups and math newsgroups and then have it post randomly to either of them.
Also had a few bots that would post on a fitness discussion board.
There are some odd things afoot now, in the Villa Straylight.
I reconsideried my subscription to Wired after reading this article. The story is presented haphazardly and you are never quite sure what it is about. The code might be elegant and wonderful but this article is not.
Lasers Controlled Games!
Slashdot is supposed to be selective! As in, pick out the "stuff that matters" from all the hype and codswallop.
The Wired article was almost bad enough to be funny. My nomination for most outrageous hyperbole of the month - no wait - let's get into the spirit of the article - of the eon:
"... It's extremely meaningful. It took billions of years to build it. Deep programming is the result of that kind of effort."
I wrote some great code in years past. PL/1, FORTRAN, Assembler (I still have the print out of my first program, framed and hanging on the wall.)
However, it wouldn't be much use even if I still had the code (which I don't).
I just don't happen to have an IBM 2501 card reader sitting around the house.
If you don't want to repeat the past, stop living in it.
the Obfuscated N-queens problem of course!
v =a[j*=v]-a[i],k=i<" \n\n%c"-(!l<<!j)," #Q"[l^v?(l^j)&1:2])&&++- j))&&!(l%=s),v||(i==j?a[i+=k]=0:++a[i])>=s*k&&+ a[--i]);printf("\n\n");}
int v,i,j,k,l,s,a[99];main(){for(scanf("%d",&s);*a-s;
s,j+=(v=j<s&&(!k&&!!printf(2+
l||a[i]<s&&v&&v-i+j&&v+i
+
blah blah blah this avoids the lameness filter blah blah blah truppitipupitup han geoooep fillin what a waste of time..
---
OK dipshit, and just what the fuck does your made-up word "walla" mean?
Perhaps you meant to use an existing word "voila" but are too smug to notice you can't even speak properly?
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.
This piece was actually written by Michael Surran, the man who was featured on Slashdot last week. It is available here
The article was okay, but it was filled with all of those crazy details that writers are always including to make you feel as if you're in the room. Like who gives a flying f&*&# about whether you take a left turn or a right turn to get to the headquarters? But that's the beginning of the story!!!
I hate when writers lard up with stuff like that. They should stick with the meat.
> Mod me down, and I will become more powerful than you can possibly imagine!
Heh heh.
Sheesh, evil *and* a jerk. -- Jade
Martin Aigner and Gunter Ziegler have taken a crack at what a few chapters of The Book might look like. The result is "Proofs from The Book," which is both an excellent tribute to Paul Erdos and a beautiful collection of simple and elegant proofs from several branches of mathematics. It's a great book, and accessible even to those with just a high school math background.
0 678654/
Here's one place to get it: http://www.amazon.com/exec/obidos/tg/detail/-/354
And this is the fourth time I've had to read it. Stop modding it up and wasting space!!! A cut and paste hack I tells ya, not worth the mod points.
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.
The code dates back to the PDP-11 era. You know, 16-bit CPUs, magnetic core memory, UNIX V7, etc. So no, it doesn't take advantage of the 256-bit quantum stabilized hyper-transport bus in your PC.
int main() {
puts("No header needed.");
}
puts() and gets() is unloved, but eh.
A similar cute trick on a 6809 was to set one of its two stack registers to the source of the copy, one to the destination. Then for the amount to be copied pop all registers from the source, and push to the destination (excepting one register for keeping track). The push/pop was encoded in one instruction, and all the remaining registers would be loaded or stored in one cycle per register. You therefore got about 90% bus usage on the copy.
This was used a lot on Radio Shack Color [sic] Computer games to move or scroll graphic frames in a hurry.
Its the kind of translation they probably spent a hours doing with the NRF sources and an undergraduate "learning C/C++" text.
I always rewrote the code using their code as a model. I mean, the technique of QR decomposition, power-of-2 length FFT, these are not copyrightable. And there's only a few ways it can appear in C, with some variation in variable names. I especially did not appreciate their fortran-compatible array indexing. Quite cumbersome.
In any case, that's some code that needs to DIE. If they were going to make all the code from each edition to look the same, the should have just done pseudo-code like Cormen used in "Introduction to Algorithms"
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
...that can't be true: I'm at work, forgot my password (which is safely at home). So I post as AC and I get a +5,insightful. What a bummer. I sure will remember that password from now...
:-) read: my best endless loop and stuff like that).
Anyway, back on topic: Yeah, you're right, that's a case I didn't think of, but it sure as hell has happend to me.
But I think they're talking about "good" code. Nothing against your CVS Second Edition but code like that is another (sad) story.
I don't think that your experience is out of the ordinary. Been there done that. Not with CVS but just as bad as that.
But you can be sure I have copies of everything that is in any way reusable or just interesting (well, in some cases it's just funny
ps: please mod me up, I just got +5 on an ac post. shit.shit.shit. I deserve that karma. It's mine. Please. Pleaaaase.
Wow. Am I pathetic or what?!
There would be sets of matricies that represent that probabilities of state changes, each tied to some internal state (word boundaries?). I imagine these numerous matricies are also very sparse, or that the matrix is updated through some sort of word->word transformation.
I doubt that the a static markov predictor would suffice for guessing phonemes, because it would provide you with too many equiprobable phonemes in your output vector; I (believe) phenomes are close to equally distributed over all speech.
FFTs are used of course to split the voice into energy bands, which are then used as to distinguish the phonemes with varying certainty. It would seem you can't do jack in signal processing without the FFT (unless you can waste CPU time doing a whole buttload of correlation and filtering)
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
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
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
This sounds like my sort of stuff since I mainly program evolutionary code and other esoterica: can anyone reccomend a good web-site?
/. posters!
Yeh I searched google but it sure lists a load of dry math info, give me some more readable info!
Can't wait to code the 'automatic pro-M$ flame generator', sure make life a lot a lot easier for some
This is the best parody lyrics I've seen here since Trollmastah's musings.
I hereby nominate this tune to become the Official Slashdot Open Source Song. If Woody Guthrie were alive today, I bet he'd get a kick out of it.
...the Goggles!!! They do nothing! Nothing!
I had to type this... had TO!
Several algorithms for calculating payroll and other revenue source tax deductions or for calculating pension contributions are mandated by law.
The COBOL code was written and approved, probably before many of you were born, and you're NOT going to change it. Fuggedaboudit.
MSBPodcast.com The opinions expressed here are my own. If you don't like 'em... Think up your own stuff.
Gould's First Law: A sufficiently powerful hammer can turn any problem into a nail.
David Gould
main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
If the "very large company" was a dot-bomb, though, would you have the same qualms?
I've been developing some software (only a few thousand lines, but contains a *ton* of work) for the past few years. If my employer went bust, I'd have no problem with showing that code to somebody else in this (interview) scenario. I wouldn't rush off and decide to GPL it just because it happens that I wrote it and I have a copy, but I'd certainly put it, its feature list and sample output in my portfolio if an interviewer asked what I'd done before.
What am I supposed to do? Say "I've done lots of cool stuff, but I can't tell you about it. Do I get the job?"
If I'd worked on, say, MS Works, I could say so, and depend upon the fact that people remember it. If I've worked for a company who never made it, I couldn't make those assumptions - I'd have to do the whole "the code is good; the business model was bad" thing. The only way to prove that (without refering to a product they know) is to show what I've done.
Of course, if I'd worked for IBM on some proprietary stuff and wanted to move to HP, there would be no excuse for showing HP any IBM code (whether released or not).
Author, Shell Scripting : Expert Re
Actually, I thought the article was about how the suits screwed the techies (yet again).
The woman reminded me very much of the scene in Minority Report Cruse jumps the fence of the techie matriarch... bitter and not all completely there, if you know what I mean.
Is it re-use? Is it theft? How much can you do in C? Honestly? Without dragging in libc and a bunch of other libraries, not a lot.
Ideas matter; coding is just typing. * it's 2am, I can't spell.
Author, Shell Scripting : Expert Re
Who programmed God then? Does this bother any of you believers out there? Is this a stupid question to you guys? This question, simple as it is, never gets answered to my satisfaction. Some say it doesn't matter
I think the nature of creation is one of the most interesting questions we have to answer. Is it an infinite chain of creation, (perhaps a circular one!), or is it just as BORING as saying one infinite being created us and we'll just leave it at that.
semantix
This must be the 3rd Pro-Closed post I've made in 2 days - waargh! - but let's face it, Closed Source programmers *have* to do it, F/OSS programmers *can* do it, but it may be a case of "when I get around to it." Try hacking GnuCash if you don't believe me (failing that, try *installing* GnuCash on LFS - the dependancies just to install it are bad enough, let alone the haiku you've got to crack to get to actually edit the code.
I can't name names, but one proprietary UNIX source is beautiful - in terms of code quality, down to annotation and indentation, and that is only for internal / priveleged partner use only.
Personally, I'm on more of a shell-script level, myself, but one lesson I have learned, is that if you write it well, you can fob it off onto someone else when you're sick of it. Write it badly, and you're stuck with it for the rest of your life!
Author, Shell Scripting : Expert Re
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()?
Well, sometimes you don't.
;)
This one line will run on many unices:
void main() { printf("hello, world\n"); }
Of course, the compiler will whine. Well, depending on what warnings you have enabled.
Do daemons dream of electric sleep()?
Seriously- we all read wired. That's the third post on one page siting articles from a weeks old magazine. Come on.
Writing hello world in C as opposed to BASIC is `artistic'? Maybe if it were written in Malbolge it would be, but C? Next thing you know we'll be calling assembly an ideal language for user extension and writing kernels in Objective-COBOL!
As evidenced by your post to a web discussion board, your implementation is pretty decent; congrats :)
have you seen how many projects are being refactored on sourceforge because of short sighted/hacky designs? I love opensource and most of my tools are opensource, I've even contributed to some projects, but overall it's not elegant and lacks solid documentation. There are thousands of open source projects out there and only a handful are used en mass because of shoddy workmanship. There are also some kick ass elegant solutions like jboss, but the ability to fix what you see wrong ,copy functionality you need, and direct contact with the engineer is what makes opensource great, not some sort of inherent goodness because it's build by volunteers. I'd be willing to bet M$ code is much better documented and easier to read for they have process out the ass, boiler plate headers, business requirements, and code reviews to improve and manage it. I like the oss model better for it makes us the programmers richer for it's harder to use and we can demand higher wages for our expertise in it. I also think the more eyes looking at it will increase readability argument will eventually become true, but is currently marketing hype (projects are being refactored so they will in time be better). Oss is also a new paradigm and is just in the last year getting popular(popular is the operative word), so we're in it's infancy and will just now begin to see some of it's weakness and solutions to those weaknesses as well as unforeseen strengths. But Elegance is not one of opensource software's current strengths.
have you seen how many projects are being refactored on sourceforge because of short sighted/hacky designs? I love opensource and most of my tools are opensource, I've even contributed to some projects, but overall it's not elegant and lacks solid documentation. There are thousands of open source projects out there and only a handful are used en mass because of shoddy workmanship. There are also some kick ass elegant solutions like jboss, but the ability to fix what you see wrong and copy functionality you need, and contact the engineers directly is what makes opensource great, not some sort of inherent goodness because it's build by volunteers. I'd be willing to bet M$ code is much better documented and easier to read for they have process out the ass, boiler plate headers, business requirements, and code reviews to improve and manage it. I like the oss model better for it makes us the programmers richer for it's harder to use and we can demand higher wages for our expertise in it. I also think the more eyes looking at it will increase readability argument will eventually become true, but is currently marketing hype (projects are being refactored so they will in time be better). Oss is also a new paradigm and is just in the last year getting popular(popular is the operative word), so we're in it's infancy and will just now begin to see some of it's weakness and solutions to those weaknesses as well as unforeseen strengths. But Elegance is not one of opensource software's current strengths
Lets not include naturaly ocurrent, random generated one.
IANAL but write like a drunk one.
for (vector::iterator iterBase = you.base.begin(); iterBase != you.base.end(); ++iterBase) {
you.base.remove(iterBase);
this.base.push_back(iterBase);
}
to which a poster replied
I was worried about being able to show a potential employer what I can do, without breaking confidentiality. Also, I wanted to be able to show that I could do more than the immediate job requirements of my previous job. My solution was to put code I'd written in my spare time (GPL'ed) on my website.
Ne mæg werig mod wyrde wiðstondan, ne se hreo hyge helpe gefremman.
Actually the behavior is not the same unless the first operand is unsigned.
-1 % 8 == -1
-1 & 7 == 1
So it can't freely perform that strength reduction.
GCC on i386 will actually convert the % 8 into a multiply! Look at the generated asm if you don't believe me. (It can only do that when the divisor is constant.)
Java: the COBOL of the new millenium.
OSS can be looked at, but is it? Are you sure that several competent reviewers have actually looked at the code and made comments? Are you sure the reviewers comments have been incorporated in the released version? Was one of the reviewers actually competent in the architecture of the product? In security? Is there a record of reviews?
Suppose I told you that in my shop, every piece of code was reviewed by 4 people in writing? That each reviewer had to approve the code before it even went to the next reviewer? That one of the reviewers had to be a security guru? That there was a written vulnerability assesment and security implications section of the review. That functionality was tested by a non-developer tester. That integration was done by a separate group. That there was a written or electronic record of all of this. And that this was proprietary OS code and that people were still productive and happy working there.
OSS isn't all perfect, proprietary isn't all bad. Oh they both can be either, neither or somewhere in between. Usually in between.
Enable was an office suite that allowed multiple windows and cutting and pasting between applications on a DOS platform. Predating windows, it performed well on a 286. It was very popular with the military, IRS and other government branches, until Windows finally killed it. The company was essentially dead in '93, but it limped along, filling the last part of a few long term contracts, until it finally closed it's doors in '97. I worked in tech support and ran their BBS until '95.
The code was hardly elegant. It was written in spaghetti assembler the programmers found almost impossible to maintain, and it got more cumbersome with each new version of the product. The modules were all pretty decent, but none were spectacular. (I still miss the dot report language for the database, though - you could get a lot done with very little code.) It's only saving grace was it provided a lot of power for wimpy computers. As computers got more and more powerful, that became unimportant.
Two years after the company closed down I received a phone call from one of our customers, a developer who had created some very elegant applications in Enable. (This wasn't easy to do, as the development tools were very clunky.) He had bought the hard drive to the BBS and had questions about how it was organized. Turns out he's working for a missionary group that referbs old, old computers, 286s and up, and gives them to communities in developing countries. He's outfitting them with Enable - a copyright violation to be sure, but who cares at this point? The BBS was full of examples of how to do this or that - little database applications, telecom scripts, funky spreadsheets, as well as archived messages bases answering questions about the product. He wanted to make a list of everything available to his end users, and send them whatever they requested via e-mail.
I thought it was rather cool knowing that stuff I did a decade ago, and forgot about, is now being used by someone, somewhere, on an old clunky computer. And Enable, decent software that is horribly, horribly coded, lives on, not because it's elegant, but because it works well on old computers that none of us want any more.
And a virtual mod point to you.
"Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."