<?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=Messi</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=Messi"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Messi"/>
	<updated>2026-06-09T01:28:05Z</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/wiki3_4_ashi4&amp;diff=29175</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29175"/>
		<updated>2009-11-19T01:39:52Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
&lt;br /&gt;
We discussed why it is important to use DRY in the [[#Why Dry | previous]] section by discussing how it may result in clumsy code. It is a misconception that DRY is applicable to code only. It is very much applicable to data as well which we shall see in this section by analysing how it could be a harmful idea to have data duplication.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following figure is a representation of how DRY is violated in a bad way by data duplication. &lt;br /&gt;
[[Image:dry.jpg|thumb|center|550px|alt=Taken from http://tagschema.com/blogs/tagschema/ |Taken from http://tagschema.com/blogs/tagschema/ ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us consider some of the many possible problems of Data Duplication&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stores multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad as discussed in the previous section, it is some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't have to get data &lt;br /&gt;
 or instruction from the main memory.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is an intermediate layer in the  DBMS which gets the DB pages from the Disk and buffers them &lt;br /&gt;
 for the upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates a copy of the source files for each project to ensure that the properly working source are &lt;br /&gt;
 not disturbed.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)''' [[#References | [5]]] is an operating system kernel technology for improving performance on computers&lt;br /&gt;
 with more than one CPU. RCU allows you to read a shared data structure as if there were no other CPU accessing it. When you need &lt;br /&gt;
 to update the data structure, you can update the global pointer to the data and keep the old copy until all the threads currently &lt;br /&gt;
 executing inside the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, after &lt;br /&gt;
 which the old copy can be deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Global Data''' in system can be a cause of concern because multiple components of the system share the same data specially in a &lt;br /&gt;
 multi-threaded application. Instead, we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When a new object has to be created, we clone the prototype &lt;br /&gt;
 there by creating multiple copies of the same thing in the system.&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
DRY is one of the important principle that needs to be used while design a system. DRY principle for code is definitely a must, but as mentioned above there can be cases where DRY can be violated for data. There can be no definite guidelines for not following this rule, but in the following cases violating DRY for data should be considered&lt;br /&gt;
&lt;br /&gt;
* If the performance of the system is significantly improved. For example adding layers of cache improves the performance of the computer significantly. &amp;lt;br/&amp;gt;&lt;br /&gt;
* If there is need for data redundancy. For example Source control software makes sure that if one version of file is damaged there are always previous versions to fall back on.&amp;lt;br/&amp;gt;&lt;br /&gt;
* If violating DRY reduces overhead. For example making copies of global data locally reduces the overhead of adding logic for mutual exclusion.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;br /&gt;
&lt;br /&gt;
6. [http://tagschema.com/blogs/tagschema/ A review on DRY in Social Communication]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29170</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29170"/>
		<updated>2009-11-19T01:38:40Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
&lt;br /&gt;
We discussed why it is important to use DRY in the [[#Why Dry | previous]] section by discussing how it may result in clumsy code. It is a misconception that DRY is applicable to code only. It is very much applicable to data as well which we shall see in this section by analysing how it could be a harmful idea to have data duplication.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following figure is a representation of how DRY is violated in a bad way by data duplication. &lt;br /&gt;
[[Image:dry.jpg|thumb|center|550px|alt=Taken from http://tagschema.com/blogs/tagschema/ |Taken from http://tagschema.com/blogs/tagschema/ ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us consider some of the many possible problems of Data Duplication&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stores multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad as discussed in the previous section, it is some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't have to get data &lt;br /&gt;
 or instruction from the main memory.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is an intermediate layer in the  DBMS which gets the DB pages from the Disk and buffers them &lt;br /&gt;
 for the upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates a copy of the source files for each project to ensure that the properly working source are &lt;br /&gt;
 not disturbed.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)''' [[#References | [5]]] is an operating system kernel technology for improving performance on computers&lt;br /&gt;
 with more than one CPU. RCU allows you to read a shared data structure as if there were no other CPU accessing it. When you need &lt;br /&gt;
 to update the data structure, you can update the global pointer to the data and keep the old copy until all the threads currently &lt;br /&gt;
 executing inside the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, after &lt;br /&gt;
 which the old copy can be deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Global Data''' in system can be a cause of concern because multiple components of the system share the same data specially in a &lt;br /&gt;
 multi-threaded application. Instead, we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When a new object has to be created, we clone the prototype &lt;br /&gt;
 there by creating multiple copies of the same thing in the system.&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
DRY is one of the important principle that needs to be used while design a system. DRY principle for code is definitely a must, but as mentioned above there can be cases where DRY can be violated for data. There can be no definite guidelines for not following this rule, but in the following cases violating DRY for data should be considered&lt;br /&gt;
&lt;br /&gt;
* If the performance of the system is significantly improved. For example adding layers of caches improves the performance of the computer significantly. &amp;lt;br/&amp;gt;&lt;br /&gt;
* If there is need for data redundancy. For example Source control software makes sure that even if one version of file is damaged there are always previous versions to fall back on.&amp;lt;br/&amp;gt;&lt;br /&gt;
* If violating DRY reduces overhead. For example making copies of global data locally reduces the overhead of adding logic for mutual exclusion.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;br /&gt;
&lt;br /&gt;
6. [http://tagschema.com/blogs/tagschema/ A review on DRY in Social Communication]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29167</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29167"/>
		<updated>2009-11-19T01:38:13Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
&lt;br /&gt;
We discussed why it is important to use DRY in the [[#Why Dry | previous]] section by discussing how it may result in clumsy code. It is a misconception that DRY is applicable to code only. It is very much applicable to data as well which we shall see in this section by analysing how it could be a harmful idea to have data duplication.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following figure is a representation of how DRY is violated in a bad way by data duplication. &lt;br /&gt;
[[Image:dry.jpg|thumb|center|550px|alt=Taken from http://tagschema.com/blogs/tagschema/ |Taken from http://tagschema.com/blogs/tagschema/ ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us consider some of the many possible problems of Data Duplication&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stores multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad as discussed in the previous section, it is some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't have to get data &lt;br /&gt;
 or instruction from the main memory.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is an intermediate layer in the  DBMS which gets the DB pages from the Disk and buffers them &lt;br /&gt;
 for the upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates a copy of the source files for each project to ensure that the properly working source are &lt;br /&gt;
 not disturbed.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)''' [[#References | [5]]] is an operating system kernel technology for improving performance on computers&lt;br /&gt;
 with more than one CPU. RCU allows you to read a shared data structure as if there were no other CPU accessing it. When you need &lt;br /&gt;
 to update the data structure, you can update the global pointer to the data and keep the old copy until all the threads currently &lt;br /&gt;
 executing inside the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, after &lt;br /&gt;
 which the old copy can be deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Global Data''' in system can be a cause of concern because multiple components of the system share the same data specially in a &lt;br /&gt;
 multi-threaded application. Instead, we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When a new object has to be created, we clone the prototype &lt;br /&gt;
 there by creating multiple copies of the same thing in the system.&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
DRY is one of the important principle that needs to be used while design a system. DRY principle for code is definitely a must, but as mentioned above there can be cases where DRY can be violated for data. There can be no definite guidelines for not following this rule, but in the following cases violating DRY for data should be considered&lt;br /&gt;
&lt;br /&gt;
* If the performance of the system is significantly improved. For example adding layers of caches improves the performance of the computer significantly. &amp;lt;/br&amp;gt;&lt;br /&gt;
* If there is need for data redundancy. For example Source control software makes sure that even if one version of file is damaged there are always previous versions to fall back on.&amp;lt;/br&amp;gt;&lt;br /&gt;
* If violating DRY reduces overhead. For example making copies of global data locally reduces the overhead of adding logic for mutual exclusion.&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;br /&gt;
&lt;br /&gt;
6. [http://tagschema.com/blogs/tagschema/ A review on DRY in Social Communication]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29148</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29148"/>
		<updated>2009-11-19T01:34:37Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
&lt;br /&gt;
We discussed why it is important to use DRY in the [[#Why Dry | previous]] section by discussing how it may result in clumsy code. It is a misconception that DRY is applicable to code only. It is very much applicable to data as well which we shall see in this section by analysing how it could be a harmful idea to have data duplication.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following figure is a representation of how DRY is violated in a bad way by data duplication. &lt;br /&gt;
[[Image:dry.jpg|thumb|center|550px|alt=Taken from http://tagschema.com/blogs/tagschema/ |Taken from http://tagschema.com/blogs/tagschema/ ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us consider some of the many possible problems of Data Duplication&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad as discussed in the previous section, it is some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't have to get data &lt;br /&gt;
 or instruction from the main memory.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is an intermediate layer in the  DBMS which gets the DB pages from the Disk and buffers them &lt;br /&gt;
 for the upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates a copy of the source files for each project to ensure that the properly working source are &lt;br /&gt;
 not disturbed.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)''' [[#References | [5]]] is an operating system kernel technology for improving performance on computers&lt;br /&gt;
 with more than one CPU. RCU allows you to read a shared data structure as if there were no other CPU accessing it. When you need &lt;br /&gt;
 to update the data structure, you can update the global pointer to the data and keep the old copy until all the threads currently &lt;br /&gt;
 executing inside the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, after &lt;br /&gt;
 which the old copy can be deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Global Data''' in system can be a cause of concern because multiple components of the system share the same data specially in a &lt;br /&gt;
 multi-threaded application. Instead, we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When a new object has to be created, we clone the prototype &lt;br /&gt;
 there by creating multiple copies of the same thing in the system.&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
DRY is one of the important principle that need to be used while design a system. Following DRY principle for code is definitely a must, but as mentioned above there can be cases where DRY can be violated for data. There can be no definite guidelines for not following this rule, but we think in the following cases violating DRY for data should be considered&lt;br /&gt;
&lt;br /&gt;
* If the performance of the system is significantly improved. For example adding layers of caches improves the performance of the computer significantly. &lt;br /&gt;
* If there is need for redundancy. For example Source control software makes sure that even if one version of file is damaged there are always previous versions to fall back on.&lt;br /&gt;
* If violating DRY reduces overhead. For example making copies of global data locally reduces the overhead of adding logic for mutual exclusion.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;br /&gt;
&lt;br /&gt;
6. [http://tagschema.com/blogs/tagschema/ A review on DRY in Social Communication]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29121</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29121"/>
		<updated>2009-11-19T01:21:13Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
Data Duplication can be a big problem in many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look into DRY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;table border=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:dry.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Taken from http://tagschema.com/blogs/tagschema/&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad as discussed in the previous section, it is some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't have to get data &lt;br /&gt;
 or instruction from the main memory.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is an intermediate layer in the  DBMS which gets the DB pages from the Disk and buffers them &lt;br /&gt;
 for the upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates a copy of the source files for each project to ensure that the properly working source are &lt;br /&gt;
 not disturbed.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)''' [[#References | [5]]] is an operating system kernel technology for improving performance on computers&lt;br /&gt;
 with more than one CPU. RCU allows you to read a shared data structure as if there were no other CPU accessing it. When you need &lt;br /&gt;
 to update the data structure, you can update the global pointer to the data and keep the old copy until all the threads currently &lt;br /&gt;
 executing inside the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, after &lt;br /&gt;
 which the old copy can be deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Global Data''' in system can be a cause of concern because multiple components of the system share the same data specially in a &lt;br /&gt;
 multi-threaded application. Instead, we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When a new object has to be created, we clone the prototype &lt;br /&gt;
 there by creating multiple copies of the same thing in the system.&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
DRY is one of the important principle that need to be used while design a system. Following&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;br /&gt;
&lt;br /&gt;
6. [http://tagschema.com/blogs/tagschema/ A review on DRY in Social Communication]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29098</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29098"/>
		<updated>2009-11-19T01:15:44Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Why Data Duplication is harmful */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
Data Duplication can be a big problem in many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look into DRY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;table border=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:dry.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Taken from http://tagschema.com/blogs/tagschema/&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad as discussed in the previous section, it is some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't have to get data &lt;br /&gt;
 or instruction from the main memory.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is an intermediate layer in the  DBMS which gets the DB pages from the Disk and buffers them &lt;br /&gt;
 for the upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates a copy of the source files for each project to ensure that the properly working source are &lt;br /&gt;
 not disturbed.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[#References | [5]] is an operating system kernel technology for improving performance on computers&lt;br /&gt;
 with more than one CPU. RCU allows you to read a shared data structure as if there were no other CPU accessing it. When you need &lt;br /&gt;
 to update the data structure, you can update the global pointer to the data and keep the old copy until all the threads currently &lt;br /&gt;
 executing inside the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, after &lt;br /&gt;
 which the old copy can be deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Global Data''' in system can be a cause of concern because multiple components of the system share the same data specially in a &lt;br /&gt;
 multi-threaded application. Instead, we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When a new object has to be created, we clone the prototype &lt;br /&gt;
 there by creating multiple copies of the same thing in the system.&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;br /&gt;
&lt;br /&gt;
6. [http://tagschema.com/blogs/tagschema/ A review on DRY in Social Communication]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29086</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29086"/>
		<updated>2009-11-19T01:09:34Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Why Data Duplication is harmful */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
Data Duplication can be a big problem in many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look into DRY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;table border=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:dry.jpeg.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Taken from http://tagschema.com/blogs/tagschema/&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad as discussed in the previous section, it is some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code to each member of the team to ensure smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 Global Data in system can be a cause of concern because multiple components of the system share the same data specially in a multi-&lt;br /&gt;
 threaded application. Instead we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When ever a new object has to be created then we clone the prototype &lt;br /&gt;
 and use that object there by creating multiple copies of the same thing in the system&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;br /&gt;
&lt;br /&gt;
6. [http://tagschema.com/blogs/tagschema/ A review on DRY in Social Communication]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Dry.jpg&amp;diff=29085</id>
		<title>File:Dry.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Dry.jpg&amp;diff=29085"/>
		<updated>2009-11-19T01:09:16Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Dry.jpeg.jpg&amp;diff=29061</id>
		<title>File:Dry.jpeg.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Dry.jpeg.jpg&amp;diff=29061"/>
		<updated>2009-11-19T01:01:18Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29055</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29055"/>
		<updated>2009-11-19T00:56:43Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Why Data Duplication is harmful */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
Data Duplication can be a big problem in many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look into DRY&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad, are some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code to each member of the team to ensure smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 Global Data in system can be a cause of concern because multiple components of the system share the same data specially in a multi-&lt;br /&gt;
 threaded application. Instead we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When ever a new object has to be created then we clone the prototype &lt;br /&gt;
 and use that object there by creating multiple copies of the same thing in the system&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29054</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29054"/>
		<updated>2009-11-19T00:56:27Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* When Data Duplication wins over DRY... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
&lt;br /&gt;
Let us look into DRY&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad, are some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code to each member of the team to ensure smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 Global Data in system can be a cause of concern because multiple components of the system share the same data specially in a multi-&lt;br /&gt;
 threaded application. Instead we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When ever a new object has to be created then we clone the prototype &lt;br /&gt;
 and use that object there by creating multiple copies of the same thing in the system&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29052</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29052"/>
		<updated>2009-11-19T00:56:12Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* DRY on Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== Why Data Duplication is harmful ==&lt;br /&gt;
&lt;br /&gt;
Let us look into DRY&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
Data Duplication can be a big problem in many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad, are some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code to each member of the team to ensure smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 Global Data in system can be a cause of concern because multiple components of the system share the same data specially in a multi-&lt;br /&gt;
 threaded application. Instead we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When ever a new object has to be created then we clone the prototype &lt;br /&gt;
 and use that object there by creating multiple copies of the same thing in the system&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29046</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29046"/>
		<updated>2009-11-19T00:53:34Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* When Data Duplication wins over DRY... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== DRY on Data ==&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
Data Duplication can be a big problem in many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad, are some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code to each member of the team to ensure smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 Global Data in system can be a cause of concern because multiple components of the system share the same data specially in a multi-&lt;br /&gt;
 threaded application. Instead we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When ever a new object has to be created then we clone the prototype &lt;br /&gt;
 and use that object there by creating multiple copies of the same thing in the system&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29045</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=29045"/>
		<updated>2009-11-19T00:52:32Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* When Data Duplication wins over DRY... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&amp;lt;br&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose that we need to develop a software which queries the database very often. If the query is a static query, that is, the &lt;br /&gt;
 values given as an input to the query does not change and returns the same result set irrespective of the number of times it is &lt;br /&gt;
 executed, it is always a good practice to execute the query once and store the result set which can be used by different parts of &lt;br /&gt;
 the source code. This saves us the execution time as well as the memory.&lt;br /&gt;
&amp;lt;b&amp;gt;2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The responsibility of a software developer or a software firm does not end with building the software. Neither can the user of the &lt;br /&gt;
 software be expected to stay satisfied with the product that has been delivered. Changes or an upgrade might be necessary at any &lt;br /&gt;
 time. So imagine, if the code is full of duplication and redundancy, it is almost impossible to understand it and extending &lt;br /&gt;
 it.&lt;br /&gt;
&amp;lt;b&amp;gt;3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Documenting the code is completely the programmer's discretion. Suppose there is a variable X which represents a person's salary. &lt;br /&gt;
 The salary is computed within a code and stored in X. Every method that uses X needs to have a comment mentioning that X &lt;br /&gt;
 represents salary. It would have been a lot easier if the variable name was 'salary'.&lt;br /&gt;
&amp;lt;b&amp;gt;4. It becomes very difficult to debug the code in case of anomalies.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 Suppose there is a method M which calculates salary. For a programmer's convenience, consider that this method is duplicated in a &lt;br /&gt;
 different class. Assume that the salary has to be revised for some set of employees, and the programmer changes M in one class but &lt;br /&gt;
 misses to do so in another. It would take a lot of effort and time from the person debugging the code to find out why the salary &lt;br /&gt;
 is not getting revised in peculiar cases. &lt;br /&gt;
&amp;lt;b&amp;gt;5. It is always a good practice to have one reference.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;b&amp;gt;An Example : &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 The example given in the point 4 explained above is a proof for the reason that we should have just one method M that calculates &lt;br /&gt;
 the salary.&lt;br /&gt;
&lt;br /&gt;
== DRY on Data ==&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
Data Duplication can be a big problem is many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad, are some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. Buffer Manager creates copies of the DB pages and stores in the buffer pool.&lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code to each member of the team to ensure smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 Global Data in system can be a cause of concern because multiple components of the system share the same data specially in a multi-&lt;br /&gt;
 threaded application. Instead we could have multiple copies of the data accessible locally to each component.&lt;br /&gt;
&lt;br /&gt;
 '''Prototypes''' are another example where DRY is violated. When ever a new object has to be created then we clone the prototype &lt;br /&gt;
 and use that object there by creating multiple copies of the same thing in the system&lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=28950</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=28950"/>
		<updated>2009-11-19T00:22:27Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&lt;br /&gt;
&lt;br /&gt;
3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&lt;br /&gt;
&lt;br /&gt;
4. It becomes very difficult to debug the code in case of anomalies.&lt;br /&gt;
&lt;br /&gt;
5. It is always a good practice to have one reference.&lt;br /&gt;
&lt;br /&gt;
== DRY on Data ==&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
Data Duplication can be a big problem is many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad, are some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. &lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code each member of the teamwhen a more than one person is working a &lt;br /&gt;
 project This ensures smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS Read-Copy-Update]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=28948</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=28948"/>
		<updated>2009-11-19T00:22:09Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&lt;br /&gt;
&lt;br /&gt;
3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&lt;br /&gt;
&lt;br /&gt;
4. It becomes very difficult to debug the code in case of anomalies.&lt;br /&gt;
&lt;br /&gt;
5. It is always a good practice to have one reference.&lt;br /&gt;
&lt;br /&gt;
== DRY on Data ==&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
Data Duplication can be a big problem is many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad, are some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. &lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code each member of the teamwhen a more than one person is working a &lt;br /&gt;
 project This ensures smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;br /&gt;
&lt;br /&gt;
5. [http://lse.sourceforge.net/locking/rcu/HOWTO/intro.html#WHATIS / Read-Copy-Update]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=28943</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=28943"/>
		<updated>2009-11-19T00:20:46Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* When Data Duplication wins over DRY... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt; DRY Principle for Data &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Donot Repeat Yourself (DRY)&amp;lt;/i&amp;gt; also known as &amp;lt;i&amp;gt;Duplication Is Evil (DIE)&amp;lt;/i&amp;gt; is one of the most fundamental principles of programming, or rather we can say that it is the most important principle of good programming. This principle was formulated by Andrew Hunt and David Thomas in their book [[#References|The Pragmatic Programmer]]. The principle states that &amp;quot;&amp;lt;b&amp;gt;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&amp;lt;/b&amp;gt;&amp;quot;. This principle has been broadly accepted and acknowledged by the developers across the globe. It is considered to be one of the best coding practices to build an efficient and flexible code which is not only easy to understand but easy to maintain too. A parallel concept to DRY is &amp;lt;b&amp;gt;Orthogonality&amp;lt;/b&amp;gt; which is making the components of the system as functionally independent as possible. It is well understood and an accepted fact that the DRY and the Orthogonality principle together lead to a very well structured code as discussed [http://www.artima.com/intv/dry3.html here]. But if we observe the DRY principle more carefully, it is easy to notice that DRY is not only applicable to code but it is applicable to any piece of knowledge that can be represented in some way; one such form of knowledge representation is data. In fact, data and knowledge are used more or less interchangeably. The purpose of this document is to emphasize on the fact that the DRY principle is not only applicable to the code but to the data as well.&lt;br /&gt;
&lt;br /&gt;
== Some Basic Terminologies ==&lt;br /&gt;
&lt;br /&gt;
== Why DRY? ==&lt;br /&gt;
&lt;br /&gt;
The question should be &amp;lt;b&amp;gt;Why not DRY&amp;lt;/b&amp;gt;. When it comes to building or extending a software system, it feels extremely easy to just put in the logic in terms of code and make sure that the code works and the overall system functions properly. However, it is most convenient to not bother whether or not the code follows the best practices or is it easy to maintain. But it is cosidered to be a really good technique to apply the DRY principle here for various reasons;&lt;br /&gt;
&lt;br /&gt;
1. Duplicating the code for convenience causes a lot of overhead in terms of time and space.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The system might function really well but it becomes extremely difficult to maintain it since the source code has turned clumsy.&lt;br /&gt;
&lt;br /&gt;
3. It is said that the best way to check whether the code really follows the best practices is to realise whether or not the code needs extensive documentation.&lt;br /&gt;
&lt;br /&gt;
4. It becomes very difficult to debug the code in case of anomalies.&lt;br /&gt;
&lt;br /&gt;
5. It is always a good practice to have one reference.&lt;br /&gt;
&lt;br /&gt;
== DRY on Data ==&lt;br /&gt;
&lt;br /&gt;
== When Data Duplication wins over DRY... ==&lt;br /&gt;
Data Duplication can be a big problem is many systems. Some of the problems are listed below&lt;br /&gt;
* Stale Data: The main problem with having multiple copies of the data is that of stale data present in one of the copies, because it was not updated. This can lead to an undefined system behavior.&lt;br /&gt;
&lt;br /&gt;
* More Memory: Stories multiple copies increases the amount of memory required for the system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Duplication while bad, are some times required. Some of the examples are listed below&lt;br /&gt;
&lt;br /&gt;
 '''Caches in Computers''' basically maintain a copy of data which is present in the main memory. This is good for the system on  &lt;br /&gt;
 the whole because it increases the overall performance of the computer by making sure that the processor doesn't to get data or &lt;br /&gt;
 instruction.&lt;br /&gt;
&lt;br /&gt;
 '''Buffer Manager in DBMS''' is a intermediate layer in the  DBMS which gets the DB pages from the Disk and buffer them &lt;br /&gt;
 for upper layer components to use. &lt;br /&gt;
&lt;br /&gt;
 '''Source Control''' software creates creates a copy of the code each member of the teamwhen a more than one person is working a &lt;br /&gt;
 project This ensures smother development.&lt;br /&gt;
&lt;br /&gt;
 '''Read-copy-update (RCU)'''[3] is an operating system kernel technology for improving performance on computers with more than one &lt;br /&gt;
 CPU. More technically it is a synchronization mechanism which can sometimes be used as an alternative to a readers-writer lock. &lt;br /&gt;
 RCU allows you to read a shared data structure as if there is no other CPU accessing it. When you need to update the data  &lt;br /&gt;
 structure, you can update the global pointer to the data and keep the old copy until all the threads currently executing inside &lt;br /&gt;
 the kernel have completed. The updated pointer ensures that none of the CPUs have any remaining references, so the old copy can be &lt;br /&gt;
 deleted. &lt;br /&gt;
&lt;br /&gt;
 '''Documentation''' of a code can be a repetition of what the code does. In cases where the code is too simple to be explained, we &lt;br /&gt;
 can omit the comments on the basis of DRY, but for the codes which are not only large but clumsy, documentation has to be at every &lt;br /&gt;
 possible place even if it means repeating the same thing.&lt;br /&gt;
&lt;br /&gt;
== Guidelines on whether or not to use DRY for Data ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. Andrew Hunt and David Thomas, &amp;lt;i&amp;gt;&amp;quot;Pragmatic Programmer : From Journeyman to Master&amp;quot;&amp;lt;/i&amp;gt;, Addison-Weasley Publications, October-99.&lt;br /&gt;
&lt;br /&gt;
2. [http://www.artima.com/intv/dry.html A discussion with the Authors of the Pragmatic Programmer]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.stat.auckland.ac.nz/~paul/ItDT/HTML/node23.html A good introduction to DRY]&lt;br /&gt;
&lt;br /&gt;
4. [http://stevesmithblog.com/blog/don-rsquo-t-repeat-yourself/ Importance of DRY]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=28794</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 4 ashi4</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_4_ashi4&amp;diff=28794"/>
		<updated>2009-11-18T22:28:00Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25458</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25458"/>
		<updated>2009-10-10T02:46:18Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* C++ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key Abstractions==&lt;br /&gt;
&lt;br /&gt;
A abstraction which describes the system is referred as a '''key abstraction'''. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
= Abstraction in Different O-O languages =&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
Java implements abstraction using Abstract classes and methods. Any class which cannot be instantiated and contains one or more abstract methods in referred as an '''Abstract class''' in JAVA. Such class can only be inherited.&lt;br /&gt;
&lt;br /&gt;
 ''' Example :  Java code for the above figure.'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = green &amp;gt;&lt;br /&gt;
 /* The abstract class car is extended by both the classes Mechanic and LayMan.         */&lt;br /&gt;
 /* They implement the abstract method thingsILookFor                                   */&lt;br /&gt;
 /* according to what they consider important in a car                                  */&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = brown&amp;gt;&lt;br /&gt;
 public abstract class Car {&lt;br /&gt;
 &lt;br /&gt;
 abstract void thingsILookFor();&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class Mechanic extends Car {&lt;br /&gt;
 &lt;br /&gt;
 private int enginePower;&lt;br /&gt;
  &lt;br /&gt;
 private int carMileage;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
  &lt;br /&gt;
  enginePower = 1000;&lt;br /&gt;
  &lt;br /&gt;
  carMileage = 32; &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class LayMan extends Car {&lt;br /&gt;
  &lt;br /&gt;
 private string color;&lt;br /&gt;
 &lt;br /&gt;
 private int seats;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
 &lt;br /&gt;
  color = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  seats = 4; &lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
'''Abstract classes:''' These classes can be used as a framework to build new classes that provide new functionality. These class have one or more virtual function.  &lt;br /&gt;
Functions of the base class whose functionality can be overridden by functions of the derived class at run time are called '''virtual functions'''. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = red&amp;gt;&lt;br /&gt;
 class debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; No method implementation \n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 class X:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class X\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
 class Y:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class Y\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
Ruby has no Abstract classes like in Java or Virtual function like in C++, but the same functionality can be implemented as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = blue&amp;gt;&lt;br /&gt;
 class Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   raise NotImplementedError.new(&amp;quot;no implementation found \n&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 class Mechanic &amp;lt; Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   puts &amp;quot; I like the horse power of the engine and the mileage \n&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 class LayMan &amp;lt; Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   puts &amp;quot; I like the color \n&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
* http://www.research.att.com/~bs/abstraction-and-machine.pdf&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25410</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25410"/>
		<updated>2009-10-10T02:30:52Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key Abstractions==&lt;br /&gt;
&lt;br /&gt;
A abstraction which describes the system is referred as a '''key abstraction'''. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
= Abstraction in Different O-O languages =&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
Java implements abstraction using Abstract classes and methods. Any class which cannot be instantiated and contains one or more abstract methods in referred as an '''Abstract class''' in JAVA. Such class can only be inherited.&lt;br /&gt;
&lt;br /&gt;
 ''' Example :  Java code for the above figure.'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = green &amp;gt;&lt;br /&gt;
 /* The abstract class car is extended by both the classes Mechanic and LayMan.         */&lt;br /&gt;
 /* They implement the abstract method thingsILookFor                                   */&lt;br /&gt;
 /* according to what they consider important in a car                                  */&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = brown&amp;gt;&lt;br /&gt;
 public abstract class Car {&lt;br /&gt;
 &lt;br /&gt;
 abstract void thingsILookFor();&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class Mechanic extends Car {&lt;br /&gt;
 &lt;br /&gt;
 private int enginePower;&lt;br /&gt;
  &lt;br /&gt;
 private int carMileage;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
  &lt;br /&gt;
  enginePower = 1000;&lt;br /&gt;
  &lt;br /&gt;
  carMileage = 32; &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class LayMan extends Car {&lt;br /&gt;
  &lt;br /&gt;
 private string color;&lt;br /&gt;
 &lt;br /&gt;
 private int seats;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
 &lt;br /&gt;
  color = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  seats = 4; &lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
Abstraction mechanisms in C++ are&lt;br /&gt;
&lt;br /&gt;
'''Abstract classes:''' These classes can be used as a framework to build new classes that provide new functionality. These class have one or more virtual function.  &lt;br /&gt;
Functions of the base class whose functionality can be overridden by functions of the derived class at run time are called '''virtual functions'''. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = red&amp;gt;&lt;br /&gt;
 class debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; No method implementation \n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 class X:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class X\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
 class Y:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class Y\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
Ruby has no Abstract classes like in Java or Virtual function like in C++, but the same functionality can be implemented as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = blue&amp;gt;&lt;br /&gt;
 class Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   raise NotImplementedError.new(&amp;quot;no implementation found \n&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 class Mechanic &amp;lt; Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   puts &amp;quot; I like the horse power of the engine and the mileage \n&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 class LayMan &amp;lt; Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   puts &amp;quot; I like the color \n&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
* http://www.research.att.com/~bs/abstraction-and-machine.pdf&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25407</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25407"/>
		<updated>2009-10-10T02:29:07Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key Abstractions==&lt;br /&gt;
&lt;br /&gt;
A abstraction which describes the system is referred as a '''key abstraction'''. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
= Abstraction in Different O-O languages =&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
Java implements abstraction using Abstract classes and methods. Any class which cannot be instantiated and contains one or more abstract methods in referred as an '''Abstract class''' in JAVA. Such class can only be inherited.&lt;br /&gt;
&lt;br /&gt;
 ''' Example :  Java code for the above figure.'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = green &amp;gt;&lt;br /&gt;
 /* The abstract class car is extended by both the classes Mechanic and LayMan.         */&lt;br /&gt;
 /* They implement the abstract method thingsILookFor                                   */&lt;br /&gt;
 /* according to what they consider important in a car                                  */&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 public abstract class Car {&lt;br /&gt;
 &lt;br /&gt;
 abstract void thingsILookFor();&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class Mechanic extends Car {&lt;br /&gt;
 &lt;br /&gt;
 private int enginePower;&lt;br /&gt;
  &lt;br /&gt;
 private int carMileage;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
  &lt;br /&gt;
  enginePower = 1000;&lt;br /&gt;
  &lt;br /&gt;
  carMileage = 32; &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class LayMan extends Car {&lt;br /&gt;
  &lt;br /&gt;
 private string color;&lt;br /&gt;
 &lt;br /&gt;
 private int seats;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
 &lt;br /&gt;
  color = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  seats = 4; &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
Ruby has no Abstract classes like in Java or Virtual function like in C++, but the same functionality can be implemented as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = blue&amp;gt;&lt;br /&gt;
 class Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   raise NotImplementedError.new(&amp;quot;no implementation found \n&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 class Mechanic &amp;lt; Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   puts &amp;quot; I like the horse power of the engine and the mileage \n&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 class LayMan &amp;lt; Car&lt;br /&gt;
  def thingsILike()&lt;br /&gt;
   puts &amp;quot; I like the color \n&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
 &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
Abstraction mechanisms in C++ are&lt;br /&gt;
&lt;br /&gt;
'''Abstract classes:''' These classes can be used as a framework to build new classes that provide new functionality. These class have one or more virtual function.  &lt;br /&gt;
Functions of the base class whose functionality can be overridden by functions of the derived class at run time are called '''virtual functions'''. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = red&amp;gt;&lt;br /&gt;
 class debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; No method implementation \n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 class X:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class X\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
 class Y:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class Y\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
* http://www.research.att.com/~bs/abstraction-and-machine.pdf&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25374</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25374"/>
		<updated>2009-10-10T02:10:11Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* C++ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key Abstractions==&lt;br /&gt;
&lt;br /&gt;
A abstraction which describes the system is referred as a '''key abstraction'''. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
= Abstraction in Different O-O languages =&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
Java implements abstraction using Abstract classes and methods. Any class which cannot be instantiated and contains one or more abstract methods in referred as an '''Abstract class''' in JAVA. Such class can only be inherited.&lt;br /&gt;
&lt;br /&gt;
 ''' Example :  Java code for the above figure.'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = green &amp;gt;&lt;br /&gt;
 /* The abstract class car is extended by both the classes Mechanic and LayMan.         */&lt;br /&gt;
 /* They implement the abstract method thingsILookFor                                   */&lt;br /&gt;
 /* according to what they consider important in a car                                  */&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 public abstract class Car {&lt;br /&gt;
 &lt;br /&gt;
 abstract void thingsILookFor();&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class Mechanic extends Car {&lt;br /&gt;
 &lt;br /&gt;
 private int enginePower;&lt;br /&gt;
  &lt;br /&gt;
 private int carMileage;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
  &lt;br /&gt;
  enginePower = 1000;&lt;br /&gt;
  &lt;br /&gt;
  carMileage = 32; &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class LayMan extends Car {&lt;br /&gt;
  &lt;br /&gt;
 private string color;&lt;br /&gt;
 &lt;br /&gt;
 private int seats;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
 &lt;br /&gt;
  color = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  seats = 4; &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
Abstraction mechanisms in C++ are&lt;br /&gt;
&lt;br /&gt;
'''Abstract classes:''' These classes can be used as a framework to build new classes that provide new functionality. These class have one or more virtual function.  &lt;br /&gt;
Functions of the base class whose functionality can be overridden by functions of the derived class at run time are called '''virtual functions'''. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = red&amp;gt;&lt;br /&gt;
 class debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; No method implementation \n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 class X:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class X\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
 class Y:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class Y\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
* http://www.research.att.com/~bs/abstraction-and-machine.pdf&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25334</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25334"/>
		<updated>2009-10-10T01:53:40Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* C++ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key Abstractions==&lt;br /&gt;
&lt;br /&gt;
A abstraction which describes the system is referred as a '''key abstraction'''. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
= Abstraction in Different O-O languages =&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
Java implements abstraction using Abstract classes and methods. Any class which cannot be instantiated and contains one or more abstract methods in referred as an '''Abstract class''' in JAVA. Such class can only be inherited.&lt;br /&gt;
&lt;br /&gt;
 ''' Example :  Java code for the above figure.'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = green &amp;gt;&lt;br /&gt;
 /* The abstract class car is extended by both the classes Mechanic and LayMan.         */&lt;br /&gt;
 /* They implement the abstract method thingsILookFor                                   */&lt;br /&gt;
 /* according to what they consider important in a car                                  */&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 public abstract class Car {&lt;br /&gt;
 &lt;br /&gt;
 abstract void thingsILookFor();&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class Mechanic extends Car {&lt;br /&gt;
 &lt;br /&gt;
 private int enginePower;&lt;br /&gt;
  &lt;br /&gt;
 private int carMileage;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
  &lt;br /&gt;
  enginePower = 1000;&lt;br /&gt;
  &lt;br /&gt;
  carMileage = 32; &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class LayMan extends Car {&lt;br /&gt;
  &lt;br /&gt;
 private string color;&lt;br /&gt;
 &lt;br /&gt;
 private int seats;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
 &lt;br /&gt;
  color = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  seats = 4; &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
Abstraction mechanisms in C++ are&lt;br /&gt;
# Abstract Classes&lt;br /&gt;
# Templates&lt;br /&gt;
&lt;br /&gt;
Abstract classes: These classes can be used as a framework to build new classes that provide new functionality. These class have one or more virtual function.  &lt;br /&gt;
Functions of the base class whose functionality can be overridden by functions of the derived class at run time are called '''virtual functions'''. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = red&amp;gt;&lt;br /&gt;
 class debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; No method implementation \n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 class X:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class X\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
 class Y:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class Y\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
* http://www.research.att.com/~bs/abstraction-and-machine.pdf&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25333</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25333"/>
		<updated>2009-10-10T01:53:14Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key Abstractions==&lt;br /&gt;
&lt;br /&gt;
A abstraction which describes the system is referred as a '''key abstraction'''. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
= Abstraction in Different O-O languages =&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
Java implements abstraction using Abstract classes and methods. Any class which cannot be instantiated and contains one or more abstract methods in referred as an '''Abstract class''' in JAVA. Such class can only be inherited.&lt;br /&gt;
&lt;br /&gt;
 ''' Example :  Java code for the above figure.'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = green &amp;gt;&lt;br /&gt;
 /* The abstract class car is extended by both the classes Mechanic and LayMan.         */&lt;br /&gt;
 /* They implement the abstract method thingsILookFor                                   */&lt;br /&gt;
 /* according to what they consider important in a car                                  */&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 public abstract class Car {&lt;br /&gt;
 &lt;br /&gt;
 abstract void thingsILookFor();&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class Mechanic extends Car {&lt;br /&gt;
 &lt;br /&gt;
 private int enginePower;&lt;br /&gt;
  &lt;br /&gt;
 private int carMileage;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
  &lt;br /&gt;
  enginePower = 1000;&lt;br /&gt;
  &lt;br /&gt;
  carMileage = 32; &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class LayMan extends Car {&lt;br /&gt;
  &lt;br /&gt;
 private string color;&lt;br /&gt;
 &lt;br /&gt;
 private int seats;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
 &lt;br /&gt;
  color = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  seats = 4; &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
Abstraction mechanisms in C++ are&lt;br /&gt;
# Abstract Classes&lt;br /&gt;
# Templates&lt;br /&gt;
&lt;br /&gt;
Abstract classes: These classes can be used as a framework to build new classes that provide new functionality. These class have one or more virtual function.  &lt;br /&gt;
Functions of the base class whose functionality can be overridden by functions of the derived class at run time are called '''virtual functions'''. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color = red&amp;gt;&lt;br /&gt;
 class debugger&lt;br /&gt;
 {&lt;br /&gt;
&lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; No method implementation \n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 class X:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class X\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
 class Y:public debugger&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
       virtual void dump()&lt;br /&gt;
       {&lt;br /&gt;
           cout &amp;lt;&amp;lt; &amp;quot; dump method implementation for class Y\n&amp;quot;;&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
* http://www.research.att.com/~bs/abstraction-and-machine.pdf&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25292</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25292"/>
		<updated>2009-10-10T01:31:41Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key Abstractions==&lt;br /&gt;
&lt;br /&gt;
A abstraction which describes the system is referred as a '''key abstraction'''. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
= Abstraction in Different O-O languages =&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
Java implements abstraction using Abstract classes and methods. Any class which cannot be instantiated and contains one or more abstract methods in referred as an '''Abstract class''' in JAVA. Such class can only be inherited.&lt;br /&gt;
&lt;br /&gt;
 ''' Example :  Java code for the above figure.'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = green &amp;gt;&lt;br /&gt;
 /* The abstract class car is extended by both the classes Mechanic and LayMan.         */&lt;br /&gt;
 /* They implement the abstract method thingsILookFor                                   */&lt;br /&gt;
 /* according to what they consider important in a car                                  */&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 public abstract class Car {&lt;br /&gt;
 &lt;br /&gt;
 abstract void thingsILookFor();&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class Mechanic extends Car {&lt;br /&gt;
 &lt;br /&gt;
 private int enginePower;&lt;br /&gt;
  &lt;br /&gt;
 private int carMileage;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
  &lt;br /&gt;
  enginePower = 1000;&lt;br /&gt;
  &lt;br /&gt;
  carMileage = 32; &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class LayMan extends Car {&lt;br /&gt;
  &lt;br /&gt;
 private string color;&lt;br /&gt;
 &lt;br /&gt;
 private int seats;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
 &lt;br /&gt;
  color = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  seats = 4; &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25289</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25289"/>
		<updated>2009-10-10T01:31:06Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Key Abstractions==&lt;br /&gt;
&lt;br /&gt;
A abstraction which describes the system is referred as a '''key abstraction'''. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
= Abstraction in Different O-O languages =&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
Java implements abstraction using Abstract classes and methods. Any class which cannot be instantiated and contains one or more abstract methods in referred as an '''Abstract class''' in JAVA. Such class can only be inherited.&lt;br /&gt;
&lt;br /&gt;
''' Example :  Java code for the above figure.'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color = green &amp;gt;&lt;br /&gt;
 /* The abstract class car is extended by both the classes Mechanic and LayMan.         */&lt;br /&gt;
 /* They implement the abstract method thingsILookFor                                   */&lt;br /&gt;
 /* according to what they consider important in a car                                  */&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 public abstract class Car {&lt;br /&gt;
 &lt;br /&gt;
 abstract void thingsILookFor();&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class Mechanic extends Car {&lt;br /&gt;
 &lt;br /&gt;
 private int enginePower;&lt;br /&gt;
  &lt;br /&gt;
 private int carMileage;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
  &lt;br /&gt;
  enginePower = 1000;&lt;br /&gt;
  &lt;br /&gt;
  carMileage = 32; &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 public class LayMan extends Car {&lt;br /&gt;
  &lt;br /&gt;
 private string color;&lt;br /&gt;
 &lt;br /&gt;
 private int seats;&lt;br /&gt;
 &lt;br /&gt;
  void thingsILookFor() {&lt;br /&gt;
 &lt;br /&gt;
  color = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  seats = 4; &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25217</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25217"/>
		<updated>2009-10-10T01:06:12Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Types of abstractions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
&lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanisms of finding key Abstractions=&lt;br /&gt;
A '''key abstraction''' is an abstraction without which we cannot describe the system. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25135</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25135"/>
		<updated>2009-10-10T00:43:54Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Types of abstractions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark  of which some closely model problem domain entities These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - Object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
 Example: &lt;br /&gt;
 &lt;br /&gt;
* Action abstraction - Object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
 Example:&lt;br /&gt;
 &lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
 Example:&lt;br /&gt;
 &lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanisms of finding key Abstractions=&lt;br /&gt;
A '''key abstraction''' is an abstraction without which we cannot describe the system. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25022</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 15 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_15_ms&amp;diff=25022"/>
		<updated>2009-10-10T00:26:37Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* Mechanisms of finding key Abstractions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&amp;quot;Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.&amp;quot;&amp;lt;i&amp;gt;taken from Object-Oriented Analysis and Design by Grady Booch&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:&lt;br /&gt;
*Abstraction&lt;br /&gt;
*Encapsulation&lt;br /&gt;
*Modularity&lt;br /&gt;
*Hierarchy&lt;br /&gt;
&lt;br /&gt;
The goal of this article is to describe how abstraction relates to object oriented languages.&lt;br /&gt;
&lt;br /&gt;
=Definition of Abstraction=&lt;br /&gt;
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.&amp;lt;i&amp;gt;[taken from [http://www.tutorialspoint.com/ruby/ruby_modules.htm what is abstraction?]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternate definition given in the book object oriented analysis and design,states that-:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed.&lt;br /&gt;
In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;table  BORDER=3&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Abstraction.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 '''Abstraction focuses on the essential characteristics of some object, relative to perspective of the viewer.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Types of abstractions=&lt;br /&gt;
There are different types of abstractions as suggested by Seidewitz and Stark of which some closely model problem domain entities and some which have no reason for existence. These are as following (mentioned in the order of their usefulness) -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Entity abstraction - This is where an object represents a useful model of a problem domain or solution domain entity.&lt;br /&gt;
* Action abstraction - This is when an object provides a generalized set of operations, all of which perform the same kind of function.&lt;br /&gt;
* Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.&lt;br /&gt;
* Conincidental abstraction - An object that packages a set of operations that have no relation to each other.&lt;br /&gt;
&lt;br /&gt;
Entity abstractions is what is used widely because it directly parallels a given problem domain.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Definitions taken from object oriented analysis and design  by Grady Booch&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanisms of finding key Abstractions=&lt;br /&gt;
A '''key abstraction''' is an abstraction without which we cannot describe the system. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Discovery : Discovery is the process of recognizing the abstraction used in the design of the system.&lt;br /&gt;
 For example, a customer doing a bank transaction speaks in terms of accounts,deposits and withdrawals; &lt;br /&gt;
 these works are part of the vocabulary of the problem domain.&lt;br /&gt;
&lt;br /&gt;
* Invention : Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. &lt;br /&gt;
 For example A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen  &lt;br /&gt;
 mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [http://www.amazon.com/Object-Oriented-Analysis-Design-Applications-2nd/dp/0805353402 Object oriented Analysis and design by Grady Booch]&lt;br /&gt;
&lt;br /&gt;
* http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html&lt;br /&gt;
* http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html&lt;br /&gt;
* http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/&lt;br /&gt;
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html&lt;br /&gt;
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization&lt;br /&gt;
* http://www.answers.com/topic/object-oriented-programming&lt;br /&gt;
* http://computer-programming-tutorials.suite101.com/article.cfm/a_brief_introduction_to_objectoriented_design&lt;br /&gt;
* http://delivery.acm.org/10.1145/30000/25315/p54-seidewitz.pdf?key1=25315&amp;amp;key2=8831215521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=55753397&amp;amp;CFTOKEN=61066169&lt;br /&gt;
&lt;br /&gt;
=Further Reading=&lt;br /&gt;
* http://developer.apple.com/iphone/library/documentation/cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html&lt;br /&gt;
* http://java.sun.com/docs/books/tutorial/java/concepts/&lt;br /&gt;
* http://computing.southern.edu/halterman/OOPJ/&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21652</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21652"/>
		<updated>2009-09-22T02:32:29Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* '''References''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Types of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
Every software system has well defined objectives and a comprehensive functionality.The intention here is to test the working of the system with respect to its original objectives. This is slightly different from functional testing. In functional testing we basically test all possible use-cases of the system while in system testing we are looking for discrepancies between the actual behavior as compared to its objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: It involves checking the compatibility when interacted or used in cohesion with other systems.&lt;br /&gt;
 For Example: A routing protocol has a set of standards. The implementation can be vendor specific. When the two different &lt;br /&gt;
 implementations of the protocols run on different routers, compatibility tests are conducted to ensure the communication between &lt;br /&gt;
 them.&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
 For Example: Security alarms are equipped with a secret code and the people having access have the information about them. They&lt;br /&gt;
 are tested for all possible incorrect codes to prevent an unauthorized person from entering the protected area.&lt;br /&gt;
&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out the robustness.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at the peak rate for short &lt;br /&gt;
 period of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These tests subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of &lt;br /&gt;
 time&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is user friendly&lt;br /&gt;
 For Example: In a banking software, the employee is unaware of the implementation details and he / she should be able to perform &lt;br /&gt;
 the transactions with considerable ease.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer before accepting the software. The main focus of this testing is to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product such as a computer manufacturer’s operating system or compiler or a software &lt;br /&gt;
 company’s database management system, the customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies his needs&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
# [http://books.google.com/books?id=86rz6UExDEEC&amp;amp;dq=Art+of+software+testing&amp;amp;printsec=frontcover&amp;amp;source=bl&amp;amp;ots=yPUqKjndyO&amp;amp;sig=g3u5nwc_zyQcJI6UDzJzuah1_zs&amp;amp;hl=en&amp;amp;ei=nSe4SoHjLJXSlAe99_HODg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=3#v=onepage&amp;amp;q=&amp;amp;f=false Art of Software Testing by Glenford J. Myers]&lt;br /&gt;
# [http://books.google.com/books?id=Ss62LSqCa1MC&amp;amp;pg=PA197&amp;amp;lpg=PA197&amp;amp;dq=FOUNDATIONS+OF+SOFTWARE+TESTING&amp;amp;ots=YIbCfRQrR3&amp;amp;sig=itF1c7wwPFwdfIb2RYoOIcVz2VM&amp;amp;hl=en&amp;amp;ei=xim4St-nKY7klAfDyM3KDg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1#v=onepage&amp;amp;q=&amp;amp;f=false FOUNDATIONS OF SOFTWARE TESTING ISTQB CERTIFICATION Dorothy Graham Erik van Veenendaal Isabel Evans Rex Black]&lt;br /&gt;
# [http://www.softwaretestinghelp.com/types-of-software-testing/ www.softwaretestinghelp.com/types-of-software-testing/]&lt;br /&gt;
# [http://www.cs.pitt.edu/~mock/cs1530/lectnotes.html&lt;br /&gt;
# [http://portal.acm.org/citation.cfm?id=1253532.1254712&amp;amp;coll=&amp;amp;dl=&amp;amp;type=series&amp;amp;idx=1253532&amp;amp;part=Proceedings&amp;amp;WantType=Proceedings&amp;amp;title=International%20Conference%20on%20Software%20Engineering Software Testing Research: Achievements, Challenges, Dreams. Antonia Bertolino. In Future of Software Engineering, 29th International Conference on Software Engineering, May 2007]&lt;br /&gt;
# [http://publib.boulder.ibm.com/infocenter/rfthelp/v7r0m0/index.jsp?topic=/com.ibm.rational.test.ft.doc/topics/FTJava_Tutorials.html publib.boulder.ibm.com/infocenter]&lt;br /&gt;
# [http://cs.allegheny.edu/~gkapfham/research/publish/software_testing_chapter.pdf Software Testing. Gregory M. Kapfhammer. The Computer Science and Engineering Handbook]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21642</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21642"/>
		<updated>2009-09-22T02:28:16Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Types of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
Every software system has well defined objectives and a comprehensive functionality.The intention here is to test the working of the system with respect to its original objectives. This is slightly different from functional testing. In functional testing we basically test all possible use-cases of the system while in system testing we are looking for discrepancies between the actual behavior as compared to its objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: It involves checking the compatibility when interacted or used in cohesion with other systems.&lt;br /&gt;
 For Example: A routing protocol has a set of standards. The implementation can be vendor specific. When the two different &lt;br /&gt;
 implementations of the protocols run on different routers, compatibility tests are conducted to ensure the communication between &lt;br /&gt;
 them.&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
 For Example: Security alarms are equipped with a secret code and the people having access have the information about them. They&lt;br /&gt;
 are tested for all possible incorrect codes to prevent an unauthorized person from entering the protected area.&lt;br /&gt;
&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out the robustness.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at the peak rate for short &lt;br /&gt;
 period of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These tests subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of &lt;br /&gt;
 time&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is user friendly&lt;br /&gt;
 For Example: In a banking software, the employee is unaware of the implementation details and he / she should be able to perform &lt;br /&gt;
 the transactions with considerable ease.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer before accepting the software. The main focus of this testing is to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product such as a computer manufacturer’s operating system or compiler or a software &lt;br /&gt;
 company’s database management system, the customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies his needs&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
# [http://books.google.com/books?id=86rz6UExDEEC&amp;amp;dq=Art+of+software+testing&amp;amp;printsec=frontcover&amp;amp;source=bl&amp;amp;ots=yPUqKjndyO&amp;amp;sig=g3u5nwc_zyQcJI6UDzJzuah1_zs&amp;amp;hl=en&amp;amp;ei=nSe4SoHjLJXSlAe99_HODg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=3#v=onepage&amp;amp;q=&amp;amp;f=false Art of Software Testing by Glenford J. Myers]&lt;br /&gt;
# [http://books.google.com/books?id=Ss62LSqCa1MC&amp;amp;pg=PA197&amp;amp;lpg=PA197&amp;amp;dq=FOUNDATIONS+OF+SOFTWARE+TESTING&amp;amp;ots=YIbCfRQrR3&amp;amp;sig=itF1c7wwPFwdfIb2RYoOIcVz2VM&amp;amp;hl=en&amp;amp;ei=xim4St-nKY7klAfDyM3KDg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1#v=onepage&amp;amp;q=&amp;amp;f=false FOUNDATIONS OF SOFTWARE TESTING ISTQB CERTIFICATION Dorothy Graham Erik van Veenendaal Isabel Evans Rex Black]&lt;br /&gt;
# [http://www.softwaretestinghelp.com/types-of-software-testing/ www.softwaretestinghelp.com/types-of-software-testing/]&lt;br /&gt;
# [http://www.cs.pitt.edu/~mock/cs1530/lectnotes.html&lt;br /&gt;
# Software Testing Research: Achievements, Challenges, Dreams. Antonia Bertolino. In Future of Software Engineering, 29th International Conference on Software Engineering, May 2007&lt;br /&gt;
# [http://publib.boulder.ibm.com/infocenter/rfthelp/v7r0m0/index.jsp?topic=/com.ibm.rational.test.ft.doc/topics/FTJava_Tutorials.html publib.boulder.ibm.com/infocenter]&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21598</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21598"/>
		<updated>2009-09-22T01:37:35Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Type of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: They check the compatibility of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at rate for the peak rate for short &lt;br /&gt;
 period of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of &lt;br /&gt;
 time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer after before accepting the system. The main focus of the testing to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product, such as a computer manufacturer’s operating system or compiler, or a software &lt;br /&gt;
 company’s database management system, the sensible customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies its needs&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
# [http://books.google.com/books?id=86rz6UExDEEC&amp;amp;dq=Art+of+software+testing&amp;amp;printsec=frontcover&amp;amp;source=bl&amp;amp;ots=yPUqKjndyO&amp;amp;sig=g3u5nwc_zyQcJI6UDzJzuah1_zs&amp;amp;hl=en&amp;amp;ei=nSe4SoHjLJXSlAe99_HODg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=3#v=onepage&amp;amp;q=&amp;amp;f=false Art of Software Testing by Glenford J. Myers]&lt;br /&gt;
# [http://books.google.com/books?id=Ss62LSqCa1MC&amp;amp;pg=PA197&amp;amp;lpg=PA197&amp;amp;dq=FOUNDATIONS+OF+SOFTWARE+TESTING&amp;amp;ots=YIbCfRQrR3&amp;amp;sig=itF1c7wwPFwdfIb2RYoOIcVz2VM&amp;amp;hl=en&amp;amp;ei=xim4St-nKY7klAfDyM3KDg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1#v=onepage&amp;amp;q=&amp;amp;f=false FOUNDATIONS OF SOFTWARE TESTING ISTQB CERTIFICATION Dorothy Graham Erik van Veenendaal Isabel Evans Rex Black]&lt;br /&gt;
# [http://www.softwaretestinghelp.com/types-of-software-testing/ www.softwaretestinghelp.com/types-of-software-testing/]&lt;br /&gt;
# [http://www.cs.pitt.edu/~mock/cs1530/lectnotes.html&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21595</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21595"/>
		<updated>2009-09-22T01:35:28Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Type of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: They check the compatibility of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at rate for the peak rate for short &lt;br /&gt;
 period of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of &lt;br /&gt;
 time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer after before accepting the system. The main focus of the testing to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product, such as a computer manufacturer’s operating system or compiler, or a software &lt;br /&gt;
 company’s database management system, the sensible customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies its needs&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
# [http://books.google.com/books?id=86rz6UExDEEC&amp;amp;dq=Art+of+software+testing&amp;amp;printsec=frontcover&amp;amp;source=bl&amp;amp;ots=yPUqKjndyO&amp;amp;sig=g3u5nwc_zyQcJI6UDzJzuah1_zs&amp;amp;hl=en&amp;amp;ei=nSe4SoHjLJXSlAe99_HODg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=3#v=onepage&amp;amp;q=&amp;amp;f=false  Art  &lt;br /&gt;
of Software Testing by Glenford J. Myers]&lt;br /&gt;
# [http://books.google.com/books?id=Ss62LSqCa1MC&amp;amp;pg=PA197&amp;amp;lpg=PA197&amp;amp;dq=FOUNDATIONS+OF+SOFTWARE+TESTING&amp;amp;ots=YIbCfRQrR3&amp;amp;sig=itF1c7wwPFwdfIb2RYoOIcVz2VM&amp;amp;hl=en&amp;amp;ei=xim4St-nKY7klAfDyM3KDg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1#v=onepage&amp;amp;q=&amp;amp;f=false &lt;br /&gt;
FOUNDATIONS OF SOFTWARE TESTING ISTQB CERTIFICATION Dorothy Graham Erik van Veenendaal Isabel Evans Rex Black]&lt;br /&gt;
# [http://www.softwaretestinghelp.com/types-of-software-testing/ ww.softwaretestinghelp.com/types-of-software-testing/]&lt;br /&gt;
# [http://www.cs.pitt.edu/~mock/cs1530/lectnotes.html&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21590</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21590"/>
		<updated>2009-09-22T01:33:25Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Type of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: They check the compatibility of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at rate for the peak rate for short &lt;br /&gt;
 period of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of &lt;br /&gt;
 time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer after before accepting the system. The main focus of the testing to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product, such as a computer manufacturer’s operating system or compiler, or a software &lt;br /&gt;
 company’s database management system, the sensible customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies its needs&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
# [http://books.google.com/books?id=86rz6UExDEEC&amp;amp;dq=Art+of+software+testing&amp;amp;printsec=frontcover&amp;amp;source=bl&amp;amp;ots=yPUqKjndyO&amp;amp;  sig=g3u5nwc_zyQcJI6UDzJzuah1_zs&amp;amp;hl=en&amp;amp;ei=nSe4SoHjLJXSlAe99_HODg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=3#v=onepage&amp;amp;q=&amp;amp;f=false  Art  &lt;br /&gt;
of Software Testing]&lt;br /&gt;
# [http://books.google.com/books?id=Ss62LSqCa1MC&amp;amp;pg=PA197&amp;amp;lpg=PA197&amp;amp;dq=FOUNDATIONS+OF+SOFTWARE+TESTING&amp;amp;ots=YIbCfRPw_2&amp;amp;sig=VVPi7ZMQRYu_HZSyuUmtjngr5Do&amp;amp;hl=en&amp;amp;ei=Kii4SuyyNZCOlQeU2PjaDg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1#v=onepage&amp;amp;q=&amp;amp;f=false &lt;br /&gt;
FOUNDATIONS OF SOFTWARE TESTING ISTQB CERTIFICATION Dorothy Graham Erik van Veenendaal Isabel Evans Rex Black]&lt;br /&gt;
# [http://www.softwaretestinghelp.com/types-of-software-testing/ ww.softwaretestinghelp.com/types-of-software-testing/]&lt;br /&gt;
# [http://www.cs.pitt.edu/~mock/cs1530/lectnotes.html&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21589</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21589"/>
		<updated>2009-09-22T01:32:11Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Type of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: They check the compatibility of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at rate for the peak rate for short &lt;br /&gt;
 period of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of &lt;br /&gt;
 time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer after before accepting the system. The main focus of the testing to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product, such as a computer manufacturer’s operating system or compiler, or a software &lt;br /&gt;
 company’s database management system, the sensible customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies its needs&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
# [http://books.google.com/books?id=86rz6UExDEEC&amp;amp;dq=Art+of+software+testing&amp;amp;printsec=frontcover&amp;amp;source=bl&amp;amp;ots=yPUqKjndyO&amp;amp;  sig=g3u5nwc_zyQcJI6UDzJzuah1_zs&amp;amp;hl=en&amp;amp;ei=nSe4SoHjLJXSlAe99_HODg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=3#v=onepage&amp;amp;q=&amp;amp;f=false  Art  &lt;br /&gt;
of Software Testing]&lt;br /&gt;
# [http://books.google.com/books?id=Ss62LSqCa1MC&amp;amp;pg=PA197&amp;amp;lpg=PA197&amp;amp;dq=FOUNDATIONS+OF+SOFTWARE+TESTING&amp;amp;ots=YIbCfRPw_2&amp;amp;sig=VVPi7ZMQRYu_HZSyuUmtjngr5Do&amp;amp;hl=en&amp;amp;ei=Kii4SuyyNZCOlQeU2PjaDg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1#v=onepage&amp;amp;q=&amp;amp;f=false &lt;br /&gt;
FOUNDATIONS OF SOFTWARE TESTING ISTQB CERTIFICATION Dorothy Graham Erik van Veenendaal Isabel Evans Rex Black]&lt;br /&gt;
# [http://www.softwaretestinghelp.com/types-of-software-testing/]&lt;br /&gt;
# [http://www.cs.pitt.edu/~mock/cs1530/lectnotes.html&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21576</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21576"/>
		<updated>2009-09-22T01:24:55Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Types of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
System testing is testing the working of the system or program with respect to the original objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: They check the compatibility of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at rate for the peak rate for short &lt;br /&gt;
 period of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of &lt;br /&gt;
 time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer after before accepting the system. The main focus of the testing to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product, such as a computer manufacturer’s operating system or compiler, or a software &lt;br /&gt;
 company’s database management system, the sensible customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies its needs&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21575</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21575"/>
		<updated>2009-09-22T01:23:18Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Type of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: They check the compatibility of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at rate for the peak rate for short &lt;br /&gt;
 period of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of &lt;br /&gt;
 time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer after before accepting the system. The main focus of the testing to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product, such as a computer manufacturer’s operating system or compiler, or a software &lt;br /&gt;
 company’s database management system, the sensible customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies its needs&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21571</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21571"/>
		<updated>2009-09-22T01:21:51Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Other Type of Testing''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''System Testing''' ===&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: They check the compatibility of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at rate for the peak rate for short period &lt;br /&gt;
 of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Acceptance Testing''' ===&lt;br /&gt;
The testing done by user or customer after before accepting the system. The main focus of the testing to establish confidence in the user regarding the system. &lt;br /&gt;
 For Example: In the case of a program product, such as a computer manufacturer’s operating system or compiler, or a software &lt;br /&gt;
 company’s database management system, the sensible customer first performs an acceptance test to determine whether the product  &lt;br /&gt;
 satisfies its needs&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21558</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21558"/>
		<updated>2009-09-22T01:13:44Z</updated>

		<summary type="html">&lt;p&gt;Messi: /* '''Other Type of Testing''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
=== '''Other Type of Testing''' ===&lt;br /&gt;
&lt;br /&gt;
* '''System Testing'''&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatibility Tests: They check the compatibility of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for a web server would be sending HTTP requests at rate for the peak rate for short period &lt;br /&gt;
 of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Requests at a high rate ( less than the peak rate) to a web server for a significant amount of time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usability Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;br /&gt;
&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21555</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21555"/>
		<updated>2009-09-22T01:12:02Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
=== '''Other Type of Testing''' ===&lt;br /&gt;
&lt;br /&gt;
* '''System Testing'''&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatiblity Tests: They check the compatibilty of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for testing a webserver would be sending HTTP requests at rate for the peak rate for short period &lt;br /&gt;
 of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Request at a high rate ( less than the peak rate) for a significant amount of time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usablilty Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21552</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21552"/>
		<updated>2009-09-22T01:11:08Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
=== '''Other Type of Testing''' ===&lt;br /&gt;
&lt;br /&gt;
* '''System Testing'''&lt;br /&gt;
System testing is testing the working of the system or program with respect to the orginal objectives of the system. This is slightly different from Functional testing. In Functional testing we basically test the use-case of the system while in system testing we are looking for discrepancies between the working of the system and the objectives. &lt;br /&gt;
There are various categories of system tests some of the main ones are listed below&lt;br /&gt;
&lt;br /&gt;
* Compatiblity Tests: They check the compatibilty of the system which other system.&lt;br /&gt;
 For Example: Testing a routing protocol in one router with the one running on a system from another vendor&lt;br /&gt;
&lt;br /&gt;
* '''Security Tests''': They test the security feature of the system.&lt;br /&gt;
 &amp;lt;br/&amp;gt;&lt;br /&gt;
*  '''Stress Tests''': These type of tests stress the system to the maximum to find out how robust they are.  &lt;br /&gt;
 For Example: A good stress test for testing a webserver would be sending HTTP requests at rate for the peak rate for short period &lt;br /&gt;
 of time&lt;br /&gt;
&lt;br /&gt;
* '''Volume Tests''': These test subject the system to heavy loads of data. &lt;br /&gt;
 For Example: Sending HTTP Request at a high rate ( less than the peak rate) for a significant amount of time is volume testing&lt;br /&gt;
&lt;br /&gt;
* '''Usablilty Test''': They are used to test if the system is easy to use of the end-user&lt;br /&gt;
 For Example: Tests that test UI of any product fall under this category&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21522</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21522"/>
		<updated>2009-09-22T00:36:34Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21513</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 4 xy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_4_xy&amp;diff=21513"/>
		<updated>2009-09-22T00:28:56Z</updated>

		<summary type="html">&lt;p&gt;Messi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==''' Functional and Integration testing and beyond''' == &lt;br /&gt;
Recognition of software test engineering as a specialty area has increased during the last twenty years. Testing is one of the key focus areas in software engineering. It is an essential activity that observes the functionality of a software system validates its intended behavior and identifies the potential malfunctions. Testing is also the primary way to improve software reliability. &lt;br /&gt;
&lt;br /&gt;
The test cases should be carefully designed to cover many aspects in the SDLC such as possible aberrations from user’s requirements, system behavior upon malicious inputs, and robustness to extensive load conditions and so on. As more and more software is used in critical applications, the time and cost involved in testing is also increasing owing to the higher quality required. Although test automation saves a lot of time and can be used for regression load tests, manual testing is still widely used in the industry.&lt;br /&gt;
&lt;br /&gt;
== '''Terms''' ==&lt;br /&gt;
# Driver: Supporting code or data used for testing the software system&lt;br /&gt;
# SDLC: Software Development Life Cycle &lt;br /&gt;
# Stub: Dummy procedure that can be used to simulate or substitute an actual portion of a system&lt;br /&gt;
# Sub-system: Component or Module of a software system&lt;br /&gt;
# System Under Test: The software system which has to be tested&lt;br /&gt;
# Test: Sequence of steps to validate the system design and implementation&lt;br /&gt;
# Usecase :Scenario that describes the interaction between an user and a system&lt;br /&gt;
&lt;br /&gt;
== '''Integration Testing''' ==&lt;br /&gt;
Integration testing is a systematic approach to build the complete software structure specified in the design from unit-tested &lt;br /&gt;
modules.It is the next phase of unit testing. Generally in software development, complete software is divided into various sub-systems mostly developed by different teams. More often than not each sub-system works very well individually but when they are integrated then lot of problems arise. So the intention of integration tests is not to test the functionality of individual modules but the interaction and inter-dependencies between the modules.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For instance in Object oriented model, the classes in a particular module could have been inherited from some other module. &lt;br /&gt;
 The interface can be in a different module and the implementation can be elsewhere. In such scenarios, the faults can be &lt;br /&gt;
 best found in the integration tests.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 Another instance is to test the communication and compatibility between the client and server. Stand alone client and server &lt;br /&gt;
 functionality is tested in the unit tests. &lt;br /&gt;
&lt;br /&gt;
There are many approaches that can be followed for Integration Testing&lt;br /&gt;
&lt;br /&gt;
=== '''Big Bang Testing Approach''' ===&lt;br /&gt;
As the name suggests all the components are integrated at once. After all the integration is completed a set of tests are run which not only validate a single component of sub-system but also test and validate the interaction between different components. This approach is more useful in smaller systems because integration of smaller systems is easier.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Since all the modules are combined and tested at the same time, this approach of integration is less time consuming&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
**  Debugging and solving a fault is not trivial. The reason being many modules are integrated and not all the bugs are determined in the unit tests.Therefore it is ambiguous for the tester whether the fault is due to the sub-system or due to the integration.&lt;br /&gt;
** Testing process cannot be started until all the sub-systems have finished their unit tests.&lt;br /&gt;
** Designing the test cases is an arduous task.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bigbang.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== '''Incremental Testing Approach''' ===&lt;br /&gt;
Testing is done after integration of each module. After the successful completion of the unit tests, sub-systems are integrated and tested. Stubs are used for modules in the system which are not integrated till now.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** Problems detection is early compared to the Big Bang approach&lt;br /&gt;
** No need to wait till the unit testing of all the modules have finished&lt;br /&gt;
** Debugging is much simpler&lt;br /&gt;
* Disadvantages:&lt;br /&gt;
** This approach is a time taking process because the integration tests have to run multiple times&lt;br /&gt;
** Stubs have to be developed to substitute the missing modules&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Incremental testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Various Approach can be taken for Incremental Testing&lt;br /&gt;
* '''Top-Down Approach''': In this approach the system is tested according to the work flow or code flow. The Top level module is tested first then each lower level module is integrated and tested.Top level modules call other modules and lower level modules are are called by Top level ones. Terminal modules do not call any other module. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Topdown testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure Module A is the top most module in the system then B,C,D are lower level modules. Generally module A is the user interface and stubs are created for the remaining modules which are used for the tests.As and when the sub-systems are ready after the unit tests, they are replaced by their respective stubs for the integration tests.&lt;br /&gt;
* Advantages:&lt;br /&gt;
** The test flow follows the architecture of the system so any bug at the top level design or implementation could be found in the early stages&lt;br /&gt;
** If the top level module calls multiple lower modules then the testing can be done in various combinations&lt;br /&gt;
 For example in the figure A calls B and C. The testing can be done as follows&lt;br /&gt;
 A-B-C-D &lt;br /&gt;
 A-C-B-D&lt;br /&gt;
* Disadvantages :&lt;br /&gt;
** The main problem with this approach is the use of stubs. Mostly stubs are written to print out some trace statement based on the output of module.There can be frequent changes in the stubs as and when the bugs are found out and while testing multiple scenarios.This is an additional overhead.&lt;br /&gt;
&lt;br /&gt;
* '''Bottom-Up Approach''': The bottom-up approach is the opposite of the top-down approach. In this approach the terminal modules are tested first, then the higher modules and finally the top-most one. Drivers are used in this approach. &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[Image:Bottomup testing.jpg]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above figure E,D are the terminal modules which are tested first. Then the higher level modules B,C are tested and finally the topmost module is tested&lt;br /&gt;
*Advantages:&lt;br /&gt;
** No need to write stubs&lt;br /&gt;
** If the terminal modules does the main work in the system then they will be tested first&lt;br /&gt;
*Disadvantages:&lt;br /&gt;
** Need to write drivers&lt;br /&gt;
** The testing is not according to the architecture of the system, in the sense that until all the modules are integrated, the tests do not follow the flow of the design.&lt;br /&gt;
&lt;br /&gt;
== '''Functional testing''' ==&lt;br /&gt;
Functional testing is designed to ensure whether the system requirements and specifications are achieved. It can start with testing of the requirements and whether the application complies with the organizational policies and procedures.&lt;br /&gt;
During the design phase, after knowing the functionality of the module/modules and the system, some errors can be predicted in advance. A functional test should incorporate such type of scenarios too. In this case the erroneous transactions/ applications are deliberately introduced and the system should be able to correctly find them. In general, all the use cases in the user’s requirements become the functional test cases.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
 For example, suppose we are to develop the software for an elevator. For designing the test cases for this software, &lt;br /&gt;
 all the scenarios and operations that can take place in the elevator need to be analyzed. To begin from the basic operations, the&lt;br /&gt;
 elevator should be bidirectional and it should stop at each floor (unless we have two elevators in the requirement for even and &lt;br /&gt;
 odd floors separately).The elevator should stop at the desired floor.The behavior of the elevator when the eight inside exceeds &lt;br /&gt;
 the maximum allowable limit ( i.e to test the buffer conditions). There can be many other scenarios.&lt;br /&gt;
&lt;br /&gt;
Generally Functional testing is '''Black Box''' testing. In this method the SUT (System under Test) is considered as a Black box. In this phase of testing the internals of the SUT like the design or algorithm are not considered by the tester. Inputs are provided to the black box and the outputs are validated to the expected results specified in the design document.&lt;br /&gt;
&lt;br /&gt;
2 approaches can be taken for writing the functional tests&lt;br /&gt;
* '''Requirement based approach''': In this approach the specification for the system or software design is used as the base to write functional test.  &lt;br /&gt;
* '''Business process based approach''':  Business process refer to the day-to-day use of the system. This knowledge is used to do functional testing of the system.&lt;br /&gt;
&lt;br /&gt;
Regression testing is another form of functional testing where you test the earlier features and functionality of the module. They had worked on the desired lines in the previous tests but have to be tested currently after some changes have been made in the system. The changes might not be in the particular module but it can be affected due to the inter dependencies.&lt;/div&gt;</summary>
		<author><name>Messi</name></author>
	</entry>
</feed>