Forgot your password?
typodupeerror

Comment re-use overhead can be worse than re-inventing (Score 1) 158

Most of the time when I'm looking for source code, it's just to get some examples of how other people have dealt with a particular problem, or when figuring out how to use a new API. Only rarely have I been able to just drop in someone else's code and have it work as-is. There are usually dependencies/conflicts to work out, or incompatible parameters (arrays vs delimited buffer, etc). The sample code may also be tied to a sample GUI, which would need to be merged with my own. Or hacked severely to work as a console/server app. Many times, the time spent understanding the code well enough to modify it would have been better spent re-inventing the wheel.

This isn't to say that re-use is always bad. I've used things like pkzip and zlib libraries and saved a _lot_ of time (and some of my now-scarce sanity).

On the other hand, some libraries pack so many features (e.g. Stingray) that implementation can be rather involved. Nothing against Stringray -- they make some very difficult stuff fairly easy to do. But for the first project I used it on, we were only using a small subset of the capabilities and the overhead of learning the API, adapting to their updates/upgrades and rebuilding/distributing the library modules outweighed the advantages. Especially over the life of the project, which evolved from Visual Studio 6 on Win98 to VS.Net on XP. There's also been significant turnover in the development team over the years, adding to the learning curve.

Slashdot Top Deals

Life would be so much easier if we could just look at the source code. -- Dave Olson

Working...