How Mainstream Can Code Scavenging Go?
The time-honored tradition of code scavanging has long been a way for new programmers to "break in" to a new language or task that they may not want to build from the ground up. The re-use of old code, cleaned up and tweaked to a new purpose can help developers learn many useful skills and accomplish tasks quickly, especially for small tasks that aren't of vital importance. One blogger wondered if this process could be formalized and tools could be built to help foster and enable code scavanging on a mass level. Is this a viable option, or are there just too many things to consider?
A few years ago, while browsing around the library downtown, I
had to take a piss. As I entered the john a big beautiful all-American
football hero type, about twenty-five, came out of one of the booths.
I stood at the urinal looking at him out of the corner of my eye as he
washed his hands. He didn't once look at me. He was "straight" and
married - and in any case I was sure I wouldn't have a chance with
him.
As soon as he left I darted into the booth he'd vacated,
hoping there might be a lingering smell of shit and even a seat still
warm from his sturdy young ass. I found not only the smell but the
shit itself. He'd forgotten to flush. And what a treasure he had left
behind. Three or four beautiful specimens floated in the bowl. It
apparently had been a fairly dry, constipated shit, for all were fat,
stiff, and ruggedly textured. The real prize was a great feast of turd
- a nine inch gastrointestinal triumph as thick as a man's wrist.
I knelt before the bowl, inhaling the rich brown fragrance and
wondered if I should obey the impulse building up inside me. I'd
always been a heavy rimmer and had lapped up more than one little
clump of shit, but that had been just an inevitable part of eating ass
and not an end in itself. Of course I'd had jerk-off fantasies of
devouring great loads of it (what rimmer hasn't), but I had never done
it. Now, here I was, confronted with the most beautiful five-pound
turd I'd ever feasted my eyes on, a sausage fit to star in any fantasy
and one I knew to have been hatched from the asshole of the world's
handsomest young stud.
Why not? I plucked it from the bowl, holding it with both
hands to keep it from breaking. I lifted it to my nose. It smelled
like rich, ripe limburger (horrid, but thrilling), yet had the
consistency of cheddar. What is cheese anyway but milk turning to shit
without the benefit of a digestive tract?
I gave it a lick and found that it tasted better then it
smelled. I've found since then that shit nearly almost does.
I hesitated no longer. I shoved the fucking thing as far into
my mouth as I could get it and sucked on it like a big brown cock,
beating my meat like a madman. I wanted to completely engulf it and
bit off a large chunk, flooding my mouth with the intense, bittersweet
flavor. To my delight I found that while the water in the bowl had
chilled the outside of the turd, it was still warm inside. As I chewed
I discovered that it was filled with hard little bits of something I
soon identified as peanuts. He hadn't chewed them carefully and they'd
passed through his body virtually unchanged. I ate it greedily,
sending lump after peanutty lump sliding scratchily down my throat. My
only regret was the donor of this feast wasn't there to wash it down
with his piss.
I soon reached a terrific climax. I caught my cum in the
cupped palm of my hand and drank it down. Believe me, there is no more
delightful combination of flavors than the hot sweetness of cum with
the rich bitterness of shit.
Afterwards I was sorry that I hadn't made it last longer. But
then I realized that I still had a lot of fun in store for me. There
was still a clutch of virile turds left in the bowl. I tenderly fished
them out, rolled them into my handkerchief, and stashed them in my
briefcase. In the week to come I found all kinds of ways to eat the
shit without bolting it right down. Once eaten it's gone forever
unless you want to filch it third hand out of your own asshole. Not an
unreasonable recourse in moments of desperation or simple boredom.
I stored the turds in the refrigerator when I was not using
them but within a week they were all gone. The last one I held in my
mouth without chewing, letting it slowly dissolve. I had liquid shit
trickling down my throat for nearly four hours. I must have had six
orgasms in the process.
I often think of that lovely young guy dropping solid gold out
of his sweet, pink asshole every day, never knowing what joy it could,
and at least once did, bring to a grateful shiteater.
So, how quickly would you run afoul of Intellectual Property laws doing this?
Watch the Teaser Trailer for "The Lightning Thief" Her
...since they obviously aren't going to be using it for much longer...
Generally, bash is superior to python in those environments where python is not installed.
In A Deepness in the Sky, Vernor Vinge posited Programmer Archaeologists would replace all new development. http://everything2.com/index.pl?node_id=760521
Madness takes its toll. Exact change please.
like cpan and ruby gems etc
we scavenge code online w/e, find it needs to be used by a lot of people
so we inherit the scavenged and put it in a nice module and tada!
this is nothing new
back in the day we didnt have no old school
You write program A ... eventually you refactor it and turn parts of it into cleaner modules.
You can then use those modules in other programs.
Some people are already doing this, such as koders, code fetch, codase, and snippets. Talk to them for formalizing as I'm sure they have some good input.
The Web 2.0 crowd rediscovers subroutine libraries. Film at 11.
http://code.google.com/
I guess this is slow news day. Using bits of code without writing everything from scratch - how novel! How controversial! Is there anyone who doesn't do this? What kind of skull-shattering boredom do you have to endure before you start writing blog entries about this?
And the first article suggests that trusting the code is an issue, because you didn't write it. Well let's see - it's short, and you just pasted it into your program. But you're not going to bother to read it? You fail. Seriously.
I always mod up spelling trolls.
Code reuse has been tried but cowboy programmers and the NIH syndrome strike every time. Besides algorithm reuse would be a better path to take.
Isn't this, you know, a library?
Why don't you scavenge the dictionary to spell properly?
Since..when? Recently I've picked up perl again, and I've found more than what I need to scavenge to make my own personal extensions to blosxom through google searches.
I mean, granted, it depends on your definition of a bite-size task, but it's a blanket statement no matter which way you spin it.
Isn't that basically the point of a linkable library?
Proud member of the Weirdo-American community.
If only there were some computer programming language that had built-in support for some kind of a Comprehensive Archive Network, that would be the best.
... hmm ... "import" the things you need from the Comprehensive C++ Archive Network!
Maybe the C++ language could do it. Then you could just
Hmm, CC++AN sounds pretty dumb. It'd never catch on. Oh well.
We recently had heard in the office over one of the Yellow Machine that's made by Anthology Solutions.
Today Slashdot jumped the shark.
Seriously. I'm starting to lose brain cells when I read the "articles" these days.
It's called Google.
What a great new idea! Maybe we could put all of the scavenged code into a container and call it a "library". Wiyth brilliant ideas like this software is going to advance by great leaps and bounds. No more reinventing the wheel, or constantly rediscovering ancient ideas.
I have again been the victim of moderator abuse http://slashdot.org/comments.pl?sid=366293&cid=21424075 [slashdot.org] [slashdot.org] MOD me up to correct this injustice.
/. community was supposed to be smart?
Too many moderators use Insightful as "I agree". Too many moderators fall for unoriginal groupthink and mod it up. People complain about trolls, but the REAL line noise on slashdot comes from the posts modded +4 or +5 that contribute NOTHING to an intelligent discussion. You can't filter that out, and even if you have your thresholds set high, you still see all the stupid stuff that you've already seen. That's why digg sucks and will never be anything but a place for 1338 high-skool haxx0rs. And it's happening here. So I used this account to call shenanigans on sucky posts. I getted modded into oblivion for pointing out truth. I guess that's how it goes. Most of you are a bunch of mindless sheeple.
One way to fix this: I think Slashdot should give IQ tests to all would-be moderators. That would ensure most of the ramshackle pseudo-intellectuals who get mod points would be replaced by people who can actually read the moderator guidelines and adhere to them.
If someone wants to debate this intelligently, then post something meaningful in reply. Chiding me for "whining" won't get you anywhere. I thought the
That article used a lot of words to say absolutely nothing. But it got me thinking... perhaps we could group related snippets of code into units called "libraries", and then we could easily use those libraries to perform common tasks?
It's smart to not have to reinvent the wheel unless you're going to do it better. On the other hand, if you just acquire the wheel, you might not actually understand the wheel. The last thing we need is more sloppy coding nevermind the speed it's produced at.
It's a funny game, using plucked code. I do agree that when it comes to learning a new language, or learning to program for the first-ish time, nothing's better than stitching together mounds of existing code and watching things emerge.
When it comes to real business requirements, things are a little milky. I own and operate a small business, and there are a few problems with plucking code from the ether. The first is the notion of hiring a programmer to not write their own code. Getting the job done, and doing the job are two very different things. It pretty much hinges on a very simple notion.
I love CPAN, I think it's the greatest resource out there. When I'm looking for a Perl module to do something that I can't do myself, that's where I go, and I've never been disappointed. But I go there expecting a solution that does what it says it'll do. I use it the way it says it wants me to use it. And that's all that I ever expect of it. FTP, PDF, english numbers, whatever.
A while back, I asked one of my programmers to write a routine to dump out a Perl structure. I said I needed it in about a week. Lo and behold, it worked on-time and all was good.
A few months later, I noticed that it wasn't quite working the way that I had wanted it to. I needed a tiny thing adjusted. So I went to my programmer, and told him to make the change. I was greeted with the lovely response of "it can't do that like that". I of course was perplexed. I'm not asking it to do anything. I'm asking my programmer to do something on the clock.
Turns out, as any Perl expert here knows, my programmer simply took the Dump module, which dumps perl structures. I wanted to have the dump be a nice dynamic javascript html table thing, and my programmer told me no -- or rather that it would require him to do it from scratch, and of course now, a month later, we didn't have the time.
Ultimately, my point is that when you control every line of code, you aren't hampered by other people's restrictions. I would have been happy had my programmer written his own dumping code from scratch, but I also would have been happy had he started with the cpan dump code, searned from it, and created a derivative version. Hell, in this case, I'd have been happy if he had studied it to the point where he could have modified it easily.
Instead, I got a quick-'n'-dirty solution that prioritizes time over other benefits. Trouble is, in this case, we had extra time, and no extra benefits.
#include
using namespace std;
int main()
{
cout "Hello World!";
return 0;
}
Isn't that what microsoft is trying to do with PopFly?
http://www.popfly.ms/Overview/
How mainstream are SAE bolts? How mainstream is 18 gage 304 stainless sheetmetal? How mainstream is a CR2016 battery?
Standardized and well-understood components save a vast amount of effort in other engineering fields and help produce results that are more easily verified to be good.
Why not apply the same approach to software engineering? Isn't that the greatest promise of open source?
With reasonable men I will reason; with humane men I will plead; but to tyrants I will give no quarter. -- William Lloyd
I think that in some rare cases, code scavenging is helpful. However, in most cases, it does not lead to solidly engineered software. Basically you get a piece of code, review your code, analyze the interface, prefactor, debug, postfactor, and now it is working well. By that time, you could have written a rough draft, debugged, and postfactored in less time and gotten a more consistent codebase out of it.
So I am not sure at all to what extent this code scavenging is sufficiently helpful to make formalize the process.
LedgerSMB: Open source Accounting/ERP
Your programmer, if he was smart, grabbed the CPAN module, wrote a little wrapper around it, and integrated it into your application. If you had known what you wanted up front, he would have done the same with TemplateToolkit. (LedgerSMB uses both so I have experience here!)
Even if your programmer wrote all the code from scratch, adjusting it to output valid HTML tables that Javascript would reliably work on would be more work than just starting over with TT.
LedgerSMB: Open source Accounting/ERP
The title of this article seems to have been 'code scavenged' ... it makes no sense and wasn't proof read. 'How far can can code scavenging go in the mainstream?' perhaps
members are seeing something, your seeing an ad
indie code scavenging, indie code scavenging, indie code scavenging
mornin6. Now I have
So... the formalised use of old code... you mean like CPAN?
I think I lost even more braincells trying to grok the title. "How Mainstream Can Code Scavenging Go?". Wow, I thought! Is there a Scavenging version of the japanese game of Go? Can Mainstream ever be able to Code it? And How will they ever manage it? WTF!? What's with the capitalization of almost every word other than a few prepositions? Jeez...
One of the selling points of object oriented coding was it was supposed to formalize this and make it easier. In theory all objects were to be designed to be generic and reused from day one. In practice it rarely works that way. Especially under tight dead lines and lean development teams.
Think Deeply.
... of an SF book I read a few years ago, where all programs were written by a process of digging into 10,000 years' worth of computer programs in a sort of archaeological way, pulling out something that did more or less what you want and amalgamating it with what you had so far. I thought at first that it was a Vernor Vinge book, but checking the plot summaries on wikipedia, it looks like it was somebody else. Can anybody remember the book I'm thinking of?
Apparently, slashdot has already scavenged angle brackets - they're gone. Truly the most scavenged code ever.
SCO recently announced a 3 trillion dollar law suit against the owner of the kclittle slashdot ID. When asked about the dollar amount, they said that the "three billion" number lost its glamor and is no longer taken seriously.
When all else fails, try.
I sympathize with the attitude that one has more "control" by doing everything from scratch, but I don't have the luxury of a huge team or reasonable deadlines. I get burned regularly by using third party code, paid for or not, but given the source code it can usually be made to work, or scrapped early if it clearly won't. One non-developer exec bought us a bunch of code from some third world outfit: we junked it all and rewrote when we realized that would be faster than fixing it.
Everyone I know uses http://codeproject.com/, especially for oddball MFC controls. It's usually necessary to do significant debugging and extending, but you get ready-to-go starter code with most of the skanky MFC issues and gotchas already handled, plus usually a demo project, for less effort than writing from scratch.
One coworker was an advocate of third party ActiveX controls: after one disaster too many I finally ActiveX entirely and we've almost completely replaced what we had. The issue, aside from extreme ugliness and painfulness to use, is that most commercial ActiveX is closed or unusable source, and is at least as incomplete/buggy as CodeProject source code.
http://www.google.com/codesearch apparently google has already done it.
like just finding the right application amongst zillions the problem (to something most I'm sure would otherwise consider doing) is finding it.
Yes you might want to save time through such reuse, but first you have to somehow find possibilities and then you have to decide which one of those suits best. And that time consuming process is why so much ends up getting written from scratch so often.
Solving that problem is itself a problem though. At the moment there is such a diversity because of that. Take away the diversity and you move toward a narrowed less populated eco system, which I think for many (hopefully) obvious reasons is best avoided.
int Tree( Char ***Node1, char **data)
Sort a-z
return height
int retreive (char **return, char **searchfor, int length)
return found
For simple functions it works well, for open source code it works great.
Between those levels lies the question, why aren't you using their code anyway?
Like most problems, textual code reuse has via copy & paste has already been studied, and a language based on first-class copy & paste is being developed; it's called the Subtext language. See a more detailed discussion of it on lambda-the-ultimate. Academia is not so far remove from everyday programming as people seem to think!
Higher Logics: where programming meets science.
Speaking of one of the grand-daddys of reusable source, does anyone remember the DECUS Tapes from the DEC community. There's still a lot of prior art work to be found there.
It's funny that people rarely mention how the code libraries in frameworks like Java and .Net have superseded a lot of earlier scavenging. I can't remember the last time I wrote custom code to send e-mail, display forms, etc. Today's scavenged functionality will be tomorrow's built-in tools.
Ask me about my sig!
code snippet?
Have gnu, will travel.
Sark.... all my functions are now yours.... take 'em.
That's a great idea, the Linux kernel could use some SCO code. We used to have some but we had to bury it in the desert when SCO sent in the weapons inspectors.
Maybe this is a push article from the authors of krugle.com? The enterprise edtion is supposed to be rolled out pretty soon. I would hope any software company can modularize their code for reuse. Most programmers can and do. How many times do I need to write a count function? Or poke data in to an array? It isn't protected property as much as saving time by not rewriting the wheel function.
``You've simply fooled yourself into thinking the process is simpler than it is while screwing your customers out of their development dollars.''
Which, of course, makes good business sense. At least until customers start selecting on maintenance/improvement cost instead of initial development quote.
Please correct me if I got my facts wrong.