1 post • joined 4 Dec 2007
Copy and paste not as good as a good code library
The problem with a lot of code use is that it promotes BAD programming. I copy it from here, and paste it in this program and that program and that program and pretty soon I have lots of code that does the same thing being maintained in 20 different places.
Code Libraries are far better than this cut and paste mentality. The C Runtime Library made things easy to port, easy to use and in general help progress the art of computer programming way more than this arbitrary scrapbook of code you can paste from.
.NET and Java have almost gone too far the other direction with such a thick book of code that you don't have to invent much to do simple things (image manip, crypto, ....) but you need an encyclopedic brain to remember which package it is in.
We use a few core libraries in our development work and when we add functionality to one app that might be useful in the other, we put it in one of those core libraries:
WinExtensions - Thing Win32 should have had but didn't get
ImageCore - Things to do with Imaging
Generic - Things that STL didn't include
Boost - Nuff said
XMLib - XML stuff that sits on top of xerces (convenience mostly)
By collecting our code into groups like this we don't need so much to copy and paste and we maintain the code (with unit tests) in ONE spot.
I think it would be better to work on taming the Java and .NET API beast (although that might not be possible) than trying to make a cut and paste beast like this would become.
Design Patterns..... Yea, that's it!
- Boffins attempt to prove the UNIVERSE IS JUST A HOLOGRAM
- China building SUPERSONIC SUBMARINE that travels in a BUBBLE
- Review Raspberry Pi B+: PHWOAR, get a load of those pins
- Experimental hypersonic SUPERMISSILE destroyed 4 SECONDS after US launched it
- That 8TB Seagate MONSTER? It's HERE... (You'll have to squint, 'cos there are no specs)