How Mainstream Can Code Scavenging Go? 139
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?
IP Laws? (Score:4, Interesting)
Vernor Vinge (Score:5, Interesting)
Unlikely? (Score:4, Interesting)
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 [blosxom.com] 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.
Re:IP Laws? (Score:5, Interesting)
Agreed. Reading TFS, I thought it was going to be yet another "we can make programming like Lego!" thing. (Which it ain't, and probably never will be. [joelonsoftware.com] Bonus reference: "Lego" is mentioned in the second paragraph of this article [wired.com] about Steve Jobs/NeXT/WebObjects from Wired. God bless Wired and their eternally fucked-up CMS that can't serve images for any story in the archive and, this week, shows the actual HTML code that should be formatting the Question-and-Answer portion of the article.)
Reading TFA, I really don't know much more than I did before. This is the best I could come up with:
So, code scavenging is... um, re-use? Can anyone make better sense of that than I can?
:-)
"In other words, they 'scavenge' the good bits and tweak them to a new purpose."
Um, no. You scavenge the pieces you need, not necessarily the good bits. Have you ever been looking for some code to do parse phone numbers, and while looking at source, said "Hey! This looks like a great way to compare two lists!" Probably not. You're only looking for formatting code, so that's all you see, so that's all you get. Looking at source is not like looking at produce at the food store, where you can walk by the tomatoes and they catch your eye because they're perfectly ripe and really, really nice-looking.
Rather than searching Google, I think every good programmer should take the time to create a really good library. I don't mean take the time writing great code, I mean take the time to organize it into a proper library: make one, clean, well-commented version; put things into variables, ($tableName in queries instead of the actual table name, etc.) and pull code from that when you need it, rather than just copying-and-pasting from the last place you remember using it and then changing all the variable names, table names, etc.
I plan to make mine Real Soon Now.
>> So, how quickly would you run afoul of Intellectual Property laws doing this?
> That's a great knee-jerk reaction.
No, that's just the first thing that popped into his head. (Pardon me if I'm putting words in your mouth, Mr. Gambit.) With that one sentence, he did not say (or imply) "The only people who would use this are thieves." He just put out that question for people to discuss. That topic came up here just a couple days ago. [slashdot.org] I highly recommend reading that discussion. There are some very good points; among them, that if you publish something with no licensing info, it is copyrighted to you by default. (In the US at least,
Re:Don't we call that "refactoring"? (Score:1, Interesting)
I google and look through various scripts and stuff on linux boxes and can piece stuff together but by the time I do that I might as well have just written it. Often times I do after giving up. To have a place to pick through, even just for ideas, is not a bad thing at all. For the record I am an admin but not a programmer.
This reminds me of another book ... (Score:3, Interesting)