<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jlmatloc</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jlmatloc"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Jlmatloc"/>
	<updated>2026-09-13T01:03:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=25120</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=25120"/>
		<updated>2009-10-10T00:42:17Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse Through Direct Code Use ==&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Cut &amp;amp; Paste ===&lt;br /&gt;
&lt;br /&gt;
One of the most basic reuse mechanism is the cut and paste method. Simply find the source code that performs the function that is required and copy the code into the place it is needed. This method can be implemented either by copying from some external source, such as a book or another software program, or by duplicating the same code within the same program. The latter method is generally a [http://sourcemaking.com/antipatterns/cut-and-paste-programming very discouraged practice]. Additionally, using this method can lead to [http://en.wikipedia.org/wiki/Copy_and_paste_programming plagiarism].&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
In C and C++, the '''includes''' construct places the contents of the file specified in the include parameter in the spot where the include is placed:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;quot;time.h&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
   class Time&lt;br /&gt;
   {...&lt;br /&gt;
&lt;br /&gt;
In this example, the compiler effectively copies the code within time.h at the point where the #include statement is declared. Nearly all compilers will provide for specifying paths to search for the indicated file and provide rules or conventions for dealing with multiple occurrences of the same file.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Subroutines ==&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
=== Gosub ===&lt;br /&gt;
&lt;br /&gt;
In [http://www.vintage-basic.net/ Vintage Basic] (comparable to the Basic language dialects from the late 70s and early 80s), individual lines of code are designated by line numbers. Blocks of code can be designated as subroutines and the '''GOSUB''' command can jump to these blocks of code. Execution jumps back to the line following the GOSUB command once a '''RETURN''' is encountered in the subroutine:&lt;br /&gt;
&lt;br /&gt;
   10  FOR I=1 TO 5&lt;br /&gt;
   20  GOSUB 100&lt;br /&gt;
   30  NEXT I&lt;br /&gt;
   40  END&lt;br /&gt;
  100  PRINT &amp;quot;Value = &amp;quot;; I&lt;br /&gt;
  110  RETURN&lt;br /&gt;
&lt;br /&gt;
Note that in this construct, parameters are not passed to the subroutine, but since all variables were global, parameters could still be simulated through careful use of global variables.&lt;br /&gt;
&lt;br /&gt;
=== Procedures ===&lt;br /&gt;
&lt;br /&gt;
In Pascal, '''procedures''' provided a way to jump to a block of code, and parameters can be passed to that block as well:&lt;br /&gt;
&lt;br /&gt;
   var j:Integer;&lt;br /&gt;
   &lt;br /&gt;
   procedure PrintValue(i: Integer);&lt;br /&gt;
   begin&lt;br /&gt;
      Write(&amp;quot;Value = &amp;quot;);&lt;br /&gt;
      Writeln(i);&lt;br /&gt;
   end;&lt;br /&gt;
   &lt;br /&gt;
   begin&lt;br /&gt;
      for j := 1 to 5 do&lt;br /&gt;
         PrintValue(j)&lt;br /&gt;
   end.&lt;br /&gt;
&lt;br /&gt;
In this scheme, in order to update parameters with actions performed within the procedure, a parameter must be [http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/Chapter_11/CH11-2.html#HEADING2-29  '''passed by reference'''], effectively passing the memory address of the parameter so it can be effected directly.&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
&lt;br /&gt;
Pascal also includes a construct called '''functions''' which allow a subroutine to return a value to the caller:&lt;br /&gt;
&lt;br /&gt;
   var j:Integer;&lt;br /&gt;
   &lt;br /&gt;
   function Square(i: Integer): Integer;&lt;br /&gt;
   begin&lt;br /&gt;
      Square = i * i;&lt;br /&gt;
   end;&lt;br /&gt;
   &lt;br /&gt;
   begin&lt;br /&gt;
      for j := 1 to 5 do&lt;br /&gt;
         Writeln(&amp;quot;Square of &amp;quot;, j, &amp;quot; = &amp;quot;, Square(j));&lt;br /&gt;
   end.&lt;br /&gt;
&lt;br /&gt;
Although a similar construct can be created using procedures, functions allow for more concise coding.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Extension ==&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
'''Methods''' (in [http://java.sun.com/docs/books/tutorial/java/javaOO/methods.html Java] and [http://www.cplusplus.com/doc/tutorial/classes/ C++]) are functions which are encapsulated within a class structure. The class structure can provide a level of data and implementation hiding which can facilitate better design.&lt;br /&gt;
&lt;br /&gt;
   public class Square {&lt;br /&gt;
      ...&lt;br /&gt;
      public void draw(String s) {&lt;br /&gt;
         ...&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In and of themselves, methods do not offer any additional capability over functions, but operating within a class structure, several object-oriented paradigms can make methods more effective for code reuse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Inheritance ===&lt;br /&gt;
&lt;br /&gt;
'''Inheritance''' is an object-oriented concept which allows a developer to create subclasses of a base class which can refine or expand the base class.&lt;br /&gt;
&lt;br /&gt;
   Example needed&lt;br /&gt;
&lt;br /&gt;
Using inheritance, base classes can hold much of the common elements that are used by the subclasses, thus code is reused by the subclasses through the common base class.&lt;br /&gt;
&lt;br /&gt;
=== Polymorphism ===&lt;br /&gt;
&lt;br /&gt;
'''Polymorphism''' is another object-oriented concept which allows a developer to reuse a defined interface in a class, but provide for an implementation that is specialized to that specific class.&lt;br /&gt;
&lt;br /&gt;
   abstract public class Shape {&lt;br /&gt;
      abstract public void draw();&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   public class Square extends Shape {&lt;br /&gt;
      public draw() {&lt;br /&gt;
         ...&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   public class Circle extends Shape {&lt;br /&gt;
      public draw() {&lt;br /&gt;
         ...&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this example, the draw method has been indicated in the Shape class, but implemented in the subclasses Square and Circle. This example may not seem like code reuse, but it can be argued that the concept around providing a common signature for the subclasses is a type of reuse. Further, polymorphism provides one of the key foundations for object-oriented programming.&lt;br /&gt;
&lt;br /&gt;
=== Generics ===&lt;br /&gt;
&lt;br /&gt;
'''Generics''' in Java and C++ provide a mechanism where a type or class (such as String, int, or Shape) can be provided to a method as a parameter. In this fashion, the generic method can accommodate multiple types, or they can be used to catch potential typing issues at compile time that might otherwise be missed.&lt;br /&gt;
&lt;br /&gt;
* [http://java.sun.com/docs/books/tutorial/extra/generics/index.html Tutorial on Generics in Java]&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/c570k3f3%28VS.80%29.aspx Overview of Generics in Visual C++]&lt;br /&gt;
&lt;br /&gt;
=== Mixins/Modules ===&lt;br /&gt;
&lt;br /&gt;
   Text and Example needed&lt;br /&gt;
&lt;br /&gt;
=== Aspect ===&lt;br /&gt;
&lt;br /&gt;
   Text and Example needed&lt;br /&gt;
&lt;br /&gt;
== Comparing the Various Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
  Comparison table needed&lt;br /&gt;
&lt;br /&gt;
== Why Reuse Is Not Always Embraced ==&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' - explain&lt;br /&gt;
* '''Lack of documentation''' - explain&lt;br /&gt;
* '''Complexity''' - explain&lt;br /&gt;
* '''Poor Design''' - explain&lt;br /&gt;
* '''Licensing Issues''' - explain&lt;br /&gt;
* '''Lack of Trust/Fear''' - explain&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
   Conclusion needed&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Brooks, Jr., F.P. ''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''. Boston, MA: Addison Wesley Longman, Inc., 1995.&lt;br /&gt;
* [http://sourcemaking.com/antipatterns/cut-and-paste-programming Cut-and-Paste Programming]&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=25091</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=25091"/>
		<updated>2009-10-10T00:38:44Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse Through Direct Code Use ==&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Cut &amp;amp; Paste ===&lt;br /&gt;
&lt;br /&gt;
One of the most basic reuse mechanism is the cut and paste method. Simply find the source code that performs the function that is required and copy the code into the place it is needed. This method can be implemented either by copying from some external source, such as a book or another software program, or by duplicating the same code within the same program. The latter method is generally a [http://sourcemaking.com/antipatterns/cut-and-paste-programming very discouraged practice]. Additionally, using this method can lead to [http://en.wikipedia.org/wiki/Copy_and_paste_programming plagiarism].&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
In C and C++, the '''includes''' construct places the contents of the file specified in the include parameter in the spot where the include is placed:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;quot;time.h&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
   class Time&lt;br /&gt;
   {...&lt;br /&gt;
&lt;br /&gt;
In this example, the compiler effectively copies the code within time.h at the point where the #include statement is declared. Nearly all compilers will provide for specifying paths to search for the indicated file and provide rules or conventions for dealing with multiple occurrences of the same file.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Subroutines ==&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
=== Gosub ===&lt;br /&gt;
&lt;br /&gt;
In [http://www.vintage-basic.net/ Vintage Basic] (comparable to the Basic language dialects from the late 70s and early 80s), individual lines of code are designated by line numbers. Blocks of code can be designated as subroutines and the '''GOSUB''' command can jump to these blocks of code. Execution jumps back to the line following the GOSUB command once a '''RETURN''' is encountered in the subroutine:&lt;br /&gt;
&lt;br /&gt;
   10  FOR I=1 TO 5&lt;br /&gt;
   20  GOSUB 100&lt;br /&gt;
   30  NEXT I&lt;br /&gt;
   40  END&lt;br /&gt;
  100  PRINT &amp;quot;Value = &amp;quot;; I&lt;br /&gt;
  110  RETURN&lt;br /&gt;
&lt;br /&gt;
Note that in this construct, parameters are not passed to the subroutine, but since all variables were global, parameters could still be simulated through careful use of global variables.&lt;br /&gt;
&lt;br /&gt;
=== Procedures ===&lt;br /&gt;
&lt;br /&gt;
In Pascal, '''procedures''' provided a way to jump to a block of code, and parameters can be passed to that block as well:&lt;br /&gt;
&lt;br /&gt;
   var j:Integer;&lt;br /&gt;
   &lt;br /&gt;
   procedure PrintValue(i: Integer);&lt;br /&gt;
   begin&lt;br /&gt;
      Write(&amp;quot;Value = &amp;quot;);&lt;br /&gt;
      Writeln(i);&lt;br /&gt;
   end;&lt;br /&gt;
   &lt;br /&gt;
   begin&lt;br /&gt;
      for j := 1 to 5 do&lt;br /&gt;
         PrintValue(j)&lt;br /&gt;
   end.&lt;br /&gt;
&lt;br /&gt;
In this scheme, in order to update parameters with actions performed within the procedure, a parameter must be [http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/Chapter_11/CH11-2.html#HEADING2-29  '''passed by reference'''], effectively passing the memory address of the parameter so it can be effected directly.&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
&lt;br /&gt;
Pascal also includes a construct called '''functions''' which allow a subroutine to return a value to the caller:&lt;br /&gt;
&lt;br /&gt;
   var j:Integer;&lt;br /&gt;
   &lt;br /&gt;
   function Square(i: Integer): Integer;&lt;br /&gt;
   begin&lt;br /&gt;
      Square = i * i;&lt;br /&gt;
   end;&lt;br /&gt;
   &lt;br /&gt;
   begin&lt;br /&gt;
      for j := 1 to 5 do&lt;br /&gt;
         Writeln(&amp;quot;Square of &amp;quot;, j, &amp;quot; = &amp;quot;, Square(j));&lt;br /&gt;
   end.&lt;br /&gt;
&lt;br /&gt;
Although a similar construct can be created using procedures, functions allow for more concise coding.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Extension ==&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
'''Methods''' (in [http://java.sun.com/docs/books/tutorial/java/javaOO/methods.html Java] and [http://www.cplusplus.com/doc/tutorial/classes/ C++]) are functions which are encapsulated within a class structure. The class structure can provide a level of data and implementation hiding which can facilitate better design.&lt;br /&gt;
&lt;br /&gt;
   public class Square {&lt;br /&gt;
	...&lt;br /&gt;
	public void draw(String s) {&lt;br /&gt;
		...&lt;br /&gt;
	}&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In and of themselves, methods do not offer any additional capability over functions, but operating within a class structure, several object-oriented paradigms can make methods more effective for code reuse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Inheritance ===&lt;br /&gt;
&lt;br /&gt;
'''Inheritance''' is an object-oriented concept which allows a developer to create subclasses of a base class which can refine or expand the base class.&lt;br /&gt;
&lt;br /&gt;
   Example&lt;br /&gt;
&lt;br /&gt;
Using inheritance, base classes can hold much of the common elements that are used by the subclasses, thus code is reused by the subclasses through the common base class.&lt;br /&gt;
&lt;br /&gt;
=== Polymorphism ===&lt;br /&gt;
&lt;br /&gt;
'''Polymorphism''' is another object-oriented concept which allows a developer to reuse a defined interface in a class, but provide for an implementation that is specialized to that specific class.&lt;br /&gt;
&lt;br /&gt;
   abstract public class Shape {&lt;br /&gt;
      abstract public void draw();&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   public class Square extends Shape {&lt;br /&gt;
      public draw() {&lt;br /&gt;
         ...&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   public class Circle extends Shape {&lt;br /&gt;
      public draw() {&lt;br /&gt;
         ...&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this example, the draw method has been indicated in the Shape class, but implemented in the subclasses Square and Circle. This example may not seem like code reuse, but it can be argued that the concept around providing a common signature for the subclasses is a type of reuse. Further, polymorphism provides one of the key foundations for object-oriented programming.&lt;br /&gt;
&lt;br /&gt;
=== Generics ===&lt;br /&gt;
&lt;br /&gt;
'''Generics''' in Java and C++ provide a mechanism where a type or class (such as String, int, or Shape) can be provided to a method as a parameter. In this fashion, the generic method can accommodate multiple types, or they can be used to catch potential typing issues at compile time that might otherwise be missed.&lt;br /&gt;
&lt;br /&gt;
* [http://java.sun.com/docs/books/tutorial/extra/generics/index.html Tutorial on Generics in Java]&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/c570k3f3%28VS.80%29.aspx Overview of Generics in Visual C++]&lt;br /&gt;
&lt;br /&gt;
=== Mixins/Modules ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Aspect ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Comparing the Various Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Why Reuse Is Not Always Embraced ==&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
blah!&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Brooks, Jr., F.P. ''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''. Boston, MA: Addison Wesley Longman, Inc., 1995.&lt;br /&gt;
* [http://sourcemaking.com/antipatterns/cut-and-paste-programming Cut-and-Paste Programming]&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24748</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24748"/>
		<updated>2009-10-09T23:21:26Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse Through Direct Code Use ==&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Cut &amp;amp; Paste ===&lt;br /&gt;
&lt;br /&gt;
One of the most basic reuse mechanism is the cut and paste method. Simply find the source code that performs the function that is required and copy the code into the place it is needed. This method can be implemented either by copying from some external source, such as a book or another software program, or by duplicating the same code within the same program. The latter method is generally a [http://sourcemaking.com/antipatterns/cut-and-paste-programming | very discouraged practice]. Additionally, using this method can lead to [http://en.wikipedia.org/wiki/Copy_and_paste_programming | plagiarism].&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
In C and C++, the '''includes''' construct places the contents of the file specified in the include parameter in the spot where the include is placed:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;quot;time.h&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
   class Time&lt;br /&gt;
   {...&lt;br /&gt;
&lt;br /&gt;
In this example, the compiler effectively copies the code within time.h at the point where the #include statement is declared. Nearly all compilers will provide for specifying paths to search for the indicated file and provide rules or conventions for dealing with multiple occurrences of the same file.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Subroutines ==&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
=== Gosub ===&lt;br /&gt;
&lt;br /&gt;
In [http://www.vintage-basic.net/ | Vintage Basic] (comparable to the Basic language dialects from the late 70s and early 80s), individual lines of code are designated by line numbers. Blocks of code can be designated as subroutines and the '''GOSUB''' command can jump to these blocks of code. Execution jumps back to the line following the GOSUB command once a '''RETURN''' is encountered in the subroutine:&lt;br /&gt;
&lt;br /&gt;
   10  FOR I=1 TO 5&lt;br /&gt;
   20  GOSUB 100&lt;br /&gt;
   30  NEXT I&lt;br /&gt;
   40  END&lt;br /&gt;
  100  PRINT &amp;quot;Value = &amp;quot;; I&lt;br /&gt;
  110  RETURN&lt;br /&gt;
&lt;br /&gt;
Note that in this construct, parameters are not passed to the subroutine, but since all variables were global, parameters could still be simulated through careful use of global variables.&lt;br /&gt;
&lt;br /&gt;
=== Procedures ===&lt;br /&gt;
&lt;br /&gt;
In Pascal, '''procedures''' provided a way to jump to a block of code, and parameters can be passed to that block as well:&lt;br /&gt;
&lt;br /&gt;
   var j:Integer;&lt;br /&gt;
   &lt;br /&gt;
   procedure PrintValue(i: Integer);&lt;br /&gt;
   begin&lt;br /&gt;
      Write(&amp;quot;Value = &amp;quot;);&lt;br /&gt;
      Writeln(i);&lt;br /&gt;
   end;&lt;br /&gt;
   &lt;br /&gt;
   begin&lt;br /&gt;
      for j := 1 to 5 do&lt;br /&gt;
         PrintValue(j)&lt;br /&gt;
   end.&lt;br /&gt;
&lt;br /&gt;
In this scheme, in order to update parameters with actions performed within the procedure, a parameter must be [http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/Chapter_11/CH11-2.html#HEADING2-29 | '''passed by reference'''], effectively passing the memory address of the parameter so it can be effected directly.&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
&lt;br /&gt;
Pascal also includes a construct called '''functions''' which allow a subroutine to return a value to the caller:&lt;br /&gt;
&lt;br /&gt;
   var j:Integer;&lt;br /&gt;
   &lt;br /&gt;
   function Square(i: Integer): Integer;&lt;br /&gt;
   begin&lt;br /&gt;
      Square = i * i;&lt;br /&gt;
   end;&lt;br /&gt;
   &lt;br /&gt;
   begin&lt;br /&gt;
      for j := 1 to 5 do&lt;br /&gt;
         Writeln(&amp;quot;Square of &amp;quot;, j, &amp;quot; = &amp;quot;, Square(j));&lt;br /&gt;
   end.&lt;br /&gt;
&lt;br /&gt;
Although a similar construct can be created using procedures, functions allow for more concise coding.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Extension ==&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Inheritance ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Polymorphism ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Generics ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Mixins/Modules ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Aspect ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Comparing the Various Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Why Reuse Is Not Always Embraced ==&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
blah!&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Brooks, Jr., F.P. ''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''. Boston, MA: Addison Wesley Longman, Inc., 1995.&lt;br /&gt;
* [http://sourcemaking.com/antipatterns/cut-and-paste-programming | Cut-and-Paste Programming]&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24679</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24679"/>
		<updated>2009-10-09T22:46:45Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse Through Direct Code Use ==&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Cut &amp;amp; Paste ===&lt;br /&gt;
&lt;br /&gt;
One of the most basic reuse mechanism is the cut and paste method. Simply find the source code that performs the function that is required and copy the code into the place it is needed. This method can be implemented either by copying from some external source, such as a book or another software program, or by duplicating the same code within the same program. The latter method is generally a [http://sourcemaking.com/antipatterns/cut-and-paste-programming | very discouraged practice]. Additionally, using this method can lead to [http://en.wikipedia.org/wiki/Copy_and_paste_programming | plagiarism].&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
In C and C++, the ''includes'' construct places the contents of the file specified in the include parameter in the spot where the include is placed:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;quot;time.h&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
   class Time&lt;br /&gt;
   {...&lt;br /&gt;
&lt;br /&gt;
In this example, the compiler effectively copies the code within time.h at the point where the #include statement is declared. Nearly all compilers will provide for specifying paths to search for the indicated file and provide rules or conventions for dealing with multiple occurrences of the same file.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Subroutines ==&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
=== Gosub ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Procedures ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Extension ==&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Inheritance ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Polymorphism ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Generics ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Mixins/Modules ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Aspect ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Comparing the Various Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Why Reuse Is Not Always Embraced ==&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
blah!&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Brooks, Jr., F.P. ''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''. Boston, MA: Addison Wesley Longman, Inc., 1995.&lt;br /&gt;
* [http://sourcemaking.com/antipatterns/cut-and-paste-programming | Cut-and-Paste Programming]&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24665</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24665"/>
		<updated>2009-10-09T22:42:22Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse Through Direct Code Use ==&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Cut &amp;amp; Paste ===&lt;br /&gt;
&lt;br /&gt;
One of the most basic reuse mechanism is the cut and paste method. Simply find the source code that performs the function that is required and copy the code into the place it is needed. This method can be implemented either by copying from some external source, such as a book or another software program, or by duplicating the same code within the same program. The latter method is generally a [http://sourcemaking.com/antipatterns/cut-and-paste-programming | very discouraged practice]. Additionally, using this method can lead to [http://en.wikipedia.org/wiki/Copy_and_paste_programming | plagiarism].&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
In C and C++, the ''includes'' construct places the contents of the file specified in the include parameter in the spot where the include is placed:&lt;br /&gt;
&lt;br /&gt;
   #include &amp;quot;time.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
   class Time&lt;br /&gt;
   {...&lt;br /&gt;
&lt;br /&gt;
In this example, the compiler effectively copies the code within time.h at the point where the #include statement is declared. Nearly all compilers will provide for specifying paths to search for the indicated file and provide rules or conventions for dealing with multiple occurrences of the same file.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Subroutines ==&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
=== Gosub ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Procedures ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Extension ==&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Inheritance ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Polymorphism ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Generics ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Mixins/Modules ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Aspect ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Comparing the Various Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Why Reuse Is Not Always Embraced ==&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
blah!&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Brooks, Jr., F.P. ''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''. Boston, MA: Addison Wesley Longman, Inc., 1995.&lt;br /&gt;
* [http://sourcemaking.com/antipatterns/cut-and-paste-programming | Cut-and-Paste Programming]&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24555</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24555"/>
		<updated>2009-10-09T22:01:41Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse Through Direct Code Use ==&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Cut &amp;amp; Paste ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Subroutines ==&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
=== Gosub ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Procedures ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Code Reuse through Extension ==&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Inheritance ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Polymorphism ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Generics ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Mixins/Modules ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Aspect ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
== Comparing the Various Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Why Reuse Is Not Always Embraced ==&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
blah!&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Brooks, Jr., F.P. ''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''. Boston, MA: Addison Wesley Longman, Inc., 1995.&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24539</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24539"/>
		<updated>2009-10-09T21:57:01Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse Through Direct Code Use ===&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Cut &amp;amp; Paste ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Macros ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Includes ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Subroutines ===&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
==== Gosub ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Procedures ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Extension ===&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Inheritance ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Polymorphism ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Generics ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Mixins/Modules ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Aspect ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Comparing the Various Mechanisms ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why Reuse Is Not Always Embraced ===&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
blah!&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
* Brooks, Jr., F.P. ''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''. Boston, MA: Addison Wesley Longman, Inc., 1995.&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24219</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=24219"/>
		<updated>2009-10-09T18:59:03Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''-&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse Through Direct Code Use ===&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Cut &amp;amp; Paste ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Macros ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Includes ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Subroutines ===&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
==== Gosub ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Procedures ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Extension ===&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Inheritance ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Polymorphism ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Generics ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Mixins/Modules ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Aspect ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Comparing the Various Mechanisms ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why Reuse Is Not Always Embraced ===&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
blah!&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=23377</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=23377"/>
		<updated>2009-10-09T02:31:32Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''-&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse Through Direct Code Use ===&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Cut &amp;amp; Paste ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Macros ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Includes ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Subroutines ===&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
==== Gosub ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Procedures ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Extension ===&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Inheritance ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Polymorphism ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Generics ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Mixins/Modules ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Aspect ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Comparing the Various Mechanisms ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why Reuse Is Not Always Embraced ===&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
blah!&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=23375</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=23375"/>
		<updated>2009-10-09T02:31:10Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''-&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse Through Direct Code Use ===&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Cut &amp;amp; Paste ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Macros ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Includes ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Subroutines ===&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
=== Gosub ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Procedures ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Extension ===&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Inheritance ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Polymorphism ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Generics ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Mixins/Modules ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Aspect ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Comparing the Various Mechanisms ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why Reuse Is Not Always Embraced ===&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
blah!&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=23374</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=23374"/>
		<updated>2009-10-09T02:30:48Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''-&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse Through Direct Code Use ===&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Cut &amp;amp; Paste ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Macros ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Includes ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Subroutines ===&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
==== Gosub ===&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Procedures ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Extension ===&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Inheritance ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Polymorphism ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Generics ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Mixins/Modules ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Aspect ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Comparing the Various Mechanisms ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why Reuse Is Not Always Embraced ===&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
blah!&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=23244</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=23244"/>
		<updated>2009-10-08T23:55:35Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: Initial edit with outline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code Reuse Methods and Mechanisms ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''The best way to attack the essence of building software is not to build it at all.''&lt;br /&gt;
         - [http://en.wikipedia.org/wiki/Fred_Brooks  Fredrick P. Brooks, Jr.],''[http://en.wikipedia.org/wiki/The_Mythical_Man-Month  The Mythical Man-Month]''-&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;accidental tasks&amp;quot;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse Through Direct Code Use ===&lt;br /&gt;
&lt;br /&gt;
There are several classic code reuse mechanisms which work at the fundamental source code level. This section will discuss this class of mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Cut &amp;amp; Paste ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Macros ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Includes ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Subroutines ===&lt;br /&gt;
&lt;br /&gt;
This section explores code reuse mechanisms that involve executing common blocks of code that can provide utility or common operations.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Procedures ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Code Reuse through Extension ===&lt;br /&gt;
&lt;br /&gt;
Many languages allow existing code to be reused through extensions that leave the original code unaltered. This section explores those mechanisms.&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Inheritance ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Polymorphism ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Generics ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Mixins/Modules ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
==== Aspect ====&lt;br /&gt;
&lt;br /&gt;
blah&lt;br /&gt;
&lt;br /&gt;
=== Comparing the Various Mechanisms ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Why Reuse Is Not Always Embraced ===&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
* '''Speed''' -&lt;br /&gt;
* '''Lack of documentation''' -&lt;br /&gt;
* '''Complexity''' -&lt;br /&gt;
* '''Poor Design''' -&lt;br /&gt;
* '''Licensing Issues''' -&lt;br /&gt;
* '''Lack of Trust/Fear''' -&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
blah!&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=22477</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 7 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_7_co&amp;diff=22477"/>
		<updated>2009-10-05T01:40:58Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Code Reuse Mechanisms =&lt;br /&gt;
&lt;br /&gt;
Different languages have different mechanisms for &amp;quot;code reuse&amp;quot;. 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.&lt;br /&gt;
&lt;br /&gt;
== Code Reuse ==&lt;br /&gt;
* Cut &amp;amp; Paste&lt;br /&gt;
* Macros&lt;br /&gt;
* Functions/Methods&lt;br /&gt;
* Includes&lt;br /&gt;
* Libraries&lt;br /&gt;
* Packages&lt;br /&gt;
* Inheritance&lt;br /&gt;
* Polymorphism&lt;br /&gt;
* Generics&lt;br /&gt;
* Mixins/Modules&lt;br /&gt;
* Aspect&lt;br /&gt;
* Patterns&lt;br /&gt;
&lt;br /&gt;
== Reasons Not to Reuse ==&lt;br /&gt;
* Speed&lt;br /&gt;
* Lack of documentation&lt;br /&gt;
* Complexity&lt;br /&gt;
* Poor Design&lt;br /&gt;
* Lack of Trust/Fear&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19562</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 4 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19562"/>
		<updated>2009-09-17T00:31:51Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: /* Why Source Code Control is Necessary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Best Practices For Source-Control Management With Version-Control Systems ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   “Tip 23: '''Always Use Source Code Control'''” &lt;br /&gt;
          – Hunt and Thomas, The Pragmatic Programmer [HT 00]&lt;br /&gt;
&lt;br /&gt;
In software development, change is almost always inevitable [P 05] . Using a source configuration management (SCM) system (also known as a Source Code Control System (SCCS) or version-control system) can help individuals and teams manage the changes that occur during the software development process [D 90]. This article will provide the reader with basic information, and direct the reader to additional reading for more in-depth consideration.&lt;br /&gt;
&lt;br /&gt;
== Why Source Code Control is Necessary ==&lt;br /&gt;
&lt;br /&gt;
Pressman suggests four primary reasons for change [P 05]:&lt;br /&gt;
* New business or market conditions&lt;br /&gt;
* New customer needs&lt;br /&gt;
* Reorganization, business growth, or downsizing&lt;br /&gt;
* Budgetary or scheduling constraints&lt;br /&gt;
Each of these reasons can cause changes in project requirements, in project priorities, or in the resources available to create or enhance a project. An SCM can enable a project team to handle changes in requirements and priorities.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
Company XYZ has asked the developers of ''Software Q'' for a version which tracks product price changes. This change (the Product Price Change feature) will take approximately 4 months to complete. During the second month, Company XYZ has changed it's mind and instead wants to make a change how product pricing is approved (the Product Price Approval feature). &lt;br /&gt;
* If the makers of ''Software Q'' '''do not''' have their product under an SCM, they may find it difficult to reproduce the original software after two months of development. Additionally, they may have made software fixes unrelated to the Product Price Change feature that they would want to keep in the original software, but without an SCM those changes may be indistinguishable from feature changes.&lt;br /&gt;
* If the makers of ''Software Q'' '''do''' have their project under an SCM, they could create two branches for their software development: One for bug fixes and one for the new feature. They could easily go back to the original version and create a new development branch for the Product Pricing Approval feature and still maintain their bug fix branch. In addition, they can archive the Product Pricing Change feature branch and keep it around in case Company XYZ changes it's mind and decides it wants the feature.&lt;br /&gt;
&lt;br /&gt;
Managing changes with an SCM enables engineers to focus on technical work, and enables project managers to control changes which can affect project outcomes. Further, an SCM can maintain a history of the work done on a project so it is easier to understand why changes are made, even well after the original change is made.&lt;br /&gt;
&lt;br /&gt;
== Understanding Basic Concepts ==&lt;br /&gt;
&lt;br /&gt;
For the reader new to SCM, there are a few basic terms and concepts that should be understood before best practices are considered:&lt;br /&gt;
* '''Check-in''' or '''Commit''' – Writing changes to the source code repository&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.lock-unlock.dia-1 '''Lock-Modify-Unlock Model''']: An SCM model that requires a developer to reserve or lock a source file before making changes to the file. This lock prevents other developers from modifying the file.&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.copy-merge.dia-1 '''Change-Modify-Merge Model''']:  An SCM model that allows multiple developers to make changes to a source file. Upon commit, if the source file has been updated by another developer, a merge of the updated file with the developers change is necessary in order to preserve all the updates. Depending on the SCM and the nature of the change, the merge operation may be performed by the SCM or by the developer.&lt;br /&gt;
* '''Revision''' – The version identifier of the source file (e.g. v1, v2, v2.1, etc). Each commit of a source file will produce a new revision value.&lt;br /&gt;
* '''Baseline''' – The root of a development stream, where changes that are intended to be integrated into the main project will eventually migrate.&lt;br /&gt;
* '''Branch''' – An offshoot from the baseline where prototype, testing, or other work can be performed that does not immediately affect the baseline. Eventually, a branch may be merged back into the baseline.&lt;br /&gt;
&lt;br /&gt;
==== Understanding the Two Models ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, SCMs can provide one of two models, the '''Lock-Modify-Unlock Model''' or the '''Change-Modify-Merge Model'''. The following diagrams can help the reader understand a little bit more about the differences between these two models.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Lock-Modify-Unlock.png|Two developers using a Lock-Modify-Unlock modeling SCM]]&lt;br /&gt;
&lt;br /&gt;
This figure demonstrates a Lock-Modify-Unlock SCM model. You can see that when Carmen does a check-out on File1.java, the file is not available to Ramdas for editing. In the picture, Carmen is shown to have direct access to the file in the SCM, but it is more likely that a copy of the file is provided to Carmen. In any case, the end-result is that Carmen has exclusive control over changes to File1.java until he does a check-in or commit.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge1.png|Two developers using a Change-Modify-Merge modeling SCM, Checking-out]]&lt;br /&gt;
&lt;br /&gt;
This figure and the next two figures demonstrate a Change-Modify-Merge SCM model. You can see that both Carmen and Ramdas are able to check-out File1.java and make changes to their private copy. Neither one of them is prevented from making changes to the file.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge2.png|Two developers using a Change-Modify-Merge modeling SCM, First check-in]]&lt;br /&gt;
&lt;br /&gt;
Carmen is the first one to commit or check-in his changes. His changes overwrite the original version with a '''v2''' version.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge3.png|Two developers using a Change-Modify-Merge modeling SCM, Second check-in]]&lt;br /&gt;
&lt;br /&gt;
Now Ramdas attempts to check-in his changes. Because File1.java is a different version than what Ramdas originally checked-out, and additional operation is required before a check-in can be completed: A merge operation. Depending on the type of changes that have been done, and the type of SCM, the merges may be incorporated automatically by the SCM, or the SCM may request guidance from Ramdas before the change is committed. In any case, with this model, both Carmen and Ramdas were able to continue their development work despite both needing to work with the same source code file.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Advice on Using an SCM or SCCS ==&lt;br /&gt;
&lt;br /&gt;
There is differing advice on using an SCM to manage projects, but there are some consistent messages:&lt;br /&gt;
&lt;br /&gt;
* '''Use a source configuration management product:''' When working on teams, there is a general consensus that an SCM will greatly help the team manage changes. Further, Hunt and Thomas [HT 00] suggest that even an individual should use an SCM to manage their work, even if their team does not, because of its ability to archive work and to &amp;quot;undo&amp;quot; mistakes.&lt;br /&gt;
* '''Commit code changes frequently:''' Much of the advice suggests that source code should be [http://www.martinfowler.com/articles/continuousIntegration.html integrated on a regular basis], some even suggesting [http://www.extremeprogramming.org/rules/integrateoften.html checking-in code every few hours].&lt;br /&gt;
* '''In a Lock-Modify-Unlock model, check-out only what you need:''' [http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx This advice] is probably obvious, but in the Lock-Modify-Unlock model, source files will be unavailable for others to update in the Lock phase, so keeping that number of files to a minimum reduces programming team &amp;quot;deadlocks&amp;quot;. For development teams that have the maturity or tooling, a Change-Modify-Merge model reduces the concern about reserving files, but does not eliminate the potential issues (in particular, dealing with [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx merge conflicts]).&lt;br /&gt;
* '''Store tooling as well as source code in the SCM:''' Actually, much advice suggests storing [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices even more artifacts], but in particular, if a software team wants to recreate a specific version of the software, it will likely be crucial to have access to the original tools that created that version, as well as the source code. See section 6 of the white paper [http://www.perforce.com/perforce/papers/bestpractices.html High-level Best Practices in Software Configuration Management] by Laura Wingerd and Christopher Seiwald at Perforce Software. As a corollary to this item, [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx generated code] (object files, executable results of builds, etc.) should '''not''' be stored in the SCM repository. &lt;br /&gt;
* '''Create meaningful comments when committing files:''' By writing descriptive comments about a check-in, it will be easier for someone in the future to understand the rationale behind a change.&lt;br /&gt;
* '''Branch only when needed:''' The [http://www.perforce.com/perforce/papers/bestpractices.html white paper] mentioned previously speaks most to this point in its section 4, but it is also mentioned in [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices other places]. In particular, when more than one version of a software product is being developed concurrently, especially when the rules for checking out and committing source files may be different between the multiple version, branching is necessary to help the development team manage their project effectively.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
SCMs provide a valuable tool for helping software developers manage change in a software project. Following some of the recommendations presented, a software development team can gain the most effectiveness from the use of SCMs.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
These links and resources can help the reader further understand the need for source code control:&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf, pp. 176-178.&lt;br /&gt;
* Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990. Review pp. 1-4.&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html, review the Forward section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]. Review the section titled “So Why Do We Need A Version Control System (VCS)?”&lt;br /&gt;
* Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-742, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
&lt;br /&gt;
These links can provide the reader with additional information on SCM vocabulary:&lt;br /&gt;
&lt;br /&gt;
* [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx Developing with Source Code Control - Best Practices Part 2]: Review the '''Vocabulary''' section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]: Review the '''Learn the Lingo''' section.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Source_Code_Management#Common_vocabulary Revision Control] in Wikipedia. Review the '''Common Vocabulary''' section.&lt;br /&gt;
&lt;br /&gt;
Review these references for additional information on SCM best practices:&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19558</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 4 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19558"/>
		<updated>2009-09-17T00:29:38Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: /* Understanding the Two Models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Best Practices For Source-Control Management With Version-Control Systems ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   “Tip 23: '''Always Use Source Code Control'''” &lt;br /&gt;
          – Hunt and Thomas, The Pragmatic Programmer [HT 00]&lt;br /&gt;
&lt;br /&gt;
In software development, change is almost always inevitable [P 05] . Using a source configuration management (SCM) system (also known as a Source Code Control System (SCCS) or version-control system) can help individuals and teams manage the changes that occur during the software development process [D 90]. This article will provide the reader with basic information, and direct the reader to additional reading for more in-depth consideration.&lt;br /&gt;
&lt;br /&gt;
== Why Source Code Control is Necessary ==&lt;br /&gt;
&lt;br /&gt;
According to Pressman, “Change is inevitable when computer software is built. [P 05]” He suggests four primary reasons for change:&lt;br /&gt;
* New business or market conditions&lt;br /&gt;
* New customer needs&lt;br /&gt;
* Reorganization, business growth, or downsizing&lt;br /&gt;
* Budgetary or scheduling constraints&lt;br /&gt;
Each of these reasons can cause changes in project requirements, in project priorities, or in the resources available to create or enhance a project. An SCM can enable a project team to handle changes in requirements and priorities.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
Company XYZ has asked the developers of ''Software Q'' for a version which tracks product price changes. This change (the Product Price Change feature) will take approximately 4 months to complete. During the second month, Company XYZ has changed it's mind and instead wants to make a change how product pricing is approved (the Product Price Approval feature). &lt;br /&gt;
* If the makers of ''Software Q'' '''do not''' have their product under an SCM, they may find it difficult to reproduce the original software after two months of development. Additionally, they may have made software fixes unrelated to the Product Price Change feature that they would want to keep in the original software, but without an SCM those changes may be indistinguishable from feature changes.&lt;br /&gt;
* If the makers of ''Software Q'' '''do''' have their project under an SCM, they could create two branches for their software development: One for bug fixes and one for the new feature. They could easily go back to the original version and create a new development branch for the Product Pricing Approval feature and still maintain their bug fix branch. In addition, they can archive the Product Pricing Change feature branch and keep it around in case Company XYZ changes it's mind and decides it wants the feature.&lt;br /&gt;
&lt;br /&gt;
Managing changes with an SCM enables engineers to focus on technical work, and enables project managers to control changes which can affect project outcomes. Further, an SCM can maintain a history of the work done on a project so it is easier to understand why changes are made, even well after the original change is made.&lt;br /&gt;
&lt;br /&gt;
== Understanding Basic Concepts ==&lt;br /&gt;
&lt;br /&gt;
For the reader new to SCM, there are a few basic terms and concepts that should be understood before best practices are considered:&lt;br /&gt;
* '''Check-in''' or '''Commit''' – Writing changes to the source code repository&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.lock-unlock.dia-1 '''Lock-Modify-Unlock Model''']: An SCM model that requires a developer to reserve or lock a source file before making changes to the file. This lock prevents other developers from modifying the file.&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.copy-merge.dia-1 '''Change-Modify-Merge Model''']:  An SCM model that allows multiple developers to make changes to a source file. Upon commit, if the source file has been updated by another developer, a merge of the updated file with the developers change is necessary in order to preserve all the updates. Depending on the SCM and the nature of the change, the merge operation may be performed by the SCM or by the developer.&lt;br /&gt;
* '''Revision''' – The version identifier of the source file (e.g. v1, v2, v2.1, etc). Each commit of a source file will produce a new revision value.&lt;br /&gt;
* '''Baseline''' – The root of a development stream, where changes that are intended to be integrated into the main project will eventually migrate.&lt;br /&gt;
* '''Branch''' – An offshoot from the baseline where prototype, testing, or other work can be performed that does not immediately affect the baseline. Eventually, a branch may be merged back into the baseline.&lt;br /&gt;
&lt;br /&gt;
==== Understanding the Two Models ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, SCMs can provide one of two models, the '''Lock-Modify-Unlock Model''' or the '''Change-Modify-Merge Model'''. The following diagrams can help the reader understand a little bit more about the differences between these two models.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Lock-Modify-Unlock.png|Two developers using a Lock-Modify-Unlock modeling SCM]]&lt;br /&gt;
&lt;br /&gt;
This figure demonstrates a Lock-Modify-Unlock SCM model. You can see that when Carmen does a check-out on File1.java, the file is not available to Ramdas for editing. In the picture, Carmen is shown to have direct access to the file in the SCM, but it is more likely that a copy of the file is provided to Carmen. In any case, the end-result is that Carmen has exclusive control over changes to File1.java until he does a check-in or commit.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge1.png|Two developers using a Change-Modify-Merge modeling SCM, Checking-out]]&lt;br /&gt;
&lt;br /&gt;
This figure and the next two figures demonstrate a Change-Modify-Merge SCM model. You can see that both Carmen and Ramdas are able to check-out File1.java and make changes to their private copy. Neither one of them is prevented from making changes to the file.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge2.png|Two developers using a Change-Modify-Merge modeling SCM, First check-in]]&lt;br /&gt;
&lt;br /&gt;
Carmen is the first one to commit or check-in his changes. His changes overwrite the original version with a '''v2''' version.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge3.png|Two developers using a Change-Modify-Merge modeling SCM, Second check-in]]&lt;br /&gt;
&lt;br /&gt;
Now Ramdas attempts to check-in his changes. Because File1.java is a different version than what Ramdas originally checked-out, and additional operation is required before a check-in can be completed: A merge operation. Depending on the type of changes that have been done, and the type of SCM, the merges may be incorporated automatically by the SCM, or the SCM may request guidance from Ramdas before the change is committed. In any case, with this model, both Carmen and Ramdas were able to continue their development work despite both needing to work with the same source code file.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Advice on Using an SCM or SCCS ==&lt;br /&gt;
&lt;br /&gt;
There is differing advice on using an SCM to manage projects, but there are some consistent messages:&lt;br /&gt;
&lt;br /&gt;
* '''Use a source configuration management product:''' When working on teams, there is a general consensus that an SCM will greatly help the team manage changes. Further, Hunt and Thomas [HT 00] suggest that even an individual should use an SCM to manage their work, even if their team does not, because of its ability to archive work and to &amp;quot;undo&amp;quot; mistakes.&lt;br /&gt;
* '''Commit code changes frequently:''' Much of the advice suggests that source code should be [http://www.martinfowler.com/articles/continuousIntegration.html integrated on a regular basis], some even suggesting [http://www.extremeprogramming.org/rules/integrateoften.html checking-in code every few hours].&lt;br /&gt;
* '''In a Lock-Modify-Unlock model, check-out only what you need:''' [http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx This advice] is probably obvious, but in the Lock-Modify-Unlock model, source files will be unavailable for others to update in the Lock phase, so keeping that number of files to a minimum reduces programming team &amp;quot;deadlocks&amp;quot;. For development teams that have the maturity or tooling, a Change-Modify-Merge model reduces the concern about reserving files, but does not eliminate the potential issues (in particular, dealing with [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx merge conflicts]).&lt;br /&gt;
* '''Store tooling as well as source code in the SCM:''' Actually, much advice suggests storing [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices even more artifacts], but in particular, if a software team wants to recreate a specific version of the software, it will likely be crucial to have access to the original tools that created that version, as well as the source code. See section 6 of the white paper [http://www.perforce.com/perforce/papers/bestpractices.html High-level Best Practices in Software Configuration Management] by Laura Wingerd and Christopher Seiwald at Perforce Software. As a corollary to this item, [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx generated code] (object files, executable results of builds, etc.) should '''not''' be stored in the SCM repository. &lt;br /&gt;
* '''Create meaningful comments when committing files:''' By writing descriptive comments about a check-in, it will be easier for someone in the future to understand the rationale behind a change.&lt;br /&gt;
* '''Branch only when needed:''' The [http://www.perforce.com/perforce/papers/bestpractices.html white paper] mentioned previously speaks most to this point in its section 4, but it is also mentioned in [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices other places]. In particular, when more than one version of a software product is being developed concurrently, especially when the rules for checking out and committing source files may be different between the multiple version, branching is necessary to help the development team manage their project effectively.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
SCMs provide a valuable tool for helping software developers manage change in a software project. Following some of the recommendations presented, a software development team can gain the most effectiveness from the use of SCMs.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
These links and resources can help the reader further understand the need for source code control:&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf, pp. 176-178.&lt;br /&gt;
* Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990. Review pp. 1-4.&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html, review the Forward section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]. Review the section titled “So Why Do We Need A Version Control System (VCS)?”&lt;br /&gt;
* Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-742, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
&lt;br /&gt;
These links can provide the reader with additional information on SCM vocabulary:&lt;br /&gt;
&lt;br /&gt;
* [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx Developing with Source Code Control - Best Practices Part 2]: Review the '''Vocabulary''' section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]: Review the '''Learn the Lingo''' section.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Source_Code_Management#Common_vocabulary Revision Control] in Wikipedia. Review the '''Common Vocabulary''' section.&lt;br /&gt;
&lt;br /&gt;
Review these references for additional information on SCM best practices:&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19557</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 4 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19557"/>
		<updated>2009-09-17T00:27:55Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: /* Understanding Basic Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Best Practices For Source-Control Management With Version-Control Systems ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   “Tip 23: '''Always Use Source Code Control'''” &lt;br /&gt;
          – Hunt and Thomas, The Pragmatic Programmer [HT 00]&lt;br /&gt;
&lt;br /&gt;
In software development, change is almost always inevitable [P 05] . Using a source configuration management (SCM) system (also known as a Source Code Control System (SCCS) or version-control system) can help individuals and teams manage the changes that occur during the software development process [D 90]. This article will provide the reader with basic information, and direct the reader to additional reading for more in-depth consideration.&lt;br /&gt;
&lt;br /&gt;
== Why Source Code Control is Necessary ==&lt;br /&gt;
&lt;br /&gt;
According to Pressman, “Change is inevitable when computer software is built. [P 05]” He suggests four primary reasons for change:&lt;br /&gt;
* New business or market conditions&lt;br /&gt;
* New customer needs&lt;br /&gt;
* Reorganization, business growth, or downsizing&lt;br /&gt;
* Budgetary or scheduling constraints&lt;br /&gt;
Each of these reasons can cause changes in project requirements, in project priorities, or in the resources available to create or enhance a project. An SCM can enable a project team to handle changes in requirements and priorities.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
Company XYZ has asked the developers of ''Software Q'' for a version which tracks product price changes. This change (the Product Price Change feature) will take approximately 4 months to complete. During the second month, Company XYZ has changed it's mind and instead wants to make a change how product pricing is approved (the Product Price Approval feature). &lt;br /&gt;
* If the makers of ''Software Q'' '''do not''' have their product under an SCM, they may find it difficult to reproduce the original software after two months of development. Additionally, they may have made software fixes unrelated to the Product Price Change feature that they would want to keep in the original software, but without an SCM those changes may be indistinguishable from feature changes.&lt;br /&gt;
* If the makers of ''Software Q'' '''do''' have their project under an SCM, they could create two branches for their software development: One for bug fixes and one for the new feature. They could easily go back to the original version and create a new development branch for the Product Pricing Approval feature and still maintain their bug fix branch. In addition, they can archive the Product Pricing Change feature branch and keep it around in case Company XYZ changes it's mind and decides it wants the feature.&lt;br /&gt;
&lt;br /&gt;
Managing changes with an SCM enables engineers to focus on technical work, and enables project managers to control changes which can affect project outcomes. Further, an SCM can maintain a history of the work done on a project so it is easier to understand why changes are made, even well after the original change is made.&lt;br /&gt;
&lt;br /&gt;
== Understanding Basic Concepts ==&lt;br /&gt;
&lt;br /&gt;
For the reader new to SCM, there are a few basic terms and concepts that should be understood before best practices are considered:&lt;br /&gt;
* '''Check-in''' or '''Commit''' – Writing changes to the source code repository&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.lock-unlock.dia-1 '''Lock-Modify-Unlock Model''']: An SCM model that requires a developer to reserve or lock a source file before making changes to the file. This lock prevents other developers from modifying the file.&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.copy-merge.dia-1 '''Change-Modify-Merge Model''']:  An SCM model that allows multiple developers to make changes to a source file. Upon commit, if the source file has been updated by another developer, a merge of the updated file with the developers change is necessary in order to preserve all the updates. Depending on the SCM and the nature of the change, the merge operation may be performed by the SCM or by the developer.&lt;br /&gt;
* '''Revision''' – The version identifier of the source file (e.g. v1, v2, v2.1, etc). Each commit of a source file will produce a new revision value.&lt;br /&gt;
* '''Baseline''' – The root of a development stream, where changes that are intended to be integrated into the main project will eventually migrate.&lt;br /&gt;
* '''Branch''' – An offshoot from the baseline where prototype, testing, or other work can be performed that does not immediately affect the baseline. Eventually, a branch may be merged back into the baseline.&lt;br /&gt;
&lt;br /&gt;
==== Understanding the Two Models ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, SCMs can provide one of two models, the '''Lock-Modify-Unlock Model''' or the '''Change-Modify-Merge Model'''. The following diagrams can help the reader understand a little bit more about the differences between these two models.&lt;br /&gt;
&lt;br /&gt;
This figure demonstrates a Lock-Modify-Unlock SCM model. You can see that when Carmen does a check-out on File1.java, the file is not available to Ramdas for editing. In the picture, Carmen is shown to have direct access to the file in the SCM, but it is more likely that a copy of the file is provided to Carmen. In any case, the end-result is that Carmen has exclusive control over changes to File1.java until he does a check-in or commit.&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Lock-Modify-Unlock.png|Two developers using a Lock-Modify-Unlock modeling SCM]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This figure and the next two figures demonstrate a Change-Modify-Merge SCM model. You can see that both Carmen and Ramdas are able to check-out File1.java and make changes to their private copy. Neither one of them is prevented from making changes to the file.&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge1.png|Two developers using a Change-Modify-Merge modeling SCM, Checking-out]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Carmen is the first one to commit or check-in his changes. His changes overwrite the original version with a '''v2''' version.&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge2.png|Two developers using a Change-Modify-Merge modeling SCM, First check-in]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Now Ramdas attempts to check-in his changes. Because File1.java is a different version than what Ramdas originally checked-out, and additional operation is required before a check-in can be completed: A merge operation. Depending on the type of changes that have been done, and the type of SCM, the merges may be incorporated automatically by the SCM, or the SCM may request guidance from Ramdas before the change is committed. In any case, with this model, both Carmen and Ramdas were able to continue their development work despite both needing to work with the same source code file.&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge3.png|Two developers using a Change-Modify-Merge modeling SCM, Second check-in]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Advice on Using an SCM or SCCS ==&lt;br /&gt;
&lt;br /&gt;
There is differing advice on using an SCM to manage projects, but there are some consistent messages:&lt;br /&gt;
&lt;br /&gt;
* '''Use a source configuration management product:''' When working on teams, there is a general consensus that an SCM will greatly help the team manage changes. Further, Hunt and Thomas [HT 00] suggest that even an individual should use an SCM to manage their work, even if their team does not, because of its ability to archive work and to &amp;quot;undo&amp;quot; mistakes.&lt;br /&gt;
* '''Commit code changes frequently:''' Much of the advice suggests that source code should be [http://www.martinfowler.com/articles/continuousIntegration.html integrated on a regular basis], some even suggesting [http://www.extremeprogramming.org/rules/integrateoften.html checking-in code every few hours].&lt;br /&gt;
* '''In a Lock-Modify-Unlock model, check-out only what you need:''' [http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx This advice] is probably obvious, but in the Lock-Modify-Unlock model, source files will be unavailable for others to update in the Lock phase, so keeping that number of files to a minimum reduces programming team &amp;quot;deadlocks&amp;quot;. For development teams that have the maturity or tooling, a Change-Modify-Merge model reduces the concern about reserving files, but does not eliminate the potential issues (in particular, dealing with [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx merge conflicts]).&lt;br /&gt;
* '''Store tooling as well as source code in the SCM:''' Actually, much advice suggests storing [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices even more artifacts], but in particular, if a software team wants to recreate a specific version of the software, it will likely be crucial to have access to the original tools that created that version, as well as the source code. See section 6 of the white paper [http://www.perforce.com/perforce/papers/bestpractices.html High-level Best Practices in Software Configuration Management] by Laura Wingerd and Christopher Seiwald at Perforce Software. As a corollary to this item, [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx generated code] (object files, executable results of builds, etc.) should '''not''' be stored in the SCM repository. &lt;br /&gt;
* '''Create meaningful comments when committing files:''' By writing descriptive comments about a check-in, it will be easier for someone in the future to understand the rationale behind a change.&lt;br /&gt;
* '''Branch only when needed:''' The [http://www.perforce.com/perforce/papers/bestpractices.html white paper] mentioned previously speaks most to this point in its section 4, but it is also mentioned in [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices other places]. In particular, when more than one version of a software product is being developed concurrently, especially when the rules for checking out and committing source files may be different between the multiple version, branching is necessary to help the development team manage their project effectively.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
SCMs provide a valuable tool for helping software developers manage change in a software project. Following some of the recommendations presented, a software development team can gain the most effectiveness from the use of SCMs.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
These links and resources can help the reader further understand the need for source code control:&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf, pp. 176-178.&lt;br /&gt;
* Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990. Review pp. 1-4.&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html, review the Forward section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]. Review the section titled “So Why Do We Need A Version Control System (VCS)?”&lt;br /&gt;
* Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-742, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
&lt;br /&gt;
These links can provide the reader with additional information on SCM vocabulary:&lt;br /&gt;
&lt;br /&gt;
* [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx Developing with Source Code Control - Best Practices Part 2]: Review the '''Vocabulary''' section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]: Review the '''Learn the Lingo''' section.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Source_Code_Management#Common_vocabulary Revision Control] in Wikipedia. Review the '''Common Vocabulary''' section.&lt;br /&gt;
&lt;br /&gt;
Review these references for additional information on SCM best practices:&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19555</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 4 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19555"/>
		<updated>2009-09-17T00:10:01Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: /* Understanding Basic Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Best Practices For Source-Control Management With Version-Control Systems ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   “Tip 23: '''Always Use Source Code Control'''” &lt;br /&gt;
          – Hunt and Thomas, The Pragmatic Programmer [HT 00]&lt;br /&gt;
&lt;br /&gt;
In software development, change is almost always inevitable [P 05] . Using a source configuration management (SCM) system (also known as a Source Code Control System (SCCS) or version-control system) can help individuals and teams manage the changes that occur during the software development process [D 90]. This article will provide the reader with basic information, and direct the reader to additional reading for more in-depth consideration.&lt;br /&gt;
&lt;br /&gt;
== Why Source Code Control is Necessary ==&lt;br /&gt;
&lt;br /&gt;
According to Pressman, “Change is inevitable when computer software is built. [P 05]” He suggests four primary reasons for change:&lt;br /&gt;
* New business or market conditions&lt;br /&gt;
* New customer needs&lt;br /&gt;
* Reorganization, business growth, or downsizing&lt;br /&gt;
* Budgetary or scheduling constraints&lt;br /&gt;
Each of these reasons can cause changes in project requirements, in project priorities, or in the resources available to create or enhance a project. An SCM can enable a project team to handle changes in requirements and priorities.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
Company XYZ has asked the developers of ''Software Q'' for a version which tracks product price changes. This change (the Product Price Change feature) will take approximately 4 months to complete. During the second month, Company XYZ has changed it's mind and instead wants to make a change how product pricing is approved (the Product Price Approval feature). &lt;br /&gt;
* If the makers of ''Software Q'' '''do not''' have their product under an SCM, they may find it difficult to reproduce the original software after two months of development. Additionally, they may have made software fixes unrelated to the Product Price Change feature that they would want to keep in the original software, but without an SCM those changes may be indistinguishable from feature changes.&lt;br /&gt;
* If the makers of ''Software Q'' '''do''' have their project under an SCM, they could create two branches for their software development: One for bug fixes and one for the new feature. They could easily go back to the original version and create a new development branch for the Product Pricing Approval feature and still maintain their bug fix branch. In addition, they can archive the Product Pricing Change feature branch and keep it around in case Company XYZ changes it's mind and decides it wants the feature.&lt;br /&gt;
&lt;br /&gt;
Managing changes with an SCM enables engineers to focus on technical work, and enables project managers to control changes which can affect project outcomes. Further, an SCM can maintain a history of the work done on a project so it is easier to understand why changes are made, even well after the original change is made.&lt;br /&gt;
&lt;br /&gt;
== Understanding Basic Concepts ==&lt;br /&gt;
&lt;br /&gt;
For the reader new to SCM, there are a few basic terms and concepts that should be understood before best practices are considered:&lt;br /&gt;
* '''Check-in''' or '''Commit''' – Writing changes to the source code repository&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.lock-unlock.dia-1 '''Lock-Modify-Unlock Model''']: An SCM model that requires a developer to reserve or lock a source file before making changes to the file. This lock prevents other developers from modifying the file.&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.copy-merge.dia-1 '''Change-Modify-Merge Model''']:  An SCM model that allows multiple developers to make changes to a source file. Upon commit, if the source file has been updated by another developer, a merge of the updated file with the developers change is necessary in order to preserve all the updates. Depending on the SCM and the nature of the change, the merge operation may be performed by the SCM or by the developer.&lt;br /&gt;
* '''Revision''' – The version identifier of the source file (e.g. v1, v2, v2.1, etc). Each commit of a source file will produce a new revision value.&lt;br /&gt;
* '''Baseline''' – The root of a development stream, where changes that are intended to be integrated into the main project will eventually migrate.&lt;br /&gt;
* '''Branch''' – An offshoot from the baseline where prototype, testing, or other work can be performed that does not immediately affect the baseline. Eventually, a branch may be merged back into the baseline.&lt;br /&gt;
&lt;br /&gt;
==== Understanding the Two Models ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, SCMs can provide one of two models, the '''Lock-Modify-Unlock Model''' or the '''Change-Modify-Merge Model'''. The following diagrams can help the reader understand a little bit more about the differences between these two models.&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Lock-Modify-Unlock.png|Two developers using a Lock-Modify-Unlock modeling SCM]]&lt;br /&gt;
&lt;br /&gt;
Text&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge1.png|Two developers using a Change-Modify-Merge modeling SCM, Checking-out]]&lt;br /&gt;
&lt;br /&gt;
Text&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge2.png|Two developers using a Change-Modify-Merge modeling SCM, First check-in]]&lt;br /&gt;
&lt;br /&gt;
Text&lt;br /&gt;
&lt;br /&gt;
[[Image:SCM-Change-Modify-Merge3.png|Two developers using a Change-Modify-Merge modeling SCM, Second check-in]]&lt;br /&gt;
&lt;br /&gt;
Text&lt;br /&gt;
&lt;br /&gt;
== Advice on Using an SCM or SCCS ==&lt;br /&gt;
&lt;br /&gt;
There is differing advice on using an SCM to manage projects, but there are some consistent messages:&lt;br /&gt;
&lt;br /&gt;
* '''Use a source configuration management product:''' When working on teams, there is a general consensus that an SCM will greatly help the team manage changes. Further, Hunt and Thomas [HT 00] suggest that even an individual should use an SCM to manage their work, even if their team does not, because of its ability to archive work and to &amp;quot;undo&amp;quot; mistakes.&lt;br /&gt;
* '''Commit code changes frequently:''' Much of the advice suggests that source code should be [http://www.martinfowler.com/articles/continuousIntegration.html integrated on a regular basis], some even suggesting [http://www.extremeprogramming.org/rules/integrateoften.html checking-in code every few hours].&lt;br /&gt;
* '''In a Lock-Modify-Unlock model, check-out only what you need:''' [http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx This advice] is probably obvious, but in the Lock-Modify-Unlock model, source files will be unavailable for others to update in the Lock phase, so keeping that number of files to a minimum reduces programming team &amp;quot;deadlocks&amp;quot;. For development teams that have the maturity or tooling, a Change-Modify-Merge model reduces the concern about reserving files, but does not eliminate the potential issues (in particular, dealing with [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx merge conflicts]).&lt;br /&gt;
* '''Store tooling as well as source code in the SCM:''' Actually, much advice suggests storing [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices even more artifacts], but in particular, if a software team wants to recreate a specific version of the software, it will likely be crucial to have access to the original tools that created that version, as well as the source code. See section 6 of the white paper [http://www.perforce.com/perforce/papers/bestpractices.html High-level Best Practices in Software Configuration Management] by Laura Wingerd and Christopher Seiwald at Perforce Software. As a corollary to this item, [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx generated code] (object files, executable results of builds, etc.) should '''not''' be stored in the SCM repository. &lt;br /&gt;
* '''Create meaningful comments when committing files:''' By writing descriptive comments about a check-in, it will be easier for someone in the future to understand the rationale behind a change.&lt;br /&gt;
* '''Branch only when needed:''' The [http://www.perforce.com/perforce/papers/bestpractices.html white paper] mentioned previously speaks most to this point in its section 4, but it is also mentioned in [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices other places]. In particular, when more than one version of a software product is being developed concurrently, especially when the rules for checking out and committing source files may be different between the multiple version, branching is necessary to help the development team manage their project effectively.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
SCMs provide a valuable tool for helping software developers manage change in a software project. Following some of the recommendations presented, a software development team can gain the most effectiveness from the use of SCMs.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
These links and resources can help the reader further understand the need for source code control:&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf, pp. 176-178.&lt;br /&gt;
* Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990. Review pp. 1-4.&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html, review the Forward section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]. Review the section titled “So Why Do We Need A Version Control System (VCS)?”&lt;br /&gt;
* Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-742, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
&lt;br /&gt;
These links can provide the reader with additional information on SCM vocabulary:&lt;br /&gt;
&lt;br /&gt;
* [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx Developing with Source Code Control - Best Practices Part 2]: Review the '''Vocabulary''' section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]: Review the '''Learn the Lingo''' section.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Source_Code_Management#Common_vocabulary Revision Control] in Wikipedia. Review the '''Common Vocabulary''' section.&lt;br /&gt;
&lt;br /&gt;
Review these references for additional information on SCM best practices:&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SCM-Change-Modify-Merge3.png&amp;diff=19554</id>
		<title>File:SCM-Change-Modify-Merge3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SCM-Change-Modify-Merge3.png&amp;diff=19554"/>
		<updated>2009-09-17T00:04:15Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: Two developers working with a Change-Modify-Merge modeling SCM (3 of 3).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Two developers working with a Change-Modify-Merge modeling SCM (3 of 3).&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SCM-Change-Modify-Merge2.png&amp;diff=19553</id>
		<title>File:SCM-Change-Modify-Merge2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SCM-Change-Modify-Merge2.png&amp;diff=19553"/>
		<updated>2009-09-17T00:04:05Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: Two developers working with a Change-Modify-Merge modeling SCM (2 of 3).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Two developers working with a Change-Modify-Merge modeling SCM (2 of 3).&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SCM-Change-Modify-Merge1.png&amp;diff=19552</id>
		<title>File:SCM-Change-Modify-Merge1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SCM-Change-Modify-Merge1.png&amp;diff=19552"/>
		<updated>2009-09-17T00:03:52Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: Two developers working with a Change-Modify-Merge modeling SCM (1 of 3).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Two developers working with a Change-Modify-Merge modeling SCM (1 of 3).&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SCM-Lock-Modify-Unlock.png&amp;diff=19551</id>
		<title>File:SCM-Lock-Modify-Unlock.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SCM-Lock-Modify-Unlock.png&amp;diff=19551"/>
		<updated>2009-09-17T00:03:18Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: Two developers working with a Lock-Modify-Unlock modeling SCM.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Two developers working with a Lock-Modify-Unlock modeling SCM.&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19550</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 4 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19550"/>
		<updated>2009-09-17T00:01:46Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: /* Understanding Basic Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Best Practices For Source-Control Management With Version-Control Systems ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   “Tip 23: '''Always Use Source Code Control'''” &lt;br /&gt;
          – Hunt and Thomas, The Pragmatic Programmer [HT 00]&lt;br /&gt;
&lt;br /&gt;
In software development, change is almost always inevitable [P 05] . Using a source configuration management (SCM) system (also known as a Source Code Control System (SCCS) or version-control system) can help individuals and teams manage the changes that occur during the software development process [D 90]. This article will provide the reader with basic information, and direct the reader to additional reading for more in-depth consideration.&lt;br /&gt;
&lt;br /&gt;
== Why Source Code Control is Necessary ==&lt;br /&gt;
&lt;br /&gt;
According to Pressman, “Change is inevitable when computer software is built. [P 05]” He suggests four primary reasons for change:&lt;br /&gt;
* New business or market conditions&lt;br /&gt;
* New customer needs&lt;br /&gt;
* Reorganization, business growth, or downsizing&lt;br /&gt;
* Budgetary or scheduling constraints&lt;br /&gt;
Each of these reasons can cause changes in project requirements, in project priorities, or in the resources available to create or enhance a project. An SCM can enable a project team to handle changes in requirements and priorities.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
Company XYZ has asked the developers of ''Software Q'' for a version which tracks product price changes. This change (the Product Price Change feature) will take approximately 4 months to complete. During the second month, Company XYZ has changed it's mind and instead wants to make a change how product pricing is approved (the Product Price Approval feature). &lt;br /&gt;
* If the makers of ''Software Q'' '''do not''' have their product under an SCM, they may find it difficult to reproduce the original software after two months of development. Additionally, they may have made software fixes unrelated to the Product Price Change feature that they would want to keep in the original software, but without an SCM those changes may be indistinguishable from feature changes.&lt;br /&gt;
* If the makers of ''Software Q'' '''do''' have their project under an SCM, they could create two branches for their software development: One for bug fixes and one for the new feature. They could easily go back to the original version and create a new development branch for the Product Pricing Approval feature and still maintain their bug fix branch. In addition, they can archive the Product Pricing Change feature branch and keep it around in case Company XYZ changes it's mind and decides it wants the feature.&lt;br /&gt;
&lt;br /&gt;
Managing changes with an SCM enables engineers to focus on technical work, and enables project managers to control changes which can affect project outcomes. Further, an SCM can maintain a history of the work done on a project so it is easier to understand why changes are made, even well after the original change is made.&lt;br /&gt;
&lt;br /&gt;
== Understanding Basic Concepts ==&lt;br /&gt;
&lt;br /&gt;
For the reader new to SCM, there are a few basic terms and concepts that should be understood before best practices are considered:&lt;br /&gt;
* '''Check-in''' or '''Commit''' – Writing changes to the source code repository&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.lock-unlock.dia-1 '''Lock-Modify-Unlock Model''']: An SCM model that requires a developer to reserve or lock a source file before making changes to the file. This lock prevents other developers from modifying the file.&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.copy-merge.dia-1 '''Change-Modify-Merge Model''']:  An SCM model that allows multiple developers to make changes to a source file. Upon commit, if the source file has been updated by another developer, a merge of the updated file with the developers change is necessary in order to preserve all the updates. Depending on the SCM and the nature of the change, the merge operation may be performed by the SCM or by the developer.&lt;br /&gt;
* '''Revision''' – The version identifier of the source file (e.g. v1, v2, v2.1, etc). Each commit of a source file will produce a new revision value.&lt;br /&gt;
* '''Baseline''' – The root of a development stream, where changes that are intended to be integrated into the main project will eventually migrate.&lt;br /&gt;
* '''Branch''' – An offshoot from the baseline where prototype, testing, or other work can be performed that does not immediately affect the baseline. Eventually, a branch may be merged back into the baseline.&lt;br /&gt;
&lt;br /&gt;
==== Understanding the Two Models ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, SCMs can provide one of two models, the '''Lock-Modify-Unlock Model''' or the '''Change-Modify-Merge Model'''. The following diagrams can help the reader understand a little bit more about the differences between these two models.&lt;br /&gt;
&lt;br /&gt;
== Advice on Using an SCM or SCCS ==&lt;br /&gt;
&lt;br /&gt;
There is differing advice on using an SCM to manage projects, but there are some consistent messages:&lt;br /&gt;
&lt;br /&gt;
* '''Use a source configuration management product:''' When working on teams, there is a general consensus that an SCM will greatly help the team manage changes. Further, Hunt and Thomas [HT 00] suggest that even an individual should use an SCM to manage their work, even if their team does not, because of its ability to archive work and to &amp;quot;undo&amp;quot; mistakes.&lt;br /&gt;
* '''Commit code changes frequently:''' Much of the advice suggests that source code should be [http://www.martinfowler.com/articles/continuousIntegration.html integrated on a regular basis], some even suggesting [http://www.extremeprogramming.org/rules/integrateoften.html checking-in code every few hours].&lt;br /&gt;
* '''In a Lock-Modify-Unlock model, check-out only what you need:''' [http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx This advice] is probably obvious, but in the Lock-Modify-Unlock model, source files will be unavailable for others to update in the Lock phase, so keeping that number of files to a minimum reduces programming team &amp;quot;deadlocks&amp;quot;. For development teams that have the maturity or tooling, a Change-Modify-Merge model reduces the concern about reserving files, but does not eliminate the potential issues (in particular, dealing with [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx merge conflicts]).&lt;br /&gt;
* '''Store tooling as well as source code in the SCM:''' Actually, much advice suggests storing [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices even more artifacts], but in particular, if a software team wants to recreate a specific version of the software, it will likely be crucial to have access to the original tools that created that version, as well as the source code. See section 6 of the white paper [http://www.perforce.com/perforce/papers/bestpractices.html High-level Best Practices in Software Configuration Management] by Laura Wingerd and Christopher Seiwald at Perforce Software. As a corollary to this item, [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx generated code] (object files, executable results of builds, etc.) should '''not''' be stored in the SCM repository. &lt;br /&gt;
* '''Create meaningful comments when committing files:''' By writing descriptive comments about a check-in, it will be easier for someone in the future to understand the rationale behind a change.&lt;br /&gt;
* '''Branch only when needed:''' The [http://www.perforce.com/perforce/papers/bestpractices.html white paper] mentioned previously speaks most to this point in its section 4, but it is also mentioned in [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices other places]. In particular, when more than one version of a software product is being developed concurrently, especially when the rules for checking out and committing source files may be different between the multiple version, branching is necessary to help the development team manage their project effectively.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
SCMs provide a valuable tool for helping software developers manage change in a software project. Following some of the recommendations presented, a software development team can gain the most effectiveness from the use of SCMs.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
These links and resources can help the reader further understand the need for source code control:&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf, pp. 176-178.&lt;br /&gt;
* Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990. Review pp. 1-4.&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html, review the Forward section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]. Review the section titled “So Why Do We Need A Version Control System (VCS)?”&lt;br /&gt;
* Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-742, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
&lt;br /&gt;
These links can provide the reader with additional information on SCM vocabulary:&lt;br /&gt;
&lt;br /&gt;
* [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx Developing with Source Code Control - Best Practices Part 2]: Review the '''Vocabulary''' section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]: Review the '''Learn the Lingo''' section.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Source_Code_Management#Common_vocabulary Revision Control] in Wikipedia. Review the '''Common Vocabulary''' section.&lt;br /&gt;
&lt;br /&gt;
Review these references for additional information on SCM best practices:&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19538</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 4 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19538"/>
		<updated>2009-09-16T23:32:34Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Best Practices For Source-Control Management With Version-Control Systems ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   “Tip 23: '''Always Use Source Code Control'''” &lt;br /&gt;
          – Hunt and Thomas, The Pragmatic Programmer [HT 00]&lt;br /&gt;
&lt;br /&gt;
In software development, change is almost always inevitable [P 05] . Using a source configuration management (SCM) system (also known as a Source Code Control System (SCCS) or version-control system) can help individuals and teams manage the changes that occur during the software development process [D 90]. This article will provide the reader with basic information, and direct the reader to additional reading for more in-depth consideration.&lt;br /&gt;
&lt;br /&gt;
== Why Source Code Control is Necessary ==&lt;br /&gt;
&lt;br /&gt;
According to Pressman, “Change is inevitable when computer software is built. [P 05]” He suggests four primary reasons for change:&lt;br /&gt;
* New business or market conditions&lt;br /&gt;
* New customer needs&lt;br /&gt;
* Reorganization, business growth, or downsizing&lt;br /&gt;
* Budgetary or scheduling constraints&lt;br /&gt;
Each of these reasons can cause changes in project requirements, in project priorities, or in the resources available to create or enhance a project. An SCM can enable a project team to handle changes in requirements and priorities.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
Company XYZ has asked the developers of ''Software Q'' for a version which tracks product price changes. This change (the Product Price Change feature) will take approximately 4 months to complete. During the second month, Company XYZ has changed it's mind and instead wants to make a change how product pricing is approved (the Product Price Approval feature). &lt;br /&gt;
* If the makers of ''Software Q'' '''do not''' have their product under an SCM, they may find it difficult to reproduce the original software after two months of development. Additionally, they may have made software fixes unrelated to the Product Price Change feature that they would want to keep in the original software, but without an SCM those changes may be indistinguishable from feature changes.&lt;br /&gt;
* If the makers of ''Software Q'' '''do''' have their project under an SCM, they could create two branches for their software development: One for bug fixes and one for the new feature. They could easily go back to the original version and create a new development branch for the Product Pricing Approval feature and still maintain their bug fix branch. In addition, they can archive the Product Pricing Change feature branch and keep it around in case Company XYZ changes it's mind and decides it wants the feature.&lt;br /&gt;
&lt;br /&gt;
Managing changes with an SCM enables engineers to focus on technical work, and enables project managers to control changes which can affect project outcomes. Further, an SCM can maintain a history of the work done on a project so it is easier to understand why changes are made, even well after the original change is made.&lt;br /&gt;
&lt;br /&gt;
== Understanding Basic Concepts ==&lt;br /&gt;
&lt;br /&gt;
For the reader new to SCM, there are a few basic terms and concepts that should be understood before best practices are considered:&lt;br /&gt;
* '''Check-in''' or '''Commit''' – Writing changes to the source code repository&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.lock-unlock.dia-1 '''Lock-Modify-Unlock Model''']: An SCM model that requires a developer to reserve or lock a source file before making changes to the file. This lock prevents other developers from modifying the file.&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.copy-merge.dia-1 '''Change-Modify-Merge Model''']:  An SCM model that allows multiple developers to make changes to a source file. Upon commit, if the source file has been updated by another developer, a merge of the updated file with the developers change is necessary in order to preserve all the updates. Depending on the SCM and the nature of the change, the merge operation may be performed by the SCM or by the developer.&lt;br /&gt;
* '''Revision''' – The version identifier of the source file (e.g. v1, v2, v2.1, etc). Each commit of a source file will produce a new revision value.&lt;br /&gt;
* '''Baseline''' – The root of a development stream, where changes that are intended to be integrated into the main project will eventually migrate.&lt;br /&gt;
* '''Branch''' – An offshoot from the baseline where prototype, testing, or other work can be performed that does not immediately affect the baseline. Eventually, a branch may be merged back into the baseline.&lt;br /&gt;
&lt;br /&gt;
== Advice on Using an SCM or SCCS ==&lt;br /&gt;
&lt;br /&gt;
There is differing advice on using an SCM to manage projects, but there are some consistent messages:&lt;br /&gt;
&lt;br /&gt;
* '''Use a source configuration management product:''' When working on teams, there is a general consensus that an SCM will greatly help the team manage changes. Further, Hunt and Thomas [HT 00] suggest that even an individual should use an SCM to manage their work, even if their team does not, because of its ability to archive work and to &amp;quot;undo&amp;quot; mistakes.&lt;br /&gt;
* '''Commit code changes frequently:''' Much of the advice suggests that source code should be [http://www.martinfowler.com/articles/continuousIntegration.html integrated on a regular basis], some even suggesting [http://www.extremeprogramming.org/rules/integrateoften.html checking-in code every few hours].&lt;br /&gt;
* '''In a Lock-Modify-Unlock model, check-out only what you need:''' [http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx This advice] is probably obvious, but in the Lock-Modify-Unlock model, source files will be unavailable for others to update in the Lock phase, so keeping that number of files to a minimum reduces programming team &amp;quot;deadlocks&amp;quot;. For development teams that have the maturity or tooling, a Change-Modify-Merge model reduces the concern about reserving files, but does not eliminate the potential issues (in particular, dealing with [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx merge conflicts]).&lt;br /&gt;
* '''Store tooling as well as source code in the SCM:''' Actually, much advice suggests storing [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices even more artifacts], but in particular, if a software team wants to recreate a specific version of the software, it will likely be crucial to have access to the original tools that created that version, as well as the source code. See section 6 of the white paper [http://www.perforce.com/perforce/papers/bestpractices.html High-level Best Practices in Software Configuration Management] by Laura Wingerd and Christopher Seiwald at Perforce Software. As a corollary to this item, [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx generated code] (object files, executable results of builds, etc.) should '''not''' be stored in the SCM repository. &lt;br /&gt;
* '''Create meaningful comments when committing files:''' By writing descriptive comments about a check-in, it will be easier for someone in the future to understand the rationale behind a change.&lt;br /&gt;
* '''Branch only when needed:''' The [http://www.perforce.com/perforce/papers/bestpractices.html white paper] mentioned previously speaks most to this point in its section 4, but it is also mentioned in [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices other places]. In particular, when more than one version of a software product is being developed concurrently, especially when the rules for checking out and committing source files may be different between the multiple version, branching is necessary to help the development team manage their project effectively.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
SCMs provide a valuable tool for helping software developers manage change in a software project. Following some of the recommendations presented, a software development team can gain the most effectiveness from the use of SCMs.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
These links and resources can help the reader further understand the need for source code control:&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf, pp. 176-178.&lt;br /&gt;
* Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990. Review pp. 1-4.&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html, review the Forward section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]. Review the section titled “So Why Do We Need A Version Control System (VCS)?”&lt;br /&gt;
* Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-742, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
&lt;br /&gt;
These links can provide the reader with additional information on SCM vocabulary:&lt;br /&gt;
&lt;br /&gt;
* [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx Developing with Source Code Control - Best Practices Part 2]: Review the '''Vocabulary''' section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]: Review the '''Learn the Lingo''' section.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Source_Code_Management#Common_vocabulary Revision Control] in Wikipedia. Review the '''Common Vocabulary''' section.&lt;br /&gt;
&lt;br /&gt;
Review these references for additional information on SCM best practices:&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19077</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 4 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19077"/>
		<updated>2009-09-12T08:17:30Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Best Practices For Source-Control Management With Version-Control Systems ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   “Tip 23: '''Always Use Source Code Control'''” &lt;br /&gt;
          – Hunt and Thomas, The Pragmatic Programmer [HT 00]&lt;br /&gt;
&lt;br /&gt;
In software development, change is almost always inevitable [P 05] . Using a source configuration management (SCM) system (also known as a Source Code Control System (SCCS) or version-control system) can help individuals and teams manage the changes that occur during the software development process [D 90]. This article will provide the reader with basic information, and direct the reader to additional reading for more in-depth consideration.&lt;br /&gt;
&lt;br /&gt;
== Why Source Code Control is Necessary ==&lt;br /&gt;
&lt;br /&gt;
According to Pressman, “Change is inevitable when computer software is built. [P 05]” He suggests four primary reasons for change:&lt;br /&gt;
* New business or market conditions&lt;br /&gt;
* New customer needs&lt;br /&gt;
* Reorganization, business growth, or downsizing&lt;br /&gt;
* Budgetary or scheduling constraints&lt;br /&gt;
Each of these reasons can cause changes in project requirements, in project priorities, or in the resources available to create or enhance a project. Managing the change with an SCM enables engineers to focus on technical work, and enables project managers to control changes which can affect project outcomes.&lt;br /&gt;
&lt;br /&gt;
=== Links and Resources ===&lt;br /&gt;
&lt;br /&gt;
These links and resources can help the reader further understand the need for source code control:&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf, pp. 176-178.&lt;br /&gt;
* Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990. Review pp. 1-4.&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html, review the Forward section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]. Review the section titled “So Why Do We Need A Version Control System (VCS)?”&lt;br /&gt;
* Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-742, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
&lt;br /&gt;
== Understanding Basic Concepts ==&lt;br /&gt;
&lt;br /&gt;
For the reader new to SCM, there are a few basic terms and concepts that should be understood before best practices are considered:&lt;br /&gt;
* '''Check-in''' or '''Commit''' – Writing changes to the source code repository&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.lock-unlock.dia-1 '''Lock-Modify-Unlock Model''']: An SCM model that requires a developer to reserve or lock a source file before making changes to the file. This lock prevents other developers from modifying the file.&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.copy-merge.dia-1 '''Change-Modify-Merge Model''']:  An SCM model that allows multiple developers to make changes to a source file. Upon commit, if the source file has been updated by another developer, a merge of the updated file with the developers change is necessary in order to preserve all the updates. Depending on the SCM and the nature of the change, the merge operation may be performed by the SCM or by the developer.&lt;br /&gt;
* '''Revision''' – The version identifier of the source file (e.g. v1, v2, v2.1, etc). Each commit of a source file will produce a new revision value.&lt;br /&gt;
* '''Baseline''' – The root of a development stream, where changes that are intended to be integrated into the main project will eventually migrate.&lt;br /&gt;
* '''Branch''' – An offshoot from the baseline where prototype, testing, or other work can be performed that does not immediately affect the baseline. Eventually, a branch may be merged back into the baseline.&lt;br /&gt;
&lt;br /&gt;
=== Links and Resources ===&lt;br /&gt;
&lt;br /&gt;
These links can provide the reader with additional information on SCM vocabulary:&lt;br /&gt;
&lt;br /&gt;
* [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx Developing with Source Code Control - Best Practices Part 2]: Review the '''Vocabulary''' section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]: Review the '''Learn the Lingo''' section.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Source_Code_Management#Common_vocabulary Revision Control] in Wikipedia. Review the '''Common Vocabulary''' section.&lt;br /&gt;
&lt;br /&gt;
== Advice on Using an SCM or SCCS ==&lt;br /&gt;
&lt;br /&gt;
There is differing advice on using an SCM to manage projects, but there are some consistent messages:&lt;br /&gt;
&lt;br /&gt;
* '''Use a source configuration management product:''' When working on teams, there is a general consensus that an SCM will greatly help the team manage changes. Further, Hunt and Thomas [HT 00] suggest that even an individual should use an SCM to manage their work, even if their team does not, because of its ability to archive work and to &amp;quot;undo&amp;quot; mistakes.&lt;br /&gt;
* '''Commit code changes frequently:''' Much of the advice suggests that source code should be [http://www.martinfowler.com/articles/continuousIntegration.html integrated on a regular basis], some even suggesting [http://www.extremeprogramming.org/rules/integrateoften.html checking-in code every few hours].&lt;br /&gt;
* '''In a Lock-Modify-Unlock model, check-out only what you need:''' [http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx This advice] is probably obvious, but in the Lock-Modify-Unlock model, source files will be unavailable for others to update in the Lock phase, so keeping that number of files to a minimum reduces programming team &amp;quot;deadlocks&amp;quot;. For development teams that have the maturity or tooling, a Change-Modify-Merge model reduces the concern about reserving files, but does not eliminate the potential issues (in particular, dealing with [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx merge conflicts]).&lt;br /&gt;
* '''Store tooling as well as source code in the SCM:''' Actually, much advice suggests storing [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices even more artifacts], but in particular, if a software team wants to recreate a specific version of the software, it will likely be crucial to have access to the original tools that created that version, as well as the source code. See section 6 of the white paper [http://www.perforce.com/perforce/papers/bestpractices.html High-level Best Practices in Software Configuration Management] by Laura Wingerd and Christopher Seiwald at Perforce Software. As a corollary to this item, [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx generated code] (object files, executable results of builds, etc.) should '''not''' be stored in the SCM repository. &lt;br /&gt;
* '''Create meaningful comments when committing files:''' By writing descriptive comments about a check-in, it will be easier for someone in the future to understand the rationale behind a change.&lt;br /&gt;
* '''Branch only when needed:''' The [http://www.perforce.com/perforce/papers/bestpractices.html white paper] mentioned previously speaks most to this point in its section 4, but it is also mentioned in [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices other places]. In particular, when more than one version of a software product is being developed concurrently, especially when the rules for checking out and committing source files may be different between the multiple version, branching is necessary to help the development team manage their project effectively.&lt;br /&gt;
&lt;br /&gt;
=== Links and Resources ===&lt;br /&gt;
&lt;br /&gt;
Review these references for additional information on SCM best practices:&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
SCMs provide a valuable tool for helping software developers manage change in a software project. Following some of the recommendations presented, a software development team can gain the most effectiveness from the use of SCMs.&lt;br /&gt;
&lt;br /&gt;
== All References ==&lt;br /&gt;
&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://www.ericsink.com/scm/source_control.html&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://en.wikipedia.org/wiki/Source_Code_Management&lt;br /&gt;
* http://betterexplained.com/articles/a-visual-guide-to-version-control/&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;br /&gt;
* [P 05] Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-768, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
* [HT 00] Hunt A. and Thomas D., The Pragmatic Programmer: From Journeyman to Master, pp. 86-89, Addison-Wesley, Boston, MA, 2000&lt;br /&gt;
* [D 90] Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990.&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19076</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 4 co</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_4_co&amp;diff=19076"/>
		<updated>2009-09-12T08:17:09Z</updated>

		<summary type="html">&lt;p&gt;Jlmatloc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Best Practices For Source-Control Management With Version-Control Systems ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   “Tip 23: '''Always Use Source Code Control'''” &lt;br /&gt;
          – Hunt and Thomas, The Pragmatic Programmer [HT 00]&lt;br /&gt;
&lt;br /&gt;
In software development, change is almost always inevitable [P 05] . Using a source configuration management (SCM) system (also known as a Source Code Control System (SCCS) or version-control system) can help individuals and teams manage the changes that occur during the software development process [D 90]. This article will provide the reader with basic information, and direct the reader to additional reading for more in-depth consideration.&lt;br /&gt;
&lt;br /&gt;
== Why Source Code Control is Necessary ==&lt;br /&gt;
&lt;br /&gt;
According to Pressman, “Change is inevitable when computer software is built. [P 05]” He suggests four primary reasons for change:&lt;br /&gt;
* New business or market conditions&lt;br /&gt;
* New customer needs&lt;br /&gt;
* Reorganization, business growth, or downsizing&lt;br /&gt;
* Budgetary or scheduling constraints&lt;br /&gt;
Each of these reasons can cause changes in project requirements, in project priorities, or in the resources available to create or enhance a project. Managing the change with an SCM enables engineers to focus on technical work, and enables project managers to control changes which can affect project outcomes.&lt;br /&gt;
&lt;br /&gt;
=== Links and Resources ===&lt;br /&gt;
&lt;br /&gt;
These links and resources can help the reader further understand the need for source code control:&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf, pp. 176-178.&lt;br /&gt;
* Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990. Review pp. 1-4.&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html, review the Forward section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]. Review the section titled “So Why Do We Need A Version Control System (VCS)?”&lt;br /&gt;
* Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-742, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
&lt;br /&gt;
== Understanding Basic Concepts ==&lt;br /&gt;
&lt;br /&gt;
For the reader new to SCM, there are a few basic terms and concepts that should be understood before best practices are considered:&lt;br /&gt;
* '''Check-in''' or '''Commit''' – Writing changes to the source code repository&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.lock-unlock.dia-1 '''Lock-Modify-Unlock Model''']: An SCM model that requires a developer to reserve or lock a source file before making changes to the file. This lock prevents other developers from modifying the file.&lt;br /&gt;
* [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.vsn-models.copy-merge.dia-1 '''Change-Modify-Merge Model''']:  An SCM model that allows multiple developers to make changes to a source file. Upon commit, if the source file has been updated by another developer, a merge of the updated file with the developers change is necessary in order to preserve all the updates. Depending on the SCM and the nature of the change, the merge operation may be performed by the SCM or by the developer.&lt;br /&gt;
* '''Revision''' – The version identifier of the source file (e.g. v1, v2, v2.1, etc). Each commit of a source file will produce a new revision value.&lt;br /&gt;
* '''Baseline''' – The root of a development stream, where changes that are intended to be integrated into the main project will eventually migrate.&lt;br /&gt;
* '''Branch''' – An offshoot from the baseline where prototype, testing, or other work can be performed that does not immediately affect the baseline. Eventually, a branch may be merged back into the baseline.&lt;br /&gt;
&lt;br /&gt;
=== Links and Resources ===&lt;br /&gt;
&lt;br /&gt;
These links can provide the reader with additional information on SCM vocabulary:&lt;br /&gt;
&lt;br /&gt;
* [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx Developing with Source Code Control - Best Practices Part 2]: Review the '''Vocabulary''' section.&lt;br /&gt;
* [http://betterexplained.com/articles/a-visual-guide-to-version-control/ A Visual Guide to Version Control]: Review the '''Learn the Lingo''' section.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Source_Code_Management#Common_vocabulary Revision Control] in Wikipedia. Review the '''Common Vocabulary''' section.&lt;br /&gt;
&lt;br /&gt;
== Advice on Using an SCM or SCCS ==&lt;br /&gt;
&lt;br /&gt;
There is differing advice on using an SCM to manage projects, but there are some consistent messages:&lt;br /&gt;
&lt;br /&gt;
* '''Use a source configuration management product:''' When working on teams, there is a general consensus that an SCM will greatly help the team manage changes. Further, Hunt and Thomas [HT 00] suggest that even an individual should use an SCM to manage their work, even if their team does not, because of its ability to archive work and to &amp;quot;undo&amp;quot; mistakes.&lt;br /&gt;
* '''Commit code changes frequently:''' Much of the advice suggests that source code should be [http://www.martinfowler.com/articles/continuousIntegration.html integrated on a regular basis], some even suggesting [http://www.extremeprogramming.org/rules/integrateoften.html checking-in code every few hours].&lt;br /&gt;
* '''In a Lock-Modify-Unlock model, check-out only what you need:''' [http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx This advice] is probably obvious, but in the Lock-Modify-Unlock model, source files will be unavailable for others to update in the Lock phase, so keeping that number of files to a minimum reduces programming team &amp;quot;deadlocks&amp;quot;. For development teams that have the maturity or tooling, a Change-Modify-Merge model reduces the concern about reserving files, but does not eliminate the potential issues (in particular, dealing with [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx merge conflicts]).&lt;br /&gt;
* '''Store tooling as well as source code in the SCM:''' Actually, much advice suggests storing [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices even more artifacts], but in particular, if a software team wants to recreate a specific version of the software, it will likely be crucial to have access to the original tools that created that version, as well as the source code. See section 6 of the white paper [http://www.perforce.com/perforce/papers/bestpractices.html High-level Best Practices in Software Configuration Management] by Laura Wingerd and Christopher Seiwald at Perforce Software. As a corollary to this item, [http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx generated code] (object files, executable results of builds, etc.) should '''not''' be stored in the SCM repository. &lt;br /&gt;
* '''Create meaningful comments when committing files:''' By writing descriptive comments about a check-in, it will be easier for someone in the future to understand the rationale behind a change.&lt;br /&gt;
* '''Branch only when needed:''' The [http://www.perforce.com/perforce/papers/bestpractices.html white paper] mentioned previously speaks most to this point in its section 4, but it is also mentioned in [http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices other places]. In particular, when more than one version of a software product is being developed concurrently, especially when the rules for checking out and committing source files may be different between the multiple version, branching is necessary to help the development team manage their project effectively.&lt;br /&gt;
&lt;br /&gt;
=== Links and Resources ===&lt;br /&gt;
&lt;br /&gt;
Review these references for additional information on SCM best practices:&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
SCMs provide a valuable tool for helping software developers manage change in a software project. Following some of the recommendations presented, a software development team can gain the most effectiveness from the use of SCMs.&lt;br /&gt;
&lt;br /&gt;
== All References ==&lt;br /&gt;
&lt;br /&gt;
* http://oreilly.com/catalog/practicalperforce/chapter/ch07.pdf&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2008/10/18/developing-with-source-code-control-best-practices-part-1.aspx&lt;br /&gt;
* http://msmvps.com/blogs/peterritchie/archive/2009/03/11/developing-with-source-code-control-best-practices-part-2.aspx&lt;br /&gt;
* http://www.perforce.com/perforce/papers/bestpractices.html&lt;br /&gt;
* http://www.ericsink.com/scm/source_control.html&lt;br /&gt;
* http://svnbook.red-bean.com/en/1.4/svn-book.html&lt;br /&gt;
* http://msdn.microsoft.com/en-us/library/ee371247%28Expression.30%29.aspx&lt;br /&gt;
* http://books.google.com/books?id=-2wqcKAq4tIC&amp;amp;pg=PA45&amp;amp;lpg=PA45&amp;amp;dq=source+code+control+best+practices&lt;br /&gt;
* http://en.wikipedia.org/wiki/Source_Code_Management&lt;br /&gt;
* http://betterexplained.com/articles/a-visual-guide-to-version-control/&lt;br /&gt;
* http://www.martinfowler.com/articles/continuousIntegration.html&lt;br /&gt;
* [P 05] Pressman, Roger S., Software Engineering: A Practitioner’s Approach, pp. 739-768, McGraw-Hill, New York, NY, 2005&lt;br /&gt;
* [HT 00] Hunt A. and Thomas D., The Pragmatic Programmer: From Journeyman to Master, pp. 86-89, Addison-Wesley, Boston, MA, 2000&lt;br /&gt;
* [D 90] Dart, S. [http://www.sei.cmu.edu/reports/90tr011.pdf “Spectrum of Functionality in Configuration Management Systems&amp;quot;], Software Engineering Institute, 1990.&lt;br /&gt;
&lt;br /&gt;
x&lt;/div&gt;</summary>
		<author><name>Jlmatloc</name></author>
	</entry>
</feed>