Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/05/10 15:13
Read: times


 
#176424 - Code Reuse
Responding to: ???'s previous message
Hi Robert,

... surely C is designed to encourage 'black box' code re-use?


Actually, (insert A-team cartoon here), I remember the concept being introduced first as "structured programming" in ... (play ominous descending three-chord sequence here)... C.O.B.O.L. (crowds run screaming).

It evolved into what was once called "Object Oriented Programming," or OOP in the hip-cool techno-vernacular of the day.

In any case, even if I had a team of programmers writing parts of a whole as a team, there work would be highly predefined and constrained a priori. And I think this may point to the fundamental issue here.

In order for "black box" code to work in truely plug and play fashion, it has to be uniquely constrained to the circumstance. In order for it to be general purpose, such that anyone could plug it into their program and just use it blindly, it would have to be infinitely generalized, which means it would have to be infinitely cumbersome. And if the adjectives "uniquely" and "infinitely" are overstatements, they are only barely so.

So in order for gimme code to be useful to a large selection of people, it must be reasonably generalized, which means it must be made more cumbersome than any one individual would ever need. That means that whoever uses it is going to have to tailor it to their specific need.

And in my experience, that exercise has always been more effort than just writing the code from scratch.

Now, all of that said, several have raised, at least implicitly, what seems like one way of using gimme code that could be useful. Using "cut and paste" could save a bit of typing, but I suspect this will only be true in the simplest of circumstances.

Joe

List of 23 messages in thread
TopicAuthorDate
Gimme Code: Is it really worth it?            01/01/70 00:00      
   Yes, in intensive writing situations            01/01/70 00:00      
   Unreasonable expectations            01/01/70 00:00      
      Depends            01/01/70 00:00      
   As an exercise...            01/01/70 00:00      
   gimme binary            01/01/70 00:00      
      Did he?            01/01/70 00:00      
         sometimes you'll find out what you need on the go            01/01/70 00:00      
            Fundamental flaw            01/01/70 00:00      
               then "gimme binary and schematics"            01/01/70 00:00      
   LCD code            01/01/70 00:00      
      Not the point?            01/01/70 00:00      
         Ah, I see...            01/01/70 00:00      
            now we know            01/01/70 00:00      
               Ha! My wife and children...            01/01/70 00:00      
      two key words            01/01/70 00:00      
         I wouldn't go that far            01/01/70 00:00      
      Code Reuse            01/01/70 00:00      
         A possible counterpoint, or maybe a confirmation            01/01/70 00:00      
            not really            01/01/70 00:00      
         is that the reason I need a multi-GHz PC to ...            01/01/70 00:00      
         an example of really useful 'reusable' code            01/01/70 00:00      
   Compiler libraries            01/01/70 00:00      

Back to Subject List