CSC/ECE 517 Fall 2009/wiki2 7 co: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
 
(Initial edit with outline)
Line 1: Line 1:
= Code Reuse Mechanisms =
== Code Reuse Methods and Mechanisms ==


Different languages have different mechanisms for "code reuse". Assembly and low level languages have macros, C/C++ has includes, Ruby has mixins and modules, Java has packages, and there are many other concepts around reuse and extension. Write a page that describes the various mechanisms, group the mechanisms into logical categories, and discuss the advantages and disadvantages of the various schemes, in terms of simplicity, performance, reliability, or other factors.


== Code Reuse ==
  ''The best way to attack the essence of building software is not to build it at all.''
* Cut & Paste
        - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''-
* Macros
* Functions/Methods
* Includes
* Libraries
* Packages
* Inheritance
* Polymorphism
* Generics
* Mixins/Modules
* Aspect
* Patterns


== Reasons Not to Reuse ==
In his 1975 classic, ''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]'', [http://en.wikipedia.org/wiki/Fred_Brooks Fred Brooks] claimed that the implementation of design (what he called "accidental tasks") was essentially efficient enough that improvements in that area would not result in significant gains in productivity. Twenty years later, in a follow-up edition, he refined and clarified his view. He recognized that the rise of object-oriented languages and methodologies had the potential and promise of easy reuse, although he was still skeptical of dramatic productivity claims. Fundamentally, though, he saw that overall software development productivity can be enhanced through reuse.
* Speed
 
* Lack of documentation
This page will review some of the different techniques that are available for code reuse, and then a comparison of the techniques will be presented.
* Complexity
 
* Poor Design
=== Code Reuse Through Direct Code Use ===
* Lack of Trust/Fear
 
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.
 
==== Cut & Paste ====
 
blah
 
==== Macros ====
 
blah
 
==== Includes ====
 
blah
 
==== Packages ====
 
blah
 
=== Code Reuse through Subroutines ===
 
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.
 
==== Functions ====
 
blah
 
==== Procedures ====
 
blah
 
=== Code Reuse through Extension ===
 
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.
 
==== Methods ====
 
blah
 
==== Inheritance ====
 
blah
 
==== Polymorphism ====
 
blah
 
==== Generics ====
 
blah
 
==== Mixins/Modules ====
 
blah
 
==== Aspect ====
 
blah
 
=== Comparing the Various Mechanisms ===
 
 
=== Why Reuse Is Not Always Embraced ===
 
With all the various techniques available, code reuse is not universally embraced, either academically or commercially. What are the reasons for not reusing existing code?
 
* '''Speed''' -
* '''Lack of documentation''' -
* '''Complexity''' -
* '''Poor Design''' -
* '''Licensing Issues''' -
* '''Lack of Trust/Fear''' -
 
=== Conclusion ===
blah!

Revision as of 23:55, 8 October 2009

Code Reuse Methods and Mechanisms

  The best way to attack the essence of building software is not to build it at all.
        - Fredrick P. Brooks, Jr.,The Mythical Man-Month-

In his 1975 classic, The Mythical Man-Month, Fred Brooks claimed that the implementation of design (what he called "accidental tasks") was essentially efficient enough that improvements in that area would not result in significant gains in productivity. Twenty years later, in a follow-up edition, he refined and clarified his view. He recognized that the rise of object-oriented languages and methodologies had the potential and promise of easy reuse, although he was still skeptical of dramatic productivity claims. Fundamentally, though, he saw that overall software development productivity can be enhanced through reuse.

This page will review some of the different techniques that are available for code reuse, and then a comparison of the techniques will be presented.

Code Reuse Through Direct Code Use

There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.

Cut & Paste

blah

Macros

blah

Includes

blah

Packages

blah

Code Reuse through Subroutines

This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.

Functions

blah

Procedures

blah

Code Reuse through Extension

Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.

Methods

blah

Inheritance

blah

Polymorphism

blah

Generics

blah

Mixins/Modules

blah

Aspect

blah

Comparing the Various Mechanisms

Why Reuse Is Not Always Embraced

With all the various techniques available, code reuse is not universally embraced, either academically or commercially. What are the reasons for not reusing existing code?

  • Speed -
  • Lack of documentation -
  • Complexity -
  • Poor Design -
  • Licensing Issues -
  • Lack of Trust/Fear -

Conclusion

blah!