PDA

View Full Version : free source code


DrWilloughby
12-05-2005, 05:28 PM
Has anyone seen this site? (It got Slashdotted earlier today I believe)

http://csourcesearch.net/

It's a big repository of C++ code. A quick search for "a star" for instance, brings up several implementations of the algorithm.

Has anyone tried using resources like this? Is it more trouble than it's worth?

ggambett
12-05-2005, 06:33 PM
I don't know. I thing it depends on what are you doing and the quality of the code involved. For certain kind of things (A* for example) you can just encapsulate the code behind a clean interface. Treat it like a black box. No matter how bad is the code, as long as it works, you're OK, you've saved some time, and you can always replace it with a better implementantion as long as you keep the interface.

Pyabo
12-05-2005, 08:52 PM
I've used lots of stuff like this. The Standard Template Library comes to mind. :)

DrWilloughby
12-05-2005, 11:24 PM
HA. Yes, the STL is great. I guess I meant code from un-verified open source libraries. How often is it useful/time-saving? And has anyone used this particular site?

mahlzeit
12-06-2005, 02:15 AM
I often use freely available code (from example from CodeProject (http://www.codeproject.com/)), but I always go through it and clean it up according to my own wishes. Often the code can be simplified and must be tuned a little to your own needs. Still, it's a big time saver. No reason to do all the work yourself. ;)