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?
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.
That sir, was a work of beauty. There should moderation other than -1 Troll for such art.
Indeed...we need a -5 Asshole.
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.
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
Just do what I do: M2 frequently. And fairly. And by that I mean, if I don't see any insight in a comment that's modded Insightful, it gets metamodded Unfair. Etc. If it happens more than a few times to someone, they lose their mod privs.
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.
Get. A. Life.
"A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
... 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.
I see that you have learned to post anonymously when you are about to be a douche. Congratulations, that is a bit of progress. Now all you have to do is refrain from being a douche while logged in long enough to get mod points of your own (it takes about 6 months) and you can start instituting your high standards of intellect on our moderation... except looking at your posting history (if you are Taco Meat), you really are a douche.
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.