<?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=Bazinga</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=Bazinga"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Bazinga"/>
	<updated>2026-06-05T05:07: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_2010/ch5_5b_RR&amp;diff=40122</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40122"/>
		<updated>2010-11-04T02:11:56Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Hungarian Notation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/CamelCase/ Camel case] is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Hungarian_notation/ Hungarian Notation] is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40121</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40121"/>
		<updated>2010-11-04T02:11:48Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Hungarian Notation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/CamelCase/ Camel case] is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Hungarian_notation / Hungarian Notation] is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40120</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40120"/>
		<updated>2010-11-04T02:11:29Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Hungarian Notation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/CamelCase/ Camel case] is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[ http://en.wikipedia.org/wiki/Hungarian_notation \ Hungarian Notation] is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40119</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40119"/>
		<updated>2010-11-04T02:11:15Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Hungarian Notation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/CamelCase/ Camel case] is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[ http://en.wikipedia.org/wiki/Hungarian_notation/ Hungarian Notation] is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40118</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40118"/>
		<updated>2010-11-04T02:11:03Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Hungarian Notation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/CamelCase/ Camel case] is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[ http://en.wikipedia.org/wiki/Hungarian_notation/Hungarian Notation] is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40116</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40116"/>
		<updated>2010-11-04T02:10:25Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* camelCasing and CamelCasing: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/CamelCase/ Camel case] is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40115</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40115"/>
		<updated>2010-11-04T02:09:37Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* camelCasing and CamelCasing: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Camel case &amp;lt;sup&amp;gt;&amp;lt;span&amp;gt;[[#2foot|[1]]]&amp;lt;/span&amp;gt;&amp;lt;/sup&amp;gt; is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40113</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40113"/>
		<updated>2010-11-04T02:07:32Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* camelCasing and CamelCasing: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Camel case &amp;lt;sup&amp;gt;&amp;lt;span&amp;gt;[[#1foot|[1]]]&amp;lt;/span&amp;gt;&amp;lt;/sup&amp;gt; is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40112</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40112"/>
		<updated>2010-11-04T02:06:38Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/ Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Camel case is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40111</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40111"/>
		<updated>2010-11-04T02:06:12Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Naming_conventions_(programming)/Naming conventions] is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Camel case is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled, Comparable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40091</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40091"/>
		<updated>2010-11-04T01:33:45Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;Naming conventions is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just &amp;lt;b&amp;gt;int a&amp;lt;/b&amp;gt;; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Camel case is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40090</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40090"/>
		<updated>2010-11-04T01:33:08Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;Naming conventions is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just int a; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Camel case is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links(Language specific Conventions)==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other useful links on naming conventions==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hungarian notation[http://en.wikipedia.org/wiki/Hungarian_notation]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CamelCase[http://en.wikipedia.org/wiki/CamelCase]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to Improve the Readability of your software code[http://www.wikihow.com/Improve-the-Readability-of-Your-Software-Code]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Program Comprehension During Software Maintenance and Evolution[http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/co/&amp;amp;toc=comp/mags/co/1995/08/r8toc.xml&amp;amp;DOI=10.1109/2.402076]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What is code readability?[http://www.perlmonks.org/?node_id=592616]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable and Function Naming Convention[http://faculty.ed.umuc.edu/~jrugg/policy/vrbl_naming_convention.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40085</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40085"/>
		<updated>2010-11-04T01:29:59Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;Naming conventions is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just int a; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Camel case is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Links: ==&lt;br /&gt;
&amp;lt;p&amp;gt;(As our topic wasn’t specific to any language related conventions, if any further help is required one can see the following link to look for specific naming styles)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
Language specific conventions:&lt;br /&gt;
&amp;lt;li&amp;gt;C++: GeoSoft's C++ Programming Style Guidelines[http://geosoft.no/development/cppstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;C#: Coding Standard: C# (Philips Medical Systems)[http://www.tiobe.com/standards/gemrcsharpcs.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;D: The D Style[http://www.digitalmars.com/d/1.0/dstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Erlang: Erlang Programming Rules and Conventions[http://www.erlang.se/doc/programming_rules.shtml]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Java: Sun official Java coding style[http://java.sun.com/docs/codeconv/]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lisp: Riastradh's Lisp Style Rules[http://mumble.net/~campbell/scheme/style.txt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mono: Programming style for Mono[http://www.mono-project.com/Coding_Guidelines]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perl: Perl Style Guide[http://perldoc.perl.org/perlstyle.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PHP::PEAR: PHP::PEAR Coding Standards[http://pear.php.net/manual/en/standards.php]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Python: Style Guide for Python Code[http://www.python.org/peps/pep-0008.html]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ruby: Ruby and Rails Naming Conventions[http://itsignals.cascadia.com.au/?p=7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ActionScript(Flex): Flex SDK coding conventions and best practices[http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40083</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40083"/>
		<updated>2010-11-04T01:24:32Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Variable Naming Conventions&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;Naming conventions is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just int a; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this tutorial, we look at some rules and guidelines to pick good variable names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Guidelines to choose good variable names==&lt;br /&gt;
&lt;br /&gt;
===Length of variables:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This is the most fundamental element of all naming conventions. Some conventions give a fixed number of characters to be used and some are heuristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary &amp;quot;throwaway&amp;quot; variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;P&amp;gt;When choosing length of the name we have to be careful that they are not so short that they cannot be identified uniquely by search and replace tools and not so long that it looks cluttered. The name should be short enough to look neat and also long enough to encode enough information about its use and be found easily.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: suppose you were to declare an array to contain id’s of all students in class, you can have a variable name&amp;lt;b&amp;gt; int IdsOfStudentsInClass[]&amp;lt;/b&amp;gt;. You need not have such a long name unless it is absolutely essential. You can instead have a name such as &amp;lt;b&amp;gt;int StudentIds[]&amp;lt;/b&amp;gt;. This provides enough information about what the variable is used for and is short enough that it does not make the code look bad.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores (&amp;quot;_&amp;quot;). (ANSI constants should be avoided, for ease of debugging.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Multiple-words in a variable:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Using multiple words in a variable might be helpful in some cases because one word might not describe its use entirely and clearly. However, if we use multiple words in a variable name, we need a way to delimit the two words.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two ways are usually used to delimit multiple words: one way is to delimit them using an underscore or dash, or some other non alphanumeric character which looks readable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Underscores are usually not used within names in object oriented languages as they are used to separate module prefixes from identifiers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          Forbidden:	Read_Master_Data()&amp;lt;br&amp;gt;&lt;br /&gt;
          Allowed:	ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
                        Accnt_ReadMasterData()&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If a variable is a constant throughout the code, one should use all upper case letters in order to name it. Underscore can even be used for good readability. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            For example, MAX_WIDTH, RADIUS_EARTH etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Another way of doing the same is by using capitalization where we capitalize the first letters of every word or capitalize the first letter of every new word apart from the first word. This is usually called camel casing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===camelCasing and CamelCasing:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Camel case is the use of capitalization to add clarity to compound names assigned in code. It evolved as a common standard because of the need to avoid commonly available delimiters, such as hyphens (-) or underscores (_), that were used as keywords in the syntax of languages. There are two common variants of camel case that are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Lower camel case (or camelCase) involves using a lower-case letter for the first word in the name with each subsequent word using an upper-case letter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        int setVariable(){&lt;br /&gt;
                     }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Upper camel case (or CamelCase) involves using an upper-case letter for the first word in the name and for all subsequent words. CamelCase is sometimes referred to as PascalCase.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          int SetVariable(){&lt;br /&gt;
                      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This convention can be used for variable names as well. camelCase or CamelCase is often times used as the foundation for language-specific naming conventions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prefixing:===&lt;br /&gt;
&amp;lt;p&amp;gt;It can be useful to use prefixes for certain types of data to remind you what they are: for instance, if you have a pointer, prefixing it with &amp;quot;p_&amp;quot; tells you that it's a pointer. If you see an assignment between a variable starting with &amp;quot;p_&amp;quot; and one that doesn't begin with &amp;quot;p_&amp;quot;, then you immediately know that something fishy is going on. It can also be useful to use a prefix for global or static variables because each of these has a different behavior than a normal local variable. In the case of global variables, it is especially useful to use a prefix in order to prevent naming collisions with local variables (which can lead to confusion). For example, g can be used as prefix for any global variable. L can he used for local scope. When we want to represent data types we can use i for Integers f for Float (double or single) and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example: if you have an integer pointer, you can declare it as int p_studentIds; suppose this was a global variable, you could have it as&lt;br /&gt;
    int gp_studentIds. The prefix gp clearly shows that this is a global pointer. This also avoids collision with the local variable     &lt;br /&gt;
    p_studentIds incase you wanted to have them both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A common convention is to prefix the private fields and methods of a class with an underscore: e.g., _private_data. This can make it easier to find out where to look in the body of a class for the declaration of a method, and it also helps keep straight what you should and should not do with a variable. For instance, a common rule is to avoid returning non-const references to fields of a class from functions that are more public than the field. For instance, if _age is a private field, then the public getAge function probably shouldn't return a non-const reference since doing so effectively grants write access to the field!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Parts of Speech:===&lt;br /&gt;
&amp;lt;p&amp;gt;Parts of speech can be used extensively while defining the variable names, be it class-name, variable-name or method-name. Following are the standard form to use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Singular noun to describe class, interface, record, variable, field, accessor method, exception.&amp;lt;/li&amp;gt;&lt;br /&gt;
     For example: JButton, JWindow.&lt;br /&gt;
&amp;lt;li&amp;gt;Plural noun to describe a variable or field holding a collection.&amp;lt;/li&amp;gt;                                                                                 &lt;br /&gt;
   For example: Items, Classes.&lt;br /&gt;
&amp;lt;li&amp;gt;Verbs to describe methods. &amp;lt;/li&amp;gt;      								          &lt;br /&gt;
   For example: dispose, getItems, delete.&lt;br /&gt;
&amp;lt;li&amp;gt;Adjectives to describe interface and boolean.&amp;lt;/li&amp;gt;&lt;br /&gt;
   For example: cloneable, IsEnabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Avoid using reserved word or a keyword related to any language as this can lead to ambiguity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Abbreviations are dangerous--vowels are useful and can speed up code reading. Resorting to abbreviations can be useful when the name itself is extremely long because names that are too long can be as hard to read as names that are too short. When possible, be consistent about using particular abbreviations, and restrict yourself to using only a small number of them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Common abbreviations include &amp;quot;itr&amp;quot; for &amp;quot;iterator&amp;quot; or &amp;quot;ptr&amp;quot; for pointer. Even names like i, j, and k are perfectly fine for loop counter variables (primarily because they are so common). Bad abbreviations include things like cmptRngFrmRng, which at the savings of only a few letters eliminates a great deal of readability. If you don't like typing long names, look into the auto-complete facilities of your text editor. You should rarely need to type out a full identifier. (In fact, you rarely want to do this: typos can be incredibly hard to spot.)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; The above were guidelines to pick good variable names. These are not rules as such but following them will help in writing good and readable programs. However, the most important thing to follow is to be consistent. When we choose a particular guideline, we should make sure we follow it all through the program. One of the disadvantages about using naming conventions is that naming conventions may defeat the purpose of encapsulation. The &amp;quot;black box&amp;quot; aspect is eliminated when the programmer needs to know what specific type is being used or returned.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hungarian Notation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Hungarian Notation is a language independent identifier naming convention used in computer programming. The notation indicates explicitly the intended use or the type of the variable or function which is named. The variable name starts with a single letter or a group of letters also called as mnemonics, which is then followed by the intended variable name desired by the programmer. Here we can even use the Camel Case convention like capitalizing first letter to distinguish the variable from type indicating variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Following examples will cement the use of Hungarian Notation&lt;br /&gt;
  1.	bCondition : Boolean&lt;br /&gt;
  2.	fCondition : boolean (flag)&lt;br /&gt;
  3.	chState : charr&lt;br /&gt;
  4.	cItems : count of items&lt;br /&gt;
  5.	dwLightYears : double word &lt;br /&gt;
  6.	nItem : integer or count &lt;br /&gt;
  7.	iSize : integer or index &lt;br /&gt;
  8.	fpCost: floating-point&lt;br /&gt;
  9.	dbPi : double &lt;br /&gt;
  10.	pMemory : pointer&lt;br /&gt;
  11.	rgMonth : array, or range&lt;br /&gt;
  12.	szLastName : zero-terminated string&lt;br /&gt;
  13.	u16Identifier : unsigned 16-bit integer&lt;br /&gt;
  14.	stClassroom : clock time structure&lt;br /&gt;
  15.	fnFunction : function name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The scope of a variable can even be described by choosing following convention. This extension is often also used   without the Hungarian type-specification,&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 1.	g_nColour :  member of a global namespace, integer&lt;br /&gt;
 2.	m_nColour : member of a structure/class, integer&lt;br /&gt;
 3.	m_colours :  member of a structure/class&lt;br /&gt;
 4.	s_colours:    static member of a class&lt;br /&gt;
 5.	_colours :     local variable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The various advantages of using Hungarian type notation are: the name denotes the type of variable, we can have many variable of same name but different datatypes like illength(integer) ,dwlength(double word) etc. However, there are some disadvantages of this notation as it can make the code look ugly. Also we can’t use editor completion support feature in writing a code.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most of software projects today are developed as open source, and more over they are developed with the participation of various teams working on different parts of the project. So the most important part of the code is readability in other words using proper naming conventions throughout the project. The advantages of using naming conventions outweigh its disadvantages. If proper conventions aren’t used, the overall cost of software development can increase multifold. Proper documentation of the convention used can save a lot of time and cost later. Even the maintainability of the code is highly achieved. One should use any of the above described naming conventions in order to develop healthy software development skills. &amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40071</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40071"/>
		<updated>2010-11-04T01:00:00Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Variable Naming Conventions&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;Naming conventions is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just int a; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advantages of using naming conventions==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having good names provides additional information (metadata) to programmers about what the variables are used for. As in the example above, a good name goes a long way in giving out specific use of variable which makes code more readable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Having a convention or standard helps in having a consistent look to the code. When the development team is large and various people are working on various parts of a project, looking at some other section of the code should not look very different from what someone has written themselves.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Conventions usually will have rules or guidelines to sort out naming of variables or other structures in code to avoid potential ambiguity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When we use naming conventions, we are forced to use meaningful and professional names rather than cute or funny names. Having good names gives good appearance to the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of code reuse after a long interval of time, having a well defined naming convention can help provide better understanding of code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Well-chosen names make it significantly easier for subsequent generations of analysts and developers to understand what the system is doing and how to fix or extend the source code for new business needs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40066</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40066"/>
		<updated>2010-11-04T00:54:20Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Variable Naming Conventions&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Almost all programming languages allow the programmer a great deal of freedom when naming variables in a program's source code.  But choosing good names is hard. This is a tutorial on how to choose good variable names! &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;p&amp;gt;Naming conventions is one topic in programming that has probably not been emphasized enough. There has always been a debate about its importance and effort taken to learn and follow them. Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier-for example, whether it's a constant, package, or class-which can be helpful in understanding the code thereby reducing development time specially when the code is large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As an example, say a variable holds the average age of students in a class. &amp;lt;b&amp;gt;Int averageAge&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;int AverageAge&amp;lt;/b&amp;gt; gives a lot of information to the programmer about what the variable does than say just int a; Also capitalizing the very first letter of every word makes it more readable than just &amp;lt;b&amp;gt;int averageage&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this chapter, we are mainly going to look at some rules and guidelines to choose good variable names.&lt;br /&gt;
 &amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40065</id>
		<title>CSC/ECE 517 Fall 2010/ch5 5b RR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch5_5b_RR&amp;diff=40065"/>
		<updated>2010-11-04T00:50:38Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;Variable Naming Conventions&amp;lt;/h1&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch1_S10_ms&amp;diff=40062</id>
		<title>CSC/ECE 517 Fall 2010/ch1 S10 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch1_S10_ms&amp;diff=40062"/>
		<updated>2010-11-04T00:47:28Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[CSC/ECE 517 Fall 2010/ch1 1a vc]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 1a br]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 1b mg]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 1c JF]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 1e az]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 1e bb]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 1f vn]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 25 ag]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 2b dg]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 2e RI]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 S6 aa]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 S6 km]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 S10 GP]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 S10 MS]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 S10 MM]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch1 S10 PH]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 2a CB]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 2a mw]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 2c ck]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 S23 GP]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 S24 NS]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 S23 SS]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 S23 NR]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 S20 TT]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 2d AS]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch2 S24 rm]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3a SN]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3b ka]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3e br]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3f lj]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3h az]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3h PW]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3i IC]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3i MM]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 3j KS]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 S30 SK]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch3 4b mt]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch4 4c rn]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch4 4e ms]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch4 4f sv]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch4 4g HW]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch4 4g km]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch4 4h am]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch5 5b mt]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch5 5b jz]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch5 5c ck]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch5 5f SN]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch5 5a KR]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2010/ch5 5b RR]]&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38842</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4a RJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38842"/>
		<updated>2010-10-20T04:25:33Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Advanced Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Use Cases&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Introduction ==&lt;br /&gt;
== Use Case Basics ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases can be defined in many ways. There are many formal definitions for it. Very simply put, a use case is a reason to use a system. For example, a student borrowing a book from a library would be a use case of the library or a bank cardholder might need to use an ATM to get cash out of their account. More formally, “a use case is a collection of possible sequences of interactions between the system under discussion and its Users (or Actors), relating to a particular goal” [http://alistair.cockburn.us/Use+case+fundamentals].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A use case is initiated by a user with a particular goal in mind, and completes successfully when that goal is satisfied. The system is treated as a &amp;quot;black box&amp;quot;, and the interactions with system, including system responses, are as perceived from outside the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases capture who (actor) does what (interaction) with the system, for what purpose (goal), without dealing with system internals. A complete set of use cases specifies all the different ways to use the system, and therefore defines all behavior required of the system, bounding the scope of the system.[http://www.bredemeyer.com/use_cases.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Terms used with Use cases===&lt;br /&gt;
Now let us define some terms used with use cases: [http://en.wikipedia.org/wiki/Use_case]&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Actor:&amp;lt;/b&amp;gt; An actor is a type of user that interacts with the system (ex student borrowing book or cardholder using ATM). Actors are also external entities (people or other systems) who interact with the system to achieve a desired goal. The goal must be of value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Goal:&amp;lt;/b&amp;gt; Without a goal a use case is useless. There is no need for a use case when there is no need for any actor to achieve a goal. A goal briefly describes what the user intends to achieve with this use case. For example, the goal of a student using the library is to obtain the book. There is no point in having a use case like “the student enters the library” as that in itself has no value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Stakeholder:&amp;lt;/b&amp;gt; A stakeholder is an individual or department that is affected by the outcome of the use case. Individuals are usually agents of the organization or department for which the use case is being created. A stakeholder might be called on to provide input, feedback, or authorization for the use case. The stakeholder section of the use case can include a brief description of which of these functions the stakeholder is assigned to fulfill.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Trigger:&amp;lt;/b&amp;gt; A trigger describes the event that causes the use case to be initiated. This event can be external or internal. If the trigger is not a simple true &amp;quot;event&amp;quot; (e.g., the customer presses a button), but instead &amp;quot;when a set of conditions are met&amp;quot;, there will need to be a triggering process that continually (or periodically) runs to test whether the &amp;quot;trigger conditions&amp;quot; are met: the &amp;quot;triggering event&amp;quot; is a signal from the trigger process that the conditions are now met. &lt;br /&gt;
In our example with the student, a trigger would be the need for the book due to an approaching exam or test which causes the student to go to the library to borrow a book.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Precondition:&amp;lt;/b&amp;gt; A precondition defines all the conditions that must be true (i.e., describes the state of the system) for the trigger to meaningfully cause the initiation of the use case. That is, if the system is not in the state described in the preconditions, the behavior of the use case is indeterminate. For example, the student should be a member of the library and have the required identity to borrow a book. If the student is not a member of the library, there is no point in the student trying to borrow a book from that library.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Scenarios:&amp;lt;/b&amp;gt; A scenario usually specifies when the use case starts and ends. It describes the interaction with actors and shows the flow of events between a user and system. For example, when a student tries to borrow a particular book from the library, it doesn’t always necessarily turn out the same way. Sometimes the book is available and sometimes it is already borrowed by someone else or the library may not have a given book. These are all examples of use case scenarios. The outcome in each case if different depending on circumstances, but they all relate to the same goal that is, they are all triggered by the same need(in this case, need for the book) and all the scenarios have the same starting point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Simple Example===&lt;br /&gt;
&amp;lt;p&amp;gt;Now that we know something about use cases, let us go ahead and describe a simple use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
Use Case 1: Request book from the library (automated system).&lt;br /&gt;
&lt;br /&gt;
1.1: Summary/Goal&lt;br /&gt;
        To borrow book a particular book from the library&lt;br /&gt;
1.2: Actors&lt;br /&gt;
        Student&lt;br /&gt;
1.3: Preconditions&lt;br /&gt;
        Student should be a member of the library and have an id.&lt;br /&gt;
1.4: Main Path&lt;br /&gt;
        System requests for student ID and checks if he/she is a member&lt;br /&gt;
        Student selects “request book”&lt;br /&gt;
        Student enters name(s) of the book(s)&lt;br /&gt;
        System checks for availability of books and displays results accordingly&lt;br /&gt;
        Student confirms the order&lt;br /&gt;
        System displays details of where the requested books are stacked&lt;br /&gt;
1.5: Alternate Path&lt;br /&gt;
        System does not recognize Id or student is not a member. System will not allow any books to be checked out.&lt;br /&gt;
        All books requested are already checked out. Displays this information to student and closes request.&lt;br /&gt;
&lt;br /&gt;
===Important Characteristics of Use Cases===&lt;br /&gt;
&amp;lt;p&amp;gt;The above description shows a very simple use case. However, there are a few essential characteristics to be noticed about the use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have identified the key components of a use case, that is, the goal, actors, preconditions, key scenarios/flow and preconditions. It is very essential that we identify these components before writing a use case.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have not gone into any sort of technical details about implementation or user interface design. Use cases only represent a very high level design. We are only trying to understand the flow and uses of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of paths (scenarios) that traverse an actor from a trigger event (start of the use case) to the goal (success scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of scenarios that traverse an actor from a trigger event toward a goal but fall short of the goal (failure scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Where can we use ‘use cases’?===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases are usually used to capture the requirements of an interaction based system. When there is a lot of interaction between actors and the system, it makes sense to capture as many interactions and scenarios possible before starting development of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases help to eliminate rework due to requirements misunderstandings between developers and stakeholders by aiming to reach a point where there are no surprises for the users. Use cases help to build an explicit shared understanding that everyone can take away with them, the users, developers, testers, technical authors, and others.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases have received some interest as a starting point for test design. By analyzing use cases for the system, we can know various interactions between the system and actors which will help in drawing out test plans.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Where can’t we use ‘use cases’?===&lt;br /&gt;
&amp;lt;p&amp;gt;[ http://en.wikipedia.org/wiki/Use_case]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use case flows are not well suited to easily capturing non-interaction based requirements of a system (such as algorithm or mathematical requirements) or non-functional requirements (such as platform, performance, timing, or safety-critical aspects). These are better specified declaratively elsewhere.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Some systems are better described in an information/data-driven approach than in a functionality-driven approach of use cases. A good example of this kind of system is data-mining systems used for Business Intelligence. If you were to describe this kind of system in a use case model, it would be quite small and uninteresting (there are not many different functions here) but the set of data that the system handles may nevertheless be large and rich in details.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common mistakes while writing Use cases: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The system boundary is undefined or inconstant.  A system boundary is a boundary that separates the internal components of a system from external entities.  If we are not able to identify the system boundaries, we will not be able to clearly define the actors, scenarios and other essential factors involved in writing a good and useful use case. For example, the system described in the library example, has a clear boundary. It is used to accept inputs as book names, checks the id and provides a location for the books. We know its role very clearly. Suppose the system was used to manage everything like security, employee details etc, we will not be able to identify the goal, actors and scenarios very clearly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases should not be used to capture all the details of a system. The granularity to which you define use cases in a diagram should be enough to keep the use case diagram uncluttered and readable, yet, be complete without missing significant aspects of the required functionality.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The use cases are written from the system’s (not the actors’) point of view. Use cases written from a system point of view will make the writer have the tendency to get into technical details. If we wrote the example test case above from the systems point of view, we would have statements like “obtain location of book from database and display location of books to user”. This is more detail than necessary. Also, this would not capture the interaction with the actor very clearly. Use cases also give a brief insight into how the UI should look but when written from the system these details might not be captured clearly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing Use Cases ==&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Cases for a system is a process taken between those designing the system and the Stakeholders.  There are many different ways to write Use Cases [SOURCE].  Because of this, there are many different formats that Use Cases can take when they are written.  There are, however, certain guidelines that should be followed in the process of writing Use Cases.  In general, these guidelines are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Never include implementation specific terminology in the Use Case [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Each Use Case should be a set of scenarios, which include different flows of events [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Iterative Process ===&lt;br /&gt;
&amp;lt;p&amp;gt;Normally, this process is done iteratively, so that the iterations can build upon each other [SOURCE].  Below is an example of three iterations of the Use Case writing process to illustrate how it can reveal things about a system and layout the functional requirements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, we will be creating Use Cases to solve the following problem statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Develop a system to allow users to schedule meetings with each other.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this system, the stakeholders will be the users of the system.  The Users will also be the only Actors in the system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 1 ====&lt;br /&gt;
&amp;lt;p&amp;gt;For the first iteration, we will write out short sentences to describe the functionality that the system will have.  Some use cases could be:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Request a Meeting&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Approve a meeting request&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Suggest a new time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;View a User's schedule&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;
&amp;lt;p&amp;gt;In this example, the fourth Use Case may not have been an obvious requirement that could be derived from the original problem statement, but in the process of creating the Use Cases, it was discovered that it would be a good requirement for the system to have.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 2 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The next iteration would involve writing out longer descriptions for each. This could be done in paragraph form, or by writing a list.  Below are the Use Cases in paragraph form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Use Case 1 – Request a meeting'''&lt;br /&gt;
 User A chooses the date and time for a meeting with User B.  User A chooses User B as the recipient of the meeting request.&lt;br /&gt;
 User A sends the meeting request to User B through the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 2 – Approve a Meeting Request'''&lt;br /&gt;
 User A receives a meeting request from User B and accepts the user request.  A notification that User A has accepted the meeting is sent to User B.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 3 – Suggest a different meeting time'''&lt;br /&gt;
 User A receives a meeting request from User B and suggests a different time and/or date for the meeting.  The response is sent to User B through &lt;br /&gt;
 the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 4 – View a User's schedule'''&lt;br /&gt;
 User A would like to schedule a meeting with User B.  User A starts the system and opens up User B's schedule.  &lt;br /&gt;
 User A can see when User B has already scheduled  meetings and User A can then use that information to send User B a meeting request.&lt;br /&gt;
 Use A can also access their own schedule to view when User A has scheduled meetings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;From writing out the Use Cases with more description, it should become clear that Use Case 2 and Use Case 3 are very similar.  In both Use Cases, User A responds to a meeting request and a response/notification is sent to User B.  This might lead the designers of the system to combine these two Use Cases into one Use Case for &amp;quot;Respond to Request.&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 3 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In the next iteration, we're going to use a Use Case template.  There are many different Use Case templates, which include different information [SOURCES].  A template can be created that is unique for the system being described, provided each Use Case uses the same template. The template we will use will include:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case &amp;lt;Number&amp;gt;: Title&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.1: &amp;lt;Summary/Goal&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.2: &amp;lt;Actors&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.3: &amp;lt;Preconditions&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.4: &amp;lt;Main Path&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.5: &amp;lt;Alternate Paths – including sub-flows [S] and error-flows [E]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Case 1 in this format yields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case 1: Request a meeting&amp;lt;br&amp;gt;&lt;br /&gt;
 1.1: Summary/Goal&lt;br /&gt;
 User A can choose the date and time for a meeting with User B [Main].  User A can choose User 	B as the recipient of the meeting &lt;br /&gt;
 request [Main], or multiple Users as the recipient [S.2].  User A sends the meeting request to User B through the system [Main]. &lt;br /&gt;
 Before User A sends the meeting request, User A can opt not to send the request and delete it [S.1]. If User B is no longer in &lt;br /&gt;
 the system, User A receives notification that the meeting request cannot be sent [E.1].&amp;lt;br&amp;gt;&lt;br /&gt;
 1.2: Actors&lt;br /&gt;
 Users&amp;lt;br&amp;gt;&lt;br /&gt;
 1.3: Preconditions&lt;br /&gt;
 - User A and User B are recorded as Users in the system&lt;br /&gt;
 - User A has logged into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.4: Main Path&lt;br /&gt;
 1) User A chooses a date for a meeting&lt;br /&gt;
 2) User A chooses a time for a meeting&lt;br /&gt;
 3) User A chooses User B as the recipient for the meeting request&lt;br /&gt;
 4) User A submits the meeting request&lt;br /&gt;
 5) User B receives the meeting request the next time User B logs into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.5: Alternative Path&lt;br /&gt;
 S.1 &lt;br /&gt;
 User A creates a meeting request, but down not submit it.  A meeting request is not sent to User B&amp;lt;br&amp;gt;&lt;br /&gt;
 S.2&lt;br /&gt;
 User A creates a meeting request for more than one User.  User A submits the meeting request and each User receives it the next&lt;br /&gt;
 time they log in&amp;lt;br&amp;gt;&lt;br /&gt;
 E.1&lt;br /&gt;
 User B is no longer a User in the system.  User A receives notification that the meeting request cannot be sent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results ====&lt;br /&gt;
&amp;lt;p&amp;gt;There are a few interesting things revealed about the system by re-writing the Use Case in this format.  The most important is likely that Users will need to &amp;quot;log-in&amp;quot; to the system.  This implies that there could be another Actor in the system, namely an Admin.  This leads to these additional Use Cases:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Log into the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Create a User in the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Admin&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;
&amp;lt;p&amp;gt;Each of these new Use Cases would then go through the iterations listed above until they are in the template form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see from the example, each iteration refines the Use Case and helps to clarify the requirements of the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagrams ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use Case Diagrams are useful for showing how each component in a system will interact with other components of the system [SOURCE].  They are not good for showing the flow of events that a system will have, like the written Use Cases are [SOURCE].  Also, unlike written Use Cases, Use Case Diagrams use UML so that there is a standard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;DEFINE UML HERE&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Components of a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;UCDs have only 4 major elements: The actors that the system you are describing interacts with, the system itself, the use cases, or services, that the system knows how to perform, and the lines that represent relationships between these elements.[SOURCE: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html#uses – DIRECT QUOTE]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Actors''' in Use Case Diagrams are represented by stick figures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Actor.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Use Cases''' are represented by ovals:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Relationships''' are represented by Solid Lines.  Sometimes, arrowheads are added to the lines to indicate the direction of the invocation, or to show which actor is the primary actor [SOURCE: http://www.agilemodeling.com/artifacts/useCaseDiagram.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lines.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two special relationships that can be shown in a Use Case Diagram are the ''Extends'' and ''Includes'' relationships.  These relationships are usually shown with a dotted line with an arrowhead and &amp;lt;&amp;lt;extend&amp;gt;&amp;gt; or &amp;lt;&amp;lt;include&amp;gt;&amp;gt; written near the line.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Extends'' relationship is used to show when Use Case X is a special case of Use Case Y [SOURCE].  In this situation, the dotted line is drawn from Use Case X to Use Case Y with the arrowhead pointing to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Includes/Uses'' relationship is used to show that every time Use Case X is done, Use Case Y must also be done [SOURCE].  In this case, the arrow points to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Use Case Diagram for the same system described in the Writing a Use Case might look something like:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UCDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see, &amp;quot;Accept Meeting&amp;quot; and &amp;quot;Suggest new time&amp;quot; are special cases of &amp;quot;Respond to request&amp;quot;.  Also, from this diagram, the system designers are saying that in order to &amp;quot;Request a Meeting&amp;quot; the user must &amp;quot;View Schedule&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Topics ==&lt;br /&gt;
&lt;br /&gt;
===Essential Use Cases Vs System Use cases=== &lt;br /&gt;
&amp;lt;p&amp;gt;[http://en.wikipedia.org/wiki/Use_case]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases may be described at the abstract level (business use case, sometimes called essential use case), or at the system level (system use case). The difference between these is the scope.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A &amp;lt;b&amp;gt;business use case&amp;lt;/b&amp;gt; is described in technology-free terminology which treats system as a black box and describes the business process that is used by its business actors (people or systems external to the process) to achieve their goals (e.g., manual payment processing, expense report approval, manage corporate real estate). The business use case will describe a process that provides value to the business actor, and it describes what the process does. Business Process Mapping is another method for this level of business description. A significant advantage of essential use cases is that they enable you to stand back and ask fundamental questions like &amp;quot;what's really going on&amp;quot; and &amp;quot;what do we really need to do&amp;quot; without letting implementation decisions get in the way.  These questions often lead to critical realizations that allow you to rethink, or reengineer if you prefer that term, aspects of the overall business process.&lt;br /&gt;
A Very good example of essential use case can be seen in this link: http://www.agilemodeling.com/artifacts/essentialUseCase.htm &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A &amp;lt;b&amp;gt;system use case&amp;lt;/b&amp;gt; describes a system that automates a business use case or process. It is normally described at the system functionality level (for example, &amp;quot;create voucher&amp;quot;) and specifies the function or the service that the system provides for the actor. The system use case details what the system will do in response to an actor's actions. For this reason it is recommended that system use case specification begin with a verb (e.g., create voucher, select payments, exclude payment, cancel voucher). An actor can be a human user or another system/subsystem interacting with the system being defined&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Pluggable Use Cases:===&lt;br /&gt;
&amp;lt;p&amp;gt;[http://alistair.cockburn.us/Pluggable+use+cases]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases describe various scenarios and sequence of operations to achieve a given goal between actors and systems. We have seen that we can write Use Cases in various styles with varying degrees of details, varying aims and for varying audience in terms of business and System use cases. Business use cases are very readable with very little technical content so that stakeholders and business managers can understand the system as a black box. This may not work with the developers. They would like to see more technical details and have use cases that describe fully what a system must do under all circumstances.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It has been seen through experience that there is some amount of common behavior that is replicated in many business use cases. By extracting these common processing details (e.g. create, read, update, delete, etc), the contents of use cases can be reduced. These common processing details can be put into what is called lower level pluggable use cases. Essentially, we are creating various levels of use cases. At the highest level, what we can call as the main use case shows the more fundamental processing steps with the names of the pluggable use cases 'plugged' in-between. This helps abstracting out lower level details and keeping the use cases more simple. What this also does is, business managers and stake holders can see the higher level use case which still remains simple and readable whereas the lower level details which are of interest to developers is not lost either. These use case levels provides the freedom of reading at various degrees of granularity.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Pluggable use cases have to be written in a generic form so that it can be used wherever needed. It should be generic enough that it can be plugged into other use cases. All the rules of a regular use cases still apply in terms of finding goals(which are essentially sub goals of the system), actors etc.&lt;br /&gt;
Pluggable use cases can be produced in a way where their content is the same for all transactions, that is, it is common to various scenarios and projects. The difference in each project or scenario is mainly the data they handle and the sequence of activities being performed. The unique data and rules of each scenario are separated and documented independently in &amp;quot;Companion Tables&amp;quot; from the process steps which enable flexibility and maximum reuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Thus pluggable use cases become building blocks for higher level use cases. They are organized and applied within each use case to reach its goals. Whenever a pluggable use case is invoked, the invocation references the companion table that provides the unique data and rules for that use case. They are most effective when they are used in conjunction with these tables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use case content is dependent on the requirements of the system under design. This is also true for pluggable use cases. While the majority of pluggable use case content can be used verbatim across any project or company, minor customizations may be needed to accommodate the individual needs of the project and company.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Some use case sequences are simple while others are complex. To manage degrees of complexity, a use case can exercise one, multiple or a series of pluggable use cases wherever desired and in any order. To maximize use case cohesion and increase reusability a pluggable use case may employ another pluggable use case. The versatility of pluggable use cases provides a solid foundation for the construction of project use cases.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The following link has excellent examples of how pluggable use cases can be written and used http://alistair.cockburn.us/Pluggable+use+cases&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools and Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different tools available to create Use Cases. For a more comprehensive list, go to [http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools Wikipedia's list of UML modeling tools]. A sampling are below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Rational Rose:'''&lt;br /&gt;
&lt;br /&gt;
One of the most popular tool for use-case driven development.&lt;br /&gt;
&lt;br /&gt;
http://www-306.ibm.com/software/awdtools/developer/rose/index.html&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Sun Java Studio Enterprise:''' &lt;br /&gt;
&lt;br /&gt;
Sun Java Studio Enterprise offers a UML tool. &lt;br /&gt;
&lt;br /&gt;
http://developers.sun.com/jsenterprise/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Visual case:''' &lt;br /&gt;
&lt;br /&gt;
UML &amp;amp; E/R Database Design Tool&lt;br /&gt;
&lt;br /&gt;
http://www.visualcase.com/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different examples of Use Cases.  Some are listed below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.objectmentor.com/resources/articles/usecases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.w3.org/2002/06/ws-example &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.agilemodeling.com/essays/useCaseReuse.htm &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.soi.wide.ad.jp/class/20040034/slides/07/9.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.cs.colorado.edu/~kena/classes/6448/s05/reference/usecases/examples.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://courses.softlab.ntua.gr/softeng/Tutorials/UML-Use-Cases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38841</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4a RJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38841"/>
		<updated>2010-10-20T04:18:30Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Use Case Basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Use Cases&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Introduction ==&lt;br /&gt;
== Use Case Basics ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases can be defined in many ways. There are many formal definitions for it. Very simply put, a use case is a reason to use a system. For example, a student borrowing a book from a library would be a use case of the library or a bank cardholder might need to use an ATM to get cash out of their account. More formally, “a use case is a collection of possible sequences of interactions between the system under discussion and its Users (or Actors), relating to a particular goal” [http://alistair.cockburn.us/Use+case+fundamentals].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A use case is initiated by a user with a particular goal in mind, and completes successfully when that goal is satisfied. The system is treated as a &amp;quot;black box&amp;quot;, and the interactions with system, including system responses, are as perceived from outside the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases capture who (actor) does what (interaction) with the system, for what purpose (goal), without dealing with system internals. A complete set of use cases specifies all the different ways to use the system, and therefore defines all behavior required of the system, bounding the scope of the system.[http://www.bredemeyer.com/use_cases.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Terms used with Use cases===&lt;br /&gt;
Now let us define some terms used with use cases: [http://en.wikipedia.org/wiki/Use_case]&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Actor:&amp;lt;/b&amp;gt; An actor is a type of user that interacts with the system (ex student borrowing book or cardholder using ATM). Actors are also external entities (people or other systems) who interact with the system to achieve a desired goal. The goal must be of value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Goal:&amp;lt;/b&amp;gt; Without a goal a use case is useless. There is no need for a use case when there is no need for any actor to achieve a goal. A goal briefly describes what the user intends to achieve with this use case. For example, the goal of a student using the library is to obtain the book. There is no point in having a use case like “the student enters the library” as that in itself has no value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Stakeholder:&amp;lt;/b&amp;gt; A stakeholder is an individual or department that is affected by the outcome of the use case. Individuals are usually agents of the organization or department for which the use case is being created. A stakeholder might be called on to provide input, feedback, or authorization for the use case. The stakeholder section of the use case can include a brief description of which of these functions the stakeholder is assigned to fulfill.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Trigger:&amp;lt;/b&amp;gt; A trigger describes the event that causes the use case to be initiated. This event can be external or internal. If the trigger is not a simple true &amp;quot;event&amp;quot; (e.g., the customer presses a button), but instead &amp;quot;when a set of conditions are met&amp;quot;, there will need to be a triggering process that continually (or periodically) runs to test whether the &amp;quot;trigger conditions&amp;quot; are met: the &amp;quot;triggering event&amp;quot; is a signal from the trigger process that the conditions are now met. &lt;br /&gt;
In our example with the student, a trigger would be the need for the book due to an approaching exam or test which causes the student to go to the library to borrow a book.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Precondition:&amp;lt;/b&amp;gt; A precondition defines all the conditions that must be true (i.e., describes the state of the system) for the trigger to meaningfully cause the initiation of the use case. That is, if the system is not in the state described in the preconditions, the behavior of the use case is indeterminate. For example, the student should be a member of the library and have the required identity to borrow a book. If the student is not a member of the library, there is no point in the student trying to borrow a book from that library.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Scenarios:&amp;lt;/b&amp;gt; A scenario usually specifies when the use case starts and ends. It describes the interaction with actors and shows the flow of events between a user and system. For example, when a student tries to borrow a particular book from the library, it doesn’t always necessarily turn out the same way. Sometimes the book is available and sometimes it is already borrowed by someone else or the library may not have a given book. These are all examples of use case scenarios. The outcome in each case if different depending on circumstances, but they all relate to the same goal that is, they are all triggered by the same need(in this case, need for the book) and all the scenarios have the same starting point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Simple Example===&lt;br /&gt;
&amp;lt;p&amp;gt;Now that we know something about use cases, let us go ahead and describe a simple use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
Use Case 1: Request book from the library (automated system).&lt;br /&gt;
&lt;br /&gt;
1.1: Summary/Goal&lt;br /&gt;
        To borrow book a particular book from the library&lt;br /&gt;
1.2: Actors&lt;br /&gt;
        Student&lt;br /&gt;
1.3: Preconditions&lt;br /&gt;
        Student should be a member of the library and have an id.&lt;br /&gt;
1.4: Main Path&lt;br /&gt;
        System requests for student ID and checks if he/she is a member&lt;br /&gt;
        Student selects “request book”&lt;br /&gt;
        Student enters name(s) of the book(s)&lt;br /&gt;
        System checks for availability of books and displays results accordingly&lt;br /&gt;
        Student confirms the order&lt;br /&gt;
        System displays details of where the requested books are stacked&lt;br /&gt;
1.5: Alternate Path&lt;br /&gt;
        System does not recognize Id or student is not a member. System will not allow any books to be checked out.&lt;br /&gt;
        All books requested are already checked out. Displays this information to student and closes request.&lt;br /&gt;
&lt;br /&gt;
===Important Characteristics of Use Cases===&lt;br /&gt;
&amp;lt;p&amp;gt;The above description shows a very simple use case. However, there are a few essential characteristics to be noticed about the use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have identified the key components of a use case, that is, the goal, actors, preconditions, key scenarios/flow and preconditions. It is very essential that we identify these components before writing a use case.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have not gone into any sort of technical details about implementation or user interface design. Use cases only represent a very high level design. We are only trying to understand the flow and uses of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of paths (scenarios) that traverse an actor from a trigger event (start of the use case) to the goal (success scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of scenarios that traverse an actor from a trigger event toward a goal but fall short of the goal (failure scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Where can we use ‘use cases’?===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases are usually used to capture the requirements of an interaction based system. When there is a lot of interaction between actors and the system, it makes sense to capture as many interactions and scenarios possible before starting development of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases help to eliminate rework due to requirements misunderstandings between developers and stakeholders by aiming to reach a point where there are no surprises for the users. Use cases help to build an explicit shared understanding that everyone can take away with them, the users, developers, testers, technical authors, and others.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases have received some interest as a starting point for test design. By analyzing use cases for the system, we can know various interactions between the system and actors which will help in drawing out test plans.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Where can’t we use ‘use cases’?===&lt;br /&gt;
&amp;lt;p&amp;gt;[ http://en.wikipedia.org/wiki/Use_case]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use case flows are not well suited to easily capturing non-interaction based requirements of a system (such as algorithm or mathematical requirements) or non-functional requirements (such as platform, performance, timing, or safety-critical aspects). These are better specified declaratively elsewhere.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Some systems are better described in an information/data-driven approach than in a functionality-driven approach of use cases. A good example of this kind of system is data-mining systems used for Business Intelligence. If you were to describe this kind of system in a use case model, it would be quite small and uninteresting (there are not many different functions here) but the set of data that the system handles may nevertheless be large and rich in details.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common mistakes while writing Use cases: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The system boundary is undefined or inconstant.  A system boundary is a boundary that separates the internal components of a system from external entities.  If we are not able to identify the system boundaries, we will not be able to clearly define the actors, scenarios and other essential factors involved in writing a good and useful use case. For example, the system described in the library example, has a clear boundary. It is used to accept inputs as book names, checks the id and provides a location for the books. We know its role very clearly. Suppose the system was used to manage everything like security, employee details etc, we will not be able to identify the goal, actors and scenarios very clearly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases should not be used to capture all the details of a system. The granularity to which you define use cases in a diagram should be enough to keep the use case diagram uncluttered and readable, yet, be complete without missing significant aspects of the required functionality.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The use cases are written from the system’s (not the actors’) point of view. Use cases written from a system point of view will make the writer have the tendency to get into technical details. If we wrote the example test case above from the systems point of view, we would have statements like “obtain location of book from database and display location of books to user”. This is more detail than necessary. Also, this would not capture the interaction with the actor very clearly. Use cases also give a brief insight into how the UI should look but when written from the system these details might not be captured clearly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing Use Cases ==&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Cases for a system is a process taken between those designing the system and the Stakeholders.  There are many different ways to write Use Cases [SOURCE].  Because of this, there are many different formats that Use Cases can take when they are written.  There are, however, certain guidelines that should be followed in the process of writing Use Cases.  In general, these guidelines are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Never include implementation specific terminology in the Use Case [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Each Use Case should be a set of scenarios, which include different flows of events [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Iterative Process ===&lt;br /&gt;
&amp;lt;p&amp;gt;Normally, this process is done iteratively, so that the iterations can build upon each other [SOURCE].  Below is an example of three iterations of the Use Case writing process to illustrate how it can reveal things about a system and layout the functional requirements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, we will be creating Use Cases to solve the following problem statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Develop a system to allow users to schedule meetings with each other.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this system, the stakeholders will be the users of the system.  The Users will also be the only Actors in the system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 1 ====&lt;br /&gt;
&amp;lt;p&amp;gt;For the first iteration, we will write out short sentences to describe the functionality that the system will have.  Some use cases could be:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Request a Meeting&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Approve a meeting request&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Suggest a new time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;View a User's schedule&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;
&amp;lt;p&amp;gt;In this example, the fourth Use Case may not have been an obvious requirement that could be derived from the original problem statement, but in the process of creating the Use Cases, it was discovered that it would be a good requirement for the system to have.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 2 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The next iteration would involve writing out longer descriptions for each. This could be done in paragraph form, or by writing a list.  Below are the Use Cases in paragraph form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Use Case 1 – Request a meeting'''&lt;br /&gt;
 User A chooses the date and time for a meeting with User B.  User A chooses User B as the recipient of the meeting request.&lt;br /&gt;
 User A sends the meeting request to User B through the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 2 – Approve a Meeting Request'''&lt;br /&gt;
 User A receives a meeting request from User B and accepts the user request.  A notification that User A has accepted the meeting is sent to User B.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 3 – Suggest a different meeting time'''&lt;br /&gt;
 User A receives a meeting request from User B and suggests a different time and/or date for the meeting.  The response is sent to User B through &lt;br /&gt;
 the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 4 – View a User's schedule'''&lt;br /&gt;
 User A would like to schedule a meeting with User B.  User A starts the system and opens up User B's schedule.  &lt;br /&gt;
 User A can see when User B has already scheduled  meetings and User A can then use that information to send User B a meeting request.&lt;br /&gt;
 Use A can also access their own schedule to view when User A has scheduled meetings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;From writing out the Use Cases with more description, it should become clear that Use Case 2 and Use Case 3 are very similar.  In both Use Cases, User A responds to a meeting request and a response/notification is sent to User B.  This might lead the designers of the system to combine these two Use Cases into one Use Case for &amp;quot;Respond to Request.&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 3 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In the next iteration, we're going to use a Use Case template.  There are many different Use Case templates, which include different information [SOURCES].  A template can be created that is unique for the system being described, provided each Use Case uses the same template. The template we will use will include:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case &amp;lt;Number&amp;gt;: Title&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.1: &amp;lt;Summary/Goal&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.2: &amp;lt;Actors&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.3: &amp;lt;Preconditions&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.4: &amp;lt;Main Path&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.5: &amp;lt;Alternate Paths – including sub-flows [S] and error-flows [E]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Case 1 in this format yields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case 1: Request a meeting&amp;lt;br&amp;gt;&lt;br /&gt;
 1.1: Summary/Goal&lt;br /&gt;
 User A can choose the date and time for a meeting with User B [Main].  User A can choose User 	B as the recipient of the meeting &lt;br /&gt;
 request [Main], or multiple Users as the recipient [S.2].  User A sends the meeting request to User B through the system [Main]. &lt;br /&gt;
 Before User A sends the meeting request, User A can opt not to send the request and delete it [S.1]. If User B is no longer in &lt;br /&gt;
 the system, User A receives notification that the meeting request cannot be sent [E.1].&amp;lt;br&amp;gt;&lt;br /&gt;
 1.2: Actors&lt;br /&gt;
 Users&amp;lt;br&amp;gt;&lt;br /&gt;
 1.3: Preconditions&lt;br /&gt;
 - User A and User B are recorded as Users in the system&lt;br /&gt;
 - User A has logged into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.4: Main Path&lt;br /&gt;
 1) User A chooses a date for a meeting&lt;br /&gt;
 2) User A chooses a time for a meeting&lt;br /&gt;
 3) User A chooses User B as the recipient for the meeting request&lt;br /&gt;
 4) User A submits the meeting request&lt;br /&gt;
 5) User B receives the meeting request the next time User B logs into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.5: Alternative Path&lt;br /&gt;
 S.1 &lt;br /&gt;
 User A creates a meeting request, but down not submit it.  A meeting request is not sent to User B&amp;lt;br&amp;gt;&lt;br /&gt;
 S.2&lt;br /&gt;
 User A creates a meeting request for more than one User.  User A submits the meeting request and each User receives it the next&lt;br /&gt;
 time they log in&amp;lt;br&amp;gt;&lt;br /&gt;
 E.1&lt;br /&gt;
 User B is no longer a User in the system.  User A receives notification that the meeting request cannot be sent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results ====&lt;br /&gt;
&amp;lt;p&amp;gt;There are a few interesting things revealed about the system by re-writing the Use Case in this format.  The most important is likely that Users will need to &amp;quot;log-in&amp;quot; to the system.  This implies that there could be another Actor in the system, namely an Admin.  This leads to these additional Use Cases:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Log into the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Create a User in the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Admin&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;
&amp;lt;p&amp;gt;Each of these new Use Cases would then go through the iterations listed above until they are in the template form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see from the example, each iteration refines the Use Case and helps to clarify the requirements of the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagrams ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use Case Diagrams are useful for showing how each component in a system will interact with other components of the system [SOURCE].  They are not good for showing the flow of events that a system will have, like the written Use Cases are [SOURCE].  Also, unlike written Use Cases, Use Case Diagrams use UML so that there is a standard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;DEFINE UML HERE&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Components of a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;UCDs have only 4 major elements: The actors that the system you are describing interacts with, the system itself, the use cases, or services, that the system knows how to perform, and the lines that represent relationships between these elements.[SOURCE: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html#uses – DIRECT QUOTE]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Actors''' in Use Case Diagrams are represented by stick figures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Actor.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Use Cases''' are represented by ovals:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Relationships''' are represented by Solid Lines.  Sometimes, arrowheads are added to the lines to indicate the direction of the invocation, or to show which actor is the primary actor [SOURCE: http://www.agilemodeling.com/artifacts/useCaseDiagram.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lines.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two special relationships that can be shown in a Use Case Diagram are the ''Extends'' and ''Includes'' relationships.  These relationships are usually shown with a dotted line with an arrowhead and &amp;lt;&amp;lt;extend&amp;gt;&amp;gt; or &amp;lt;&amp;lt;include&amp;gt;&amp;gt; written near the line.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Extends'' relationship is used to show when Use Case X is a special case of Use Case Y [SOURCE].  In this situation, the dotted line is drawn from Use Case X to Use Case Y with the arrowhead pointing to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Includes/Uses'' relationship is used to show that every time Use Case X is done, Use Case Y must also be done [SOURCE].  In this case, the arrow points to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Use Case Diagram for the same system described in the Writing a Use Case might look something like:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UCDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see, &amp;quot;Accept Meeting&amp;quot; and &amp;quot;Suggest new time&amp;quot; are special cases of &amp;quot;Respond to request&amp;quot;.  Also, from this diagram, the system designers are saying that in order to &amp;quot;Request a Meeting&amp;quot; the user must &amp;quot;View Schedule&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Topics ==&lt;br /&gt;
== Tools and Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different tools available to create Use Cases. For a more comprehensive list, go to [http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools Wikipedia's list of UML modeling tools]. A sampling are below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Rational Rose:'''&lt;br /&gt;
&lt;br /&gt;
One of the most popular tool for use-case driven development.&lt;br /&gt;
&lt;br /&gt;
http://www-306.ibm.com/software/awdtools/developer/rose/index.html&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Sun Java Studio Enterprise:''' &lt;br /&gt;
&lt;br /&gt;
Sun Java Studio Enterprise offers a UML tool. &lt;br /&gt;
&lt;br /&gt;
http://developers.sun.com/jsenterprise/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Visual case:''' &lt;br /&gt;
&lt;br /&gt;
UML &amp;amp; E/R Database Design Tool&lt;br /&gt;
&lt;br /&gt;
http://www.visualcase.com/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different examples of Use Cases.  Some are listed below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.objectmentor.com/resources/articles/usecases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.w3.org/2002/06/ws-example &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.agilemodeling.com/essays/useCaseReuse.htm &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.soi.wide.ad.jp/class/20040034/slides/07/9.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.cs.colorado.edu/~kena/classes/6448/s05/reference/usecases/examples.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://courses.softlab.ntua.gr/softeng/Tutorials/UML-Use-Cases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38840</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4a RJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38840"/>
		<updated>2010-10-20T04:17:41Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Use Case Basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Use Cases&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Introduction ==&lt;br /&gt;
== Use Case Basics ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases can be defined in many ways. There are many formal definitions for it. Very simply put, a use case is a reason to use a system. For example, a student borrowing a book from a library would be a use case of the library or a bank cardholder might need to use an ATM to get cash out of their account. More formally, “a use case is a collection of possible sequences of interactions between the system under discussion and its Users (or Actors), relating to a particular goal” [http://alistair.cockburn.us/Use+case+fundamentals].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A use case is initiated by a user with a particular goal in mind, and completes successfully when that goal is satisfied. The system is treated as a &amp;quot;black box&amp;quot;, and the interactions with system, including system responses, are as perceived from outside the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases capture who (actor) does what (interaction) with the system, for what purpose (goal), without dealing with system internals. A complete set of use cases specifies all the different ways to use the system, and therefore defines all behavior required of the system, bounding the scope of the system.[http://www.bredemeyer.com/use_cases.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Terms used with Use cases===&lt;br /&gt;
Now let us define some terms used with use cases: [http://en.wikipedia.org/wiki/Use_case]&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Actor:&amp;lt;/b&amp;gt; An actor is a type of user that interacts with the system (ex student borrowing book or cardholder using ATM). Actors are also external entities (people or other systems) who interact with the system to achieve a desired goal. The goal must be of value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Goal:&amp;lt;/b&amp;gt; Without a goal a use case is useless. There is no need for a use case when there is no need for any actor to achieve a goal. A goal briefly describes what the user intends to achieve with this use case. For example, the goal of a student using the library is to obtain the book. There is no point in having a use case like “the student enters the library” as that in itself has no value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Stakeholder:&amp;lt;/b&amp;gt; A stakeholder is an individual or department that is affected by the outcome of the use case. Individuals are usually agents of the organization or department for which the use case is being created. A stakeholder might be called on to provide input, feedback, or authorization for the use case. The stakeholder section of the use case can include a brief description of which of these functions the stakeholder is assigned to fulfill.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Trigger:&amp;lt;/b&amp;gt; A trigger describes the event that causes the use case to be initiated. This event can be external or internal. If the trigger is not a simple true &amp;quot;event&amp;quot; (e.g., the customer presses a button), but instead &amp;quot;when a set of conditions are met&amp;quot;, there will need to be a triggering process that continually (or periodically) runs to test whether the &amp;quot;trigger conditions&amp;quot; are met: the &amp;quot;triggering event&amp;quot; is a signal from the trigger process that the conditions are now met. &lt;br /&gt;
In our example with the student, a trigger would be the need for the book due to an approaching exam or test which causes the student to go to the library to borrow a book.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Precondition:&amp;lt;/b&amp;gt; A precondition defines all the conditions that must be true (i.e., describes the state of the system) for the trigger to meaningfully cause the initiation of the use case. That is, if the system is not in the state described in the preconditions, the behavior of the use case is indeterminate. For example, the student should be a member of the library and have the required identity to borrow a book. If the student is not a member of the library, there is no point in the student trying to borrow a book from that library.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Scenarios:&amp;lt;/b&amp;gt; A scenario usually specifies when the use case starts and ends. It describes the interaction with actors and shows the flow of events between a user and system. For example, when a student tries to borrow a particular book from the library, it doesn’t always necessarily turn out the same way. Sometimes the book is available and sometimes it is already borrowed by someone else or the library may not have a given book. These are all examples of use case scenarios. The outcome in each case if different depending on circumstances, but they all relate to the same goal that is, they are all triggered by the same need(in this case, need for the book) and all the scenarios have the same starting point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Now that we know something about use cases, let us go ahead and describe a simple use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
Use Case 1: Request book from the library (automated system).&lt;br /&gt;
&lt;br /&gt;
1.1: Summary/Goal&lt;br /&gt;
        To borrow book a particular book from the library&lt;br /&gt;
1.2: Actors&lt;br /&gt;
        Student&lt;br /&gt;
1.3: Preconditions&lt;br /&gt;
        Student should be a member of the library and have an id.&lt;br /&gt;
1.4: Main Path&lt;br /&gt;
        System requests for student ID and checks if he/she is a member&lt;br /&gt;
        Student selects “request book”&lt;br /&gt;
        Student enters name(s) of the book(s)&lt;br /&gt;
        System checks for availability of books and displays results accordingly&lt;br /&gt;
        Student confirms the order&lt;br /&gt;
        System displays details of where the requested books are stacked&lt;br /&gt;
1.5: Alternate Path&lt;br /&gt;
        System does not recognize Id or student is not a member. System will not allow any books to be checked out.&lt;br /&gt;
        All books requested are already checked out. Displays this information to student and closes request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The above description shows a very simple use case. However, there are a few essential characteristics to be noticed about the use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have identified the key components of a use case, that is, the goal, actors, preconditions, key scenarios/flow and preconditions. It is very essential that we identify these components before writing a use case.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have not gone into any sort of technical details about implementation or user interface design. Use cases only represent a very high level design. We are only trying to understand the flow and uses of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of paths (scenarios) that traverse an actor from a trigger event (start of the use case) to the goal (success scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of scenarios that traverse an actor from a trigger event toward a goal but fall short of the goal (failure scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Where can we use ‘use cases’?===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases are usually used to capture the requirements of an interaction based system. When there is a lot of interaction between actors and the system, it makes sense to capture as many interactions and scenarios possible before starting development of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases help to eliminate rework due to requirements misunderstandings between developers and stakeholders by aiming to reach a point where there are no surprises for the users. Use cases help to build an explicit shared understanding that everyone can take away with them, the users, developers, testers, technical authors, and others.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases have received some interest as a starting point for test design. By analyzing use cases for the system, we can know various interactions between the system and actors which will help in drawing out test plans.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Where can’t we use ‘use cases’?===&lt;br /&gt;
&amp;lt;p&amp;gt;[ http://en.wikipedia.org/wiki/Use_case]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use case flows are not well suited to easily capturing non-interaction based requirements of a system (such as algorithm or mathematical requirements) or non-functional requirements (such as platform, performance, timing, or safety-critical aspects). These are better specified declaratively elsewhere.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Some systems are better described in an information/data-driven approach than in a functionality-driven approach of use cases. A good example of this kind of system is data-mining systems used for Business Intelligence. If you were to describe this kind of system in a use case model, it would be quite small and uninteresting (there are not many different functions here) but the set of data that the system handles may nevertheless be large and rich in details.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common mistakes while writing Use cases: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The system boundary is undefined or inconstant.  A system boundary is a boundary that separates the internal components of a system from external entities.  If we are not able to identify the system boundaries, we will not be able to clearly define the actors, scenarios and other essential factors involved in writing a good and useful use case. For example, the system described in the library example, has a clear boundary. It is used to accept inputs as book names, checks the id and provides a location for the books. We know its role very clearly. Suppose the system was used to manage everything like security, employee details etc, we will not be able to identify the goal, actors and scenarios very clearly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases should not be used to capture all the details of a system. The granularity to which you define use cases in a diagram should be enough to keep the use case diagram uncluttered and readable, yet, be complete without missing significant aspects of the required functionality.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The use cases are written from the system’s (not the actors’) point of view. Use cases written from a system point of view will make the writer have the tendency to get into technical details. If we wrote the example test case above from the systems point of view, we would have statements like “obtain location of book from database and display location of books to user”. This is more detail than necessary. Also, this would not capture the interaction with the actor very clearly. Use cases also give a brief insight into how the UI should look but when written from the system these details might not be captured clearly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing Use Cases ==&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Cases for a system is a process taken between those designing the system and the Stakeholders.  There are many different ways to write Use Cases [SOURCE].  Because of this, there are many different formats that Use Cases can take when they are written.  There are, however, certain guidelines that should be followed in the process of writing Use Cases.  In general, these guidelines are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Never include implementation specific terminology in the Use Case [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Each Use Case should be a set of scenarios, which include different flows of events [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Iterative Process ===&lt;br /&gt;
&amp;lt;p&amp;gt;Normally, this process is done iteratively, so that the iterations can build upon each other [SOURCE].  Below is an example of three iterations of the Use Case writing process to illustrate how it can reveal things about a system and layout the functional requirements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, we will be creating Use Cases to solve the following problem statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Develop a system to allow users to schedule meetings with each other.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this system, the stakeholders will be the users of the system.  The Users will also be the only Actors in the system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 1 ====&lt;br /&gt;
&amp;lt;p&amp;gt;For the first iteration, we will write out short sentences to describe the functionality that the system will have.  Some use cases could be:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Request a Meeting&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Approve a meeting request&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Suggest a new time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;View a User's schedule&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;
&amp;lt;p&amp;gt;In this example, the fourth Use Case may not have been an obvious requirement that could be derived from the original problem statement, but in the process of creating the Use Cases, it was discovered that it would be a good requirement for the system to have.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 2 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The next iteration would involve writing out longer descriptions for each. This could be done in paragraph form, or by writing a list.  Below are the Use Cases in paragraph form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Use Case 1 – Request a meeting'''&lt;br /&gt;
 User A chooses the date and time for a meeting with User B.  User A chooses User B as the recipient of the meeting request.&lt;br /&gt;
 User A sends the meeting request to User B through the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 2 – Approve a Meeting Request'''&lt;br /&gt;
 User A receives a meeting request from User B and accepts the user request.  A notification that User A has accepted the meeting is sent to User B.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 3 – Suggest a different meeting time'''&lt;br /&gt;
 User A receives a meeting request from User B and suggests a different time and/or date for the meeting.  The response is sent to User B through &lt;br /&gt;
 the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 4 – View a User's schedule'''&lt;br /&gt;
 User A would like to schedule a meeting with User B.  User A starts the system and opens up User B's schedule.  &lt;br /&gt;
 User A can see when User B has already scheduled  meetings and User A can then use that information to send User B a meeting request.&lt;br /&gt;
 Use A can also access their own schedule to view when User A has scheduled meetings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;From writing out the Use Cases with more description, it should become clear that Use Case 2 and Use Case 3 are very similar.  In both Use Cases, User A responds to a meeting request and a response/notification is sent to User B.  This might lead the designers of the system to combine these two Use Cases into one Use Case for &amp;quot;Respond to Request.&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 3 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In the next iteration, we're going to use a Use Case template.  There are many different Use Case templates, which include different information [SOURCES].  A template can be created that is unique for the system being described, provided each Use Case uses the same template. The template we will use will include:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case &amp;lt;Number&amp;gt;: Title&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.1: &amp;lt;Summary/Goal&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.2: &amp;lt;Actors&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.3: &amp;lt;Preconditions&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.4: &amp;lt;Main Path&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.5: &amp;lt;Alternate Paths – including sub-flows [S] and error-flows [E]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Case 1 in this format yields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case 1: Request a meeting&amp;lt;br&amp;gt;&lt;br /&gt;
 1.1: Summary/Goal&lt;br /&gt;
 User A can choose the date and time for a meeting with User B [Main].  User A can choose User 	B as the recipient of the meeting &lt;br /&gt;
 request [Main], or multiple Users as the recipient [S.2].  User A sends the meeting request to User B through the system [Main]. &lt;br /&gt;
 Before User A sends the meeting request, User A can opt not to send the request and delete it [S.1]. If User B is no longer in &lt;br /&gt;
 the system, User A receives notification that the meeting request cannot be sent [E.1].&amp;lt;br&amp;gt;&lt;br /&gt;
 1.2: Actors&lt;br /&gt;
 Users&amp;lt;br&amp;gt;&lt;br /&gt;
 1.3: Preconditions&lt;br /&gt;
 - User A and User B are recorded as Users in the system&lt;br /&gt;
 - User A has logged into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.4: Main Path&lt;br /&gt;
 1) User A chooses a date for a meeting&lt;br /&gt;
 2) User A chooses a time for a meeting&lt;br /&gt;
 3) User A chooses User B as the recipient for the meeting request&lt;br /&gt;
 4) User A submits the meeting request&lt;br /&gt;
 5) User B receives the meeting request the next time User B logs into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.5: Alternative Path&lt;br /&gt;
 S.1 &lt;br /&gt;
 User A creates a meeting request, but down not submit it.  A meeting request is not sent to User B&amp;lt;br&amp;gt;&lt;br /&gt;
 S.2&lt;br /&gt;
 User A creates a meeting request for more than one User.  User A submits the meeting request and each User receives it the next&lt;br /&gt;
 time they log in&amp;lt;br&amp;gt;&lt;br /&gt;
 E.1&lt;br /&gt;
 User B is no longer a User in the system.  User A receives notification that the meeting request cannot be sent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results ====&lt;br /&gt;
&amp;lt;p&amp;gt;There are a few interesting things revealed about the system by re-writing the Use Case in this format.  The most important is likely that Users will need to &amp;quot;log-in&amp;quot; to the system.  This implies that there could be another Actor in the system, namely an Admin.  This leads to these additional Use Cases:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Log into the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Create a User in the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Admin&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;
&amp;lt;p&amp;gt;Each of these new Use Cases would then go through the iterations listed above until they are in the template form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see from the example, each iteration refines the Use Case and helps to clarify the requirements of the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagrams ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use Case Diagrams are useful for showing how each component in a system will interact with other components of the system [SOURCE].  They are not good for showing the flow of events that a system will have, like the written Use Cases are [SOURCE].  Also, unlike written Use Cases, Use Case Diagrams use UML so that there is a standard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;DEFINE UML HERE&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Components of a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;UCDs have only 4 major elements: The actors that the system you are describing interacts with, the system itself, the use cases, or services, that the system knows how to perform, and the lines that represent relationships between these elements.[SOURCE: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html#uses – DIRECT QUOTE]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Actors''' in Use Case Diagrams are represented by stick figures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Actor.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Use Cases''' are represented by ovals:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Relationships''' are represented by Solid Lines.  Sometimes, arrowheads are added to the lines to indicate the direction of the invocation, or to show which actor is the primary actor [SOURCE: http://www.agilemodeling.com/artifacts/useCaseDiagram.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lines.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two special relationships that can be shown in a Use Case Diagram are the ''Extends'' and ''Includes'' relationships.  These relationships are usually shown with a dotted line with an arrowhead and &amp;lt;&amp;lt;extend&amp;gt;&amp;gt; or &amp;lt;&amp;lt;include&amp;gt;&amp;gt; written near the line.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Extends'' relationship is used to show when Use Case X is a special case of Use Case Y [SOURCE].  In this situation, the dotted line is drawn from Use Case X to Use Case Y with the arrowhead pointing to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Includes/Uses'' relationship is used to show that every time Use Case X is done, Use Case Y must also be done [SOURCE].  In this case, the arrow points to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Use Case Diagram for the same system described in the Writing a Use Case might look something like:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UCDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see, &amp;quot;Accept Meeting&amp;quot; and &amp;quot;Suggest new time&amp;quot; are special cases of &amp;quot;Respond to request&amp;quot;.  Also, from this diagram, the system designers are saying that in order to &amp;quot;Request a Meeting&amp;quot; the user must &amp;quot;View Schedule&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Topics ==&lt;br /&gt;
== Tools and Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different tools available to create Use Cases. For a more comprehensive list, go to [http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools Wikipedia's list of UML modeling tools]. A sampling are below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Rational Rose:'''&lt;br /&gt;
&lt;br /&gt;
One of the most popular tool for use-case driven development.&lt;br /&gt;
&lt;br /&gt;
http://www-306.ibm.com/software/awdtools/developer/rose/index.html&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Sun Java Studio Enterprise:''' &lt;br /&gt;
&lt;br /&gt;
Sun Java Studio Enterprise offers a UML tool. &lt;br /&gt;
&lt;br /&gt;
http://developers.sun.com/jsenterprise/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Visual case:''' &lt;br /&gt;
&lt;br /&gt;
UML &amp;amp; E/R Database Design Tool&lt;br /&gt;
&lt;br /&gt;
http://www.visualcase.com/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different examples of Use Cases.  Some are listed below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.objectmentor.com/resources/articles/usecases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.w3.org/2002/06/ws-example &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.agilemodeling.com/essays/useCaseReuse.htm &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.soi.wide.ad.jp/class/20040034/slides/07/9.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.cs.colorado.edu/~kena/classes/6448/s05/reference/usecases/examples.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://courses.softlab.ntua.gr/softeng/Tutorials/UML-Use-Cases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38839</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4a RJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38839"/>
		<updated>2010-10-20T04:16:30Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Use Case Basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Use Cases&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Introduction ==&lt;br /&gt;
== Use Case Basics ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases can be defined in many ways. There are many formal definitions for it. Very simply put, a use case is a reason to use a system. For example, a student borrowing a book from a library would be a use case of the library or a bank cardholder might need to use an ATM to get cash out of their account. More formally, “a use case is a collection of possible sequences of interactions between the system under discussion and its Users (or Actors), relating to a particular goal” [http://alistair.cockburn.us/Use+case+fundamentals].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A use case is initiated by a user with a particular goal in mind, and completes successfully when that goal is satisfied. The system is treated as a &amp;quot;black box&amp;quot;, and the interactions with system, including system responses, are as perceived from outside the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases capture who (actor) does what (interaction) with the system, for what purpose (goal), without dealing with system internals. A complete set of use cases specifies all the different ways to use the system, and therefore defines all behavior required of the system, bounding the scope of the system.[http://www.bredemeyer.com/use_cases.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now let us define some terms used with use cases: [http://en.wikipedia.org/wiki/Use_case]&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Actor:&amp;lt;/b&amp;gt; An actor is a type of user that interacts with the system (ex student borrowing book or cardholder using ATM). Actors are also external entities (people or other systems) who interact with the system to achieve a desired goal. The goal must be of value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Goal:&amp;lt;/b&amp;gt; Without a goal a use case is useless. There is no need for a use case when there is no need for any actor to achieve a goal. A goal briefly describes what the user intends to achieve with this use case. For example, the goal of a student using the library is to obtain the book. There is no point in having a use case like “the student enters the library” as that in itself has no value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Stakeholder:&amp;lt;/b&amp;gt; A stakeholder is an individual or department that is affected by the outcome of the use case. Individuals are usually agents of the organization or department for which the use case is being created. A stakeholder might be called on to provide input, feedback, or authorization for the use case. The stakeholder section of the use case can include a brief description of which of these functions the stakeholder is assigned to fulfill.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Trigger:&amp;lt;/b&amp;gt; A trigger describes the event that causes the use case to be initiated. This event can be external or internal. If the trigger is not a simple true &amp;quot;event&amp;quot; (e.g., the customer presses a button), but instead &amp;quot;when a set of conditions are met&amp;quot;, there will need to be a triggering process that continually (or periodically) runs to test whether the &amp;quot;trigger conditions&amp;quot; are met: the &amp;quot;triggering event&amp;quot; is a signal from the trigger process that the conditions are now met. &lt;br /&gt;
In our example with the student, a trigger would be the need for the book due to an approaching exam or test which causes the student to go to the library to borrow a book.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Precondition:&amp;lt;/b&amp;gt; A precondition defines all the conditions that must be true (i.e., describes the state of the system) for the trigger to meaningfully cause the initiation of the use case. That is, if the system is not in the state described in the preconditions, the behavior of the use case is indeterminate. For example, the student should be a member of the library and have the required identity to borrow a book. If the student is not a member of the library, there is no point in the student trying to borrow a book from that library.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Scenarios:&amp;lt;/b&amp;gt; A scenario usually specifies when the use case starts and ends. It describes the interaction with actors and shows the flow of events between a user and system. For example, when a student tries to borrow a particular book from the library, it doesn’t always necessarily turn out the same way. Sometimes the book is available and sometimes it is already borrowed by someone else or the library may not have a given book. These are all examples of use case scenarios. The outcome in each case if different depending on circumstances, but they all relate to the same goal that is, they are all triggered by the same need(in this case, need for the book) and all the scenarios have the same starting point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Now that we know something about use cases, let us go ahead and describe a simple use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
Use Case 1: Request book from the library (automated system).&lt;br /&gt;
&lt;br /&gt;
1.1: Summary/Goal&lt;br /&gt;
        To borrow book a particular book from the library&lt;br /&gt;
1.2: Actors&lt;br /&gt;
        Student&lt;br /&gt;
1.3: Preconditions&lt;br /&gt;
        Student should be a member of the library and have an id.&lt;br /&gt;
1.4: Main Path&lt;br /&gt;
        System requests for student ID and checks if he/she is a member&lt;br /&gt;
        Student selects “request book”&lt;br /&gt;
        Student enters name(s) of the book(s)&lt;br /&gt;
        System checks for availability of books and displays results accordingly&lt;br /&gt;
        Student confirms the order&lt;br /&gt;
        System displays details of where the requested books are stacked&lt;br /&gt;
1.5: Alternate Path&lt;br /&gt;
        System does not recognize Id or student is not a member. System will not allow any books to be checked out.&lt;br /&gt;
        All books requested are already checked out. Displays this information to student and closes request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The above description shows a very simple use case. However, there are a few essential characteristics to be noticed about the use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have identified the key components of a use case, that is, the goal, actors, preconditions, key scenarios/flow and preconditions. It is very essential that we identify these components before writing a use case.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have not gone into any sort of technical details about implementation or user interface design. Use cases only represent a very high level design. We are only trying to understand the flow and uses of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of paths (scenarios) that traverse an actor from a trigger event (start of the use case) to the goal (success scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of scenarios that traverse an actor from a trigger event toward a goal but fall short of the goal (failure scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Where can we use ‘use cases’?===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases are usually used to capture the requirements of an interaction based system. When there is a lot of interaction between actors and the system, it makes sense to capture as many interactions and scenarios possible before starting development of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases help to eliminate rework due to requirements misunderstandings between developers and stakeholders by aiming to reach a point where there are no surprises for the users. Use cases help to build an explicit shared understanding that everyone can take away with them, the users, developers, testers, technical authors, and others.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases have received some interest as a starting point for test design. By analyzing use cases for the system, we can know various interactions between the system and actors which will help in drawing out test plans.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Where can’t we use ‘use cases’?===&lt;br /&gt;
&amp;lt;p&amp;gt;[ http://en.wikipedia.org/wiki/Use_case]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use case flows are not well suited to easily capturing non-interaction based requirements of a system (such as algorithm or mathematical requirements) or non-functional requirements (such as platform, performance, timing, or safety-critical aspects). These are better specified declaratively elsewhere.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Some systems are better described in an information/data-driven approach than in a functionality-driven approach of use cases. A good example of this kind of system is data-mining systems used for Business Intelligence. If you were to describe this kind of system in a use case model, it would be quite small and uninteresting (there are not many different functions here) but the set of data that the system handles may nevertheless be large and rich in details.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common mistakes while writing Use cases: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The system boundary is undefined or inconstant.  A system boundary is a boundary that separates the internal components of a system from external entities.  If we are not able to identify the system boundaries, we will not be able to clearly define the actors, scenarios and other essential factors involved in writing a good and useful use case. For example, the system described in the library example, has a clear boundary. It is used to accept inputs as book names, checks the id and provides a location for the books. We know its role very clearly. Suppose the system was used to manage everything like security, employee details etc, we will not be able to identify the goal, actors and scenarios very clearly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases should not be used to capture all the details of a system. The granularity to which you define use cases in a diagram should be enough to keep the use case diagram uncluttered and readable, yet, be complete without missing significant aspects of the required functionality.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The use cases are written from the system’s (not the actors’) point of view. Use cases written from a system point of view will make the writer have the tendency to get into technical details. If we wrote the example test case above from the systems point of view, we would have statements like “obtain location of book from database and display location of books to user”. This is more detail than necessary. Also, this would not capture the interaction with the actor very clearly. Use cases also give a brief insight into how the UI should look but when written from the system these details might not be captured clearly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing Use Cases ==&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Cases for a system is a process taken between those designing the system and the Stakeholders.  There are many different ways to write Use Cases [SOURCE].  Because of this, there are many different formats that Use Cases can take when they are written.  There are, however, certain guidelines that should be followed in the process of writing Use Cases.  In general, these guidelines are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Never include implementation specific terminology in the Use Case [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Each Use Case should be a set of scenarios, which include different flows of events [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Iterative Process ===&lt;br /&gt;
&amp;lt;p&amp;gt;Normally, this process is done iteratively, so that the iterations can build upon each other [SOURCE].  Below is an example of three iterations of the Use Case writing process to illustrate how it can reveal things about a system and layout the functional requirements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, we will be creating Use Cases to solve the following problem statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Develop a system to allow users to schedule meetings with each other.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this system, the stakeholders will be the users of the system.  The Users will also be the only Actors in the system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 1 ====&lt;br /&gt;
&amp;lt;p&amp;gt;For the first iteration, we will write out short sentences to describe the functionality that the system will have.  Some use cases could be:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Request a Meeting&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Approve a meeting request&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Suggest a new time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;View a User's schedule&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;
&amp;lt;p&amp;gt;In this example, the fourth Use Case may not have been an obvious requirement that could be derived from the original problem statement, but in the process of creating the Use Cases, it was discovered that it would be a good requirement for the system to have.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 2 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The next iteration would involve writing out longer descriptions for each. This could be done in paragraph form, or by writing a list.  Below are the Use Cases in paragraph form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Use Case 1 – Request a meeting'''&lt;br /&gt;
 User A chooses the date and time for a meeting with User B.  User A chooses User B as the recipient of the meeting request.&lt;br /&gt;
 User A sends the meeting request to User B through the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 2 – Approve a Meeting Request'''&lt;br /&gt;
 User A receives a meeting request from User B and accepts the user request.  A notification that User A has accepted the meeting is sent to User B.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 3 – Suggest a different meeting time'''&lt;br /&gt;
 User A receives a meeting request from User B and suggests a different time and/or date for the meeting.  The response is sent to User B through &lt;br /&gt;
 the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 4 – View a User's schedule'''&lt;br /&gt;
 User A would like to schedule a meeting with User B.  User A starts the system and opens up User B's schedule.  &lt;br /&gt;
 User A can see when User B has already scheduled  meetings and User A can then use that information to send User B a meeting request.&lt;br /&gt;
 Use A can also access their own schedule to view when User A has scheduled meetings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;From writing out the Use Cases with more description, it should become clear that Use Case 2 and Use Case 3 are very similar.  In both Use Cases, User A responds to a meeting request and a response/notification is sent to User B.  This might lead the designers of the system to combine these two Use Cases into one Use Case for &amp;quot;Respond to Request.&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 3 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In the next iteration, we're going to use a Use Case template.  There are many different Use Case templates, which include different information [SOURCES].  A template can be created that is unique for the system being described, provided each Use Case uses the same template. The template we will use will include:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case &amp;lt;Number&amp;gt;: Title&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.1: &amp;lt;Summary/Goal&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.2: &amp;lt;Actors&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.3: &amp;lt;Preconditions&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.4: &amp;lt;Main Path&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.5: &amp;lt;Alternate Paths – including sub-flows [S] and error-flows [E]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Case 1 in this format yields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case 1: Request a meeting&amp;lt;br&amp;gt;&lt;br /&gt;
 1.1: Summary/Goal&lt;br /&gt;
 User A can choose the date and time for a meeting with User B [Main].  User A can choose User 	B as the recipient of the meeting &lt;br /&gt;
 request [Main], or multiple Users as the recipient [S.2].  User A sends the meeting request to User B through the system [Main]. &lt;br /&gt;
 Before User A sends the meeting request, User A can opt not to send the request and delete it [S.1]. If User B is no longer in &lt;br /&gt;
 the system, User A receives notification that the meeting request cannot be sent [E.1].&amp;lt;br&amp;gt;&lt;br /&gt;
 1.2: Actors&lt;br /&gt;
 Users&amp;lt;br&amp;gt;&lt;br /&gt;
 1.3: Preconditions&lt;br /&gt;
 - User A and User B are recorded as Users in the system&lt;br /&gt;
 - User A has logged into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.4: Main Path&lt;br /&gt;
 1) User A chooses a date for a meeting&lt;br /&gt;
 2) User A chooses a time for a meeting&lt;br /&gt;
 3) User A chooses User B as the recipient for the meeting request&lt;br /&gt;
 4) User A submits the meeting request&lt;br /&gt;
 5) User B receives the meeting request the next time User B logs into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.5: Alternative Path&lt;br /&gt;
 S.1 &lt;br /&gt;
 User A creates a meeting request, but down not submit it.  A meeting request is not sent to User B&amp;lt;br&amp;gt;&lt;br /&gt;
 S.2&lt;br /&gt;
 User A creates a meeting request for more than one User.  User A submits the meeting request and each User receives it the next&lt;br /&gt;
 time they log in&amp;lt;br&amp;gt;&lt;br /&gt;
 E.1&lt;br /&gt;
 User B is no longer a User in the system.  User A receives notification that the meeting request cannot be sent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results ====&lt;br /&gt;
&amp;lt;p&amp;gt;There are a few interesting things revealed about the system by re-writing the Use Case in this format.  The most important is likely that Users will need to &amp;quot;log-in&amp;quot; to the system.  This implies that there could be another Actor in the system, namely an Admin.  This leads to these additional Use Cases:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Log into the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Create a User in the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Admin&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;
&amp;lt;p&amp;gt;Each of these new Use Cases would then go through the iterations listed above until they are in the template form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see from the example, each iteration refines the Use Case and helps to clarify the requirements of the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagrams ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use Case Diagrams are useful for showing how each component in a system will interact with other components of the system [SOURCE].  They are not good for showing the flow of events that a system will have, like the written Use Cases are [SOURCE].  Also, unlike written Use Cases, Use Case Diagrams use UML so that there is a standard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;DEFINE UML HERE&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Components of a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;UCDs have only 4 major elements: The actors that the system you are describing interacts with, the system itself, the use cases, or services, that the system knows how to perform, and the lines that represent relationships between these elements.[SOURCE: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html#uses – DIRECT QUOTE]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Actors''' in Use Case Diagrams are represented by stick figures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Actor.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Use Cases''' are represented by ovals:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Relationships''' are represented by Solid Lines.  Sometimes, arrowheads are added to the lines to indicate the direction of the invocation, or to show which actor is the primary actor [SOURCE: http://www.agilemodeling.com/artifacts/useCaseDiagram.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lines.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two special relationships that can be shown in a Use Case Diagram are the ''Extends'' and ''Includes'' relationships.  These relationships are usually shown with a dotted line with an arrowhead and &amp;lt;&amp;lt;extend&amp;gt;&amp;gt; or &amp;lt;&amp;lt;include&amp;gt;&amp;gt; written near the line.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Extends'' relationship is used to show when Use Case X is a special case of Use Case Y [SOURCE].  In this situation, the dotted line is drawn from Use Case X to Use Case Y with the arrowhead pointing to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Includes/Uses'' relationship is used to show that every time Use Case X is done, Use Case Y must also be done [SOURCE].  In this case, the arrow points to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Use Case Diagram for the same system described in the Writing a Use Case might look something like:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UCDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see, &amp;quot;Accept Meeting&amp;quot; and &amp;quot;Suggest new time&amp;quot; are special cases of &amp;quot;Respond to request&amp;quot;.  Also, from this diagram, the system designers are saying that in order to &amp;quot;Request a Meeting&amp;quot; the user must &amp;quot;View Schedule&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Topics ==&lt;br /&gt;
== Tools and Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different tools available to create Use Cases. For a more comprehensive list, go to [http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools Wikipedia's list of UML modeling tools]. A sampling are below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Rational Rose:'''&lt;br /&gt;
&lt;br /&gt;
One of the most popular tool for use-case driven development.&lt;br /&gt;
&lt;br /&gt;
http://www-306.ibm.com/software/awdtools/developer/rose/index.html&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Sun Java Studio Enterprise:''' &lt;br /&gt;
&lt;br /&gt;
Sun Java Studio Enterprise offers a UML tool. &lt;br /&gt;
&lt;br /&gt;
http://developers.sun.com/jsenterprise/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Visual case:''' &lt;br /&gt;
&lt;br /&gt;
UML &amp;amp; E/R Database Design Tool&lt;br /&gt;
&lt;br /&gt;
http://www.visualcase.com/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different examples of Use Cases.  Some are listed below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.objectmentor.com/resources/articles/usecases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.w3.org/2002/06/ws-example &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.agilemodeling.com/essays/useCaseReuse.htm &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.soi.wide.ad.jp/class/20040034/slides/07/9.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.cs.colorado.edu/~kena/classes/6448/s05/reference/usecases/examples.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://courses.softlab.ntua.gr/softeng/Tutorials/UML-Use-Cases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38838</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4a RJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38838"/>
		<updated>2010-10-20T04:14:40Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Use Case Basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Use Cases&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Introduction ==&lt;br /&gt;
== Use Case Basics ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases can be defined in many ways. There are many formal definitions for it. Very simply put, a use case is a reason to use a system. For example, a student borrowing a book from a library would be a use case of the library or a bank cardholder might need to use an ATM to get cash out of their account. More formally, “a use case is a collection of possible sequences of interactions between the system under discussion and its Users (or Actors), relating to a particular goal” [http://alistair.cockburn.us/Use+case+fundamentals].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A use case is initiated by a user with a particular goal in mind, and completes successfully when that goal is satisfied. The system is treated as a &amp;quot;black box&amp;quot;, and the interactions with system, including system responses, are as perceived from outside the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases capture who (actor) does what (interaction) with the system, for what purpose (goal), without dealing with system internals. A complete set of use cases specifies all the different ways to use the system, and therefore defines all behavior required of the system, bounding the scope of the system.[http://www.bredemeyer.com/use_cases.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now let us define some terms used with use cases: [http://en.wikipedia.org/wiki/Use_case]&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Actor:&amp;lt;/b&amp;gt; An actor is a type of user that interacts with the system (ex student borrowing book or cardholder using ATM). Actors are also external entities (people or other systems) who interact with the system to achieve a desired goal. The goal must be of value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Goal:&amp;lt;/b&amp;gt; Without a goal a use case is useless. There is no need for a use case when there is no need for any actor to achieve a goal. A goal briefly describes what the user intends to achieve with this use case. For example, the goal of a student using the library is to obtain the book. There is no point in having a use case like “the student enters the library” as that in itself has no value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Stakeholder:&amp;lt;/b&amp;gt; A stakeholder is an individual or department that is affected by the outcome of the use case. Individuals are usually agents of the organization or department for which the use case is being created. A stakeholder might be called on to provide input, feedback, or authorization for the use case. The stakeholder section of the use case can include a brief description of which of these functions the stakeholder is assigned to fulfill.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Trigger:&amp;lt;/b&amp;gt; A trigger describes the event that causes the use case to be initiated. This event can be external or internal. If the trigger is not a simple true &amp;quot;event&amp;quot; (e.g., the customer presses a button), but instead &amp;quot;when a set of conditions are met&amp;quot;, there will need to be a triggering process that continually (or periodically) runs to test whether the &amp;quot;trigger conditions&amp;quot; are met: the &amp;quot;triggering event&amp;quot; is a signal from the trigger process that the conditions are now met. &lt;br /&gt;
In our example with the student, a trigger would be the need for the book due to an approaching exam or test which causes the student to go to the library to borrow a book.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Precondition:&amp;lt;/b&amp;gt; A precondition defines all the conditions that must be true (i.e., describes the state of the system) for the trigger to meaningfully cause the initiation of the use case. That is, if the system is not in the state described in the preconditions, the behavior of the use case is indeterminate. For example, the student should be a member of the library and have the required identity to borrow a book. If the student is not a member of the library, there is no point in the student trying to borrow a book from that library.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Scenarios:&amp;lt;/b&amp;gt; A scenario usually specifies when the use case starts and ends. It describes the interaction with actors and shows the flow of events between a user and system. For example, when a student tries to borrow a particular book from the library, it doesn’t always necessarily turn out the same way. Sometimes the book is available and sometimes it is already borrowed by someone else or the library may not have a given book. These are all examples of use case scenarios. The outcome in each case if different depending on circumstances, but they all relate to the same goal that is, they are all triggered by the same need(in this case, need for the book) and all the scenarios have the same starting point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Now that we know something about use cases, let us go ahead and describe a simple use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
Use Case 1: Request book from the library (automated system).&lt;br /&gt;
&lt;br /&gt;
1.1: Summary/Goal&lt;br /&gt;
        To borrow book a particular book from the library&lt;br /&gt;
1.2: Actors&lt;br /&gt;
        Student&lt;br /&gt;
1.3: Preconditions&lt;br /&gt;
        Student should be a member of the library and have an id.&lt;br /&gt;
1.4: Main Path&lt;br /&gt;
        System requests for student ID and checks if he/she is a member&lt;br /&gt;
        Student selects “request book”&lt;br /&gt;
        Student enters name(s) of the book(s)&lt;br /&gt;
        System checks for availability of books and displays results accordingly&lt;br /&gt;
        Student confirms the order&lt;br /&gt;
        System displays details of where the requested books are stacked&lt;br /&gt;
1.5: Alternate Path&lt;br /&gt;
        System does not recognize Id or student is not a member. System will not allow any books to be checked out.&lt;br /&gt;
        All books requested are already checked out. Displays this information to student and closes request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The above description shows a very simple use case. However, there are a few essential characteristics to be noticed about the use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have identified the key components of a use case, that is, the goal, actors, preconditions, key scenarios/flow and preconditions. It is very essential that we identify these components before writing a use case.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have not gone into any sort of technical details about implementation or user interface design. Use cases only represent a very high level design. We are only trying to understand the flow and uses of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of paths (scenarios) that traverse an actor from a trigger event (start of the use case) to the goal (success scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of scenarios that traverse an actor from a trigger event toward a goal but fall short of the goal (failure scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Where can we use ‘use cases’?===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases are usually used to capture the requirements of an interaction based system. When there is a lot of interaction between actors and the system, it makes sense to capture as many interactions and scenarios possible before starting development of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases help to eliminate rework due to requirements misunderstandings between developers and stakeholders by aiming to reach a point where there are no surprises for the users. Use cases help to build an explicit shared understanding that everyone can take away with them, the users, developers, testers, technical authors, and others.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use cases have received some interest as a starting point for test design. By analyzing use cases for the system, we can know various interactions between the system and actors which will help in drawing out test plans.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Where can’t we use ‘use cases’?===&lt;br /&gt;
&amp;lt;p&amp;gt;[ http://en.wikipedia.org/wiki/Use_case]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use case flows are not well suited to easily capturing non-interaction based requirements of a system (such as algorithm or mathematical requirements) or non-functional requirements (such as platform, performance, timing, or safety-critical aspects). These are better specified declaratively elsewhere.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Some systems are better described in an information/data-driven approach than in a functionality-driven approach of use cases. A good example of this kind of system is data-mining systems used for Business Intelligence. If you were to describe this kind of system in a use case model, it would be quite small and uninteresting (there are not many different functions here) but the set of data that the system handles may nevertheless be large and rich in details.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing Use Cases ==&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Cases for a system is a process taken between those designing the system and the Stakeholders.  There are many different ways to write Use Cases [SOURCE].  Because of this, there are many different formats that Use Cases can take when they are written.  There are, however, certain guidelines that should be followed in the process of writing Use Cases.  In general, these guidelines are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Never include implementation specific terminology in the Use Case [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Each Use Case should be a set of scenarios, which include different flows of events [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Iterative Process ===&lt;br /&gt;
&amp;lt;p&amp;gt;Normally, this process is done iteratively, so that the iterations can build upon each other [SOURCE].  Below is an example of three iterations of the Use Case writing process to illustrate how it can reveal things about a system and layout the functional requirements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, we will be creating Use Cases to solve the following problem statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Develop a system to allow users to schedule meetings with each other.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this system, the stakeholders will be the users of the system.  The Users will also be the only Actors in the system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 1 ====&lt;br /&gt;
&amp;lt;p&amp;gt;For the first iteration, we will write out short sentences to describe the functionality that the system will have.  Some use cases could be:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Request a Meeting&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Approve a meeting request&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Suggest a new time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;View a User's schedule&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;
&amp;lt;p&amp;gt;In this example, the fourth Use Case may not have been an obvious requirement that could be derived from the original problem statement, but in the process of creating the Use Cases, it was discovered that it would be a good requirement for the system to have.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 2 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The next iteration would involve writing out longer descriptions for each. This could be done in paragraph form, or by writing a list.  Below are the Use Cases in paragraph form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Use Case 1 – Request a meeting'''&lt;br /&gt;
 User A chooses the date and time for a meeting with User B.  User A chooses User B as the recipient of the meeting request.&lt;br /&gt;
 User A sends the meeting request to User B through the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 2 – Approve a Meeting Request'''&lt;br /&gt;
 User A receives a meeting request from User B and accepts the user request.  A notification that User A has accepted the meeting is sent to User B.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 3 – Suggest a different meeting time'''&lt;br /&gt;
 User A receives a meeting request from User B and suggests a different time and/or date for the meeting.  The response is sent to User B through &lt;br /&gt;
 the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 4 – View a User's schedule'''&lt;br /&gt;
 User A would like to schedule a meeting with User B.  User A starts the system and opens up User B's schedule.  &lt;br /&gt;
 User A can see when User B has already scheduled  meetings and User A can then use that information to send User B a meeting request.&lt;br /&gt;
 Use A can also access their own schedule to view when User A has scheduled meetings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;From writing out the Use Cases with more description, it should become clear that Use Case 2 and Use Case 3 are very similar.  In both Use Cases, User A responds to a meeting request and a response/notification is sent to User B.  This might lead the designers of the system to combine these two Use Cases into one Use Case for &amp;quot;Respond to Request.&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 3 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In the next iteration, we're going to use a Use Case template.  There are many different Use Case templates, which include different information [SOURCES].  A template can be created that is unique for the system being described, provided each Use Case uses the same template. The template we will use will include:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case &amp;lt;Number&amp;gt;: Title&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.1: &amp;lt;Summary/Goal&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.2: &amp;lt;Actors&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.3: &amp;lt;Preconditions&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.4: &amp;lt;Main Path&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.5: &amp;lt;Alternate Paths – including sub-flows [S] and error-flows [E]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Case 1 in this format yields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case 1: Request a meeting&amp;lt;br&amp;gt;&lt;br /&gt;
 1.1: Summary/Goal&lt;br /&gt;
 User A can choose the date and time for a meeting with User B [Main].  User A can choose User 	B as the recipient of the meeting &lt;br /&gt;
 request [Main], or multiple Users as the recipient [S.2].  User A sends the meeting request to User B through the system [Main]. &lt;br /&gt;
 Before User A sends the meeting request, User A can opt not to send the request and delete it [S.1]. If User B is no longer in &lt;br /&gt;
 the system, User A receives notification that the meeting request cannot be sent [E.1].&amp;lt;br&amp;gt;&lt;br /&gt;
 1.2: Actors&lt;br /&gt;
 Users&amp;lt;br&amp;gt;&lt;br /&gt;
 1.3: Preconditions&lt;br /&gt;
 - User A and User B are recorded as Users in the system&lt;br /&gt;
 - User A has logged into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.4: Main Path&lt;br /&gt;
 1) User A chooses a date for a meeting&lt;br /&gt;
 2) User A chooses a time for a meeting&lt;br /&gt;
 3) User A chooses User B as the recipient for the meeting request&lt;br /&gt;
 4) User A submits the meeting request&lt;br /&gt;
 5) User B receives the meeting request the next time User B logs into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.5: Alternative Path&lt;br /&gt;
 S.1 &lt;br /&gt;
 User A creates a meeting request, but down not submit it.  A meeting request is not sent to User B&amp;lt;br&amp;gt;&lt;br /&gt;
 S.2&lt;br /&gt;
 User A creates a meeting request for more than one User.  User A submits the meeting request and each User receives it the next&lt;br /&gt;
 time they log in&amp;lt;br&amp;gt;&lt;br /&gt;
 E.1&lt;br /&gt;
 User B is no longer a User in the system.  User A receives notification that the meeting request cannot be sent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results ====&lt;br /&gt;
&amp;lt;p&amp;gt;There are a few interesting things revealed about the system by re-writing the Use Case in this format.  The most important is likely that Users will need to &amp;quot;log-in&amp;quot; to the system.  This implies that there could be another Actor in the system, namely an Admin.  This leads to these additional Use Cases:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Log into the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Create a User in the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Admin&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;
&amp;lt;p&amp;gt;Each of these new Use Cases would then go through the iterations listed above until they are in the template form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see from the example, each iteration refines the Use Case and helps to clarify the requirements of the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagrams ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use Case Diagrams are useful for showing how each component in a system will interact with other components of the system [SOURCE].  They are not good for showing the flow of events that a system will have, like the written Use Cases are [SOURCE].  Also, unlike written Use Cases, Use Case Diagrams use UML so that there is a standard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;DEFINE UML HERE&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Components of a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;UCDs have only 4 major elements: The actors that the system you are describing interacts with, the system itself, the use cases, or services, that the system knows how to perform, and the lines that represent relationships between these elements.[SOURCE: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html#uses – DIRECT QUOTE]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Actors''' in Use Case Diagrams are represented by stick figures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Actor.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Use Cases''' are represented by ovals:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Relationships''' are represented by Solid Lines.  Sometimes, arrowheads are added to the lines to indicate the direction of the invocation, or to show which actor is the primary actor [SOURCE: http://www.agilemodeling.com/artifacts/useCaseDiagram.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lines.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two special relationships that can be shown in a Use Case Diagram are the ''Extends'' and ''Includes'' relationships.  These relationships are usually shown with a dotted line with an arrowhead and &amp;lt;&amp;lt;extend&amp;gt;&amp;gt; or &amp;lt;&amp;lt;include&amp;gt;&amp;gt; written near the line.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Extends'' relationship is used to show when Use Case X is a special case of Use Case Y [SOURCE].  In this situation, the dotted line is drawn from Use Case X to Use Case Y with the arrowhead pointing to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Includes/Uses'' relationship is used to show that every time Use Case X is done, Use Case Y must also be done [SOURCE].  In this case, the arrow points to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Use Case Diagram for the same system described in the Writing a Use Case might look something like:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UCDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see, &amp;quot;Accept Meeting&amp;quot; and &amp;quot;Suggest new time&amp;quot; are special cases of &amp;quot;Respond to request&amp;quot;.  Also, from this diagram, the system designers are saying that in order to &amp;quot;Request a Meeting&amp;quot; the user must &amp;quot;View Schedule&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Topics ==&lt;br /&gt;
== Tools and Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different tools available to create Use Cases. For a more comprehensive list, go to [http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools Wikipedia's list of UML modeling tools]. A sampling are below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Rational Rose:'''&lt;br /&gt;
&lt;br /&gt;
One of the most popular tool for use-case driven development.&lt;br /&gt;
&lt;br /&gt;
http://www-306.ibm.com/software/awdtools/developer/rose/index.html&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Sun Java Studio Enterprise:''' &lt;br /&gt;
&lt;br /&gt;
Sun Java Studio Enterprise offers a UML tool. &lt;br /&gt;
&lt;br /&gt;
http://developers.sun.com/jsenterprise/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Visual case:''' &lt;br /&gt;
&lt;br /&gt;
UML &amp;amp; E/R Database Design Tool&lt;br /&gt;
&lt;br /&gt;
http://www.visualcase.com/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different examples of Use Cases.  Some are listed below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.objectmentor.com/resources/articles/usecases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.w3.org/2002/06/ws-example &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.agilemodeling.com/essays/useCaseReuse.htm &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.soi.wide.ad.jp/class/20040034/slides/07/9.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.cs.colorado.edu/~kena/classes/6448/s05/reference/usecases/examples.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://courses.softlab.ntua.gr/softeng/Tutorials/UML-Use-Cases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38837</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4a RJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4a_RJ&amp;diff=38837"/>
		<updated>2010-10-20T04:06:37Z</updated>

		<summary type="html">&lt;p&gt;Bazinga: /* Use Case Basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=5&amp;gt;Use Cases&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Introduction ==&lt;br /&gt;
== Use Case Basics ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases can be defined in many ways. There are many formal definitions for it. Very simply put, a use case is a reason to use a system. For example, a student borrowing a book from a library would be a use case of the library or a bank cardholder might need to use an ATM to get cash out of their account. More formally, “a use case is a collection of possible sequences of interactions between the system under discussion and its Users (or Actors), relating to a particular goal” [http://alistair.cockburn.us/Use+case+fundamentals].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A use case is initiated by a user with a particular goal in mind, and completes successfully when that goal is satisfied. The system is treated as a &amp;quot;black box&amp;quot;, and the interactions with system, including system responses, are as perceived from outside the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use cases capture who (actor) does what (interaction) with the system, for what purpose (goal), without dealing with system internals. A complete set of use cases specifies all the different ways to use the system, and therefore defines all behavior required of the system, bounding the scope of the system.[http://www.bredemeyer.com/use_cases.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now let us define some terms used with use cases: [http://en.wikipedia.org/wiki/Use_case]&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Actor:&amp;lt;/b&amp;gt; An actor is a type of user that interacts with the system (ex student borrowing book or cardholder using ATM). Actors are also external entities (people or other systems) who interact with the system to achieve a desired goal. The goal must be of value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Goal:&amp;lt;/b&amp;gt; Without a goal a use case is useless. There is no need for a use case when there is no need for any actor to achieve a goal. A goal briefly describes what the user intends to achieve with this use case. For example, the goal of a student using the library is to obtain the book. There is no point in having a use case like “the student enters the library” as that in itself has no value to the actor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Stakeholder:&amp;lt;/b&amp;gt; A stakeholder is an individual or department that is affected by the outcome of the use case. Individuals are usually agents of the organization or department for which the use case is being created. A stakeholder might be called on to provide input, feedback, or authorization for the use case. The stakeholder section of the use case can include a brief description of which of these functions the stakeholder is assigned to fulfill.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Trigger:&amp;lt;/b&amp;gt; A trigger describes the event that causes the use case to be initiated. This event can be external or internal. If the trigger is not a simple true &amp;quot;event&amp;quot; (e.g., the customer presses a button), but instead &amp;quot;when a set of conditions are met&amp;quot;, there will need to be a triggering process that continually (or periodically) runs to test whether the &amp;quot;trigger conditions&amp;quot; are met: the &amp;quot;triggering event&amp;quot; is a signal from the trigger process that the conditions are now met. &lt;br /&gt;
In our example with the student, a trigger would be the need for the book due to an approaching exam or test which causes the student to go to the library to borrow a book.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Precondition:&amp;lt;/b&amp;gt; A precondition defines all the conditions that must be true (i.e., describes the state of the system) for the trigger to meaningfully cause the initiation of the use case. That is, if the system is not in the state described in the preconditions, the behavior of the use case is indeterminate. For example, the student should be a member of the library and have the required identity to borrow a book. If the student is not a member of the library, there is no point in the student trying to borrow a book from that library.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Scenarios:&amp;lt;/b&amp;gt; A scenario usually specifies when the use case starts and ends. It describes the interaction with actors and shows the flow of events between a user and system. For example, when a student tries to borrow a particular book from the library, it doesn’t always necessarily turn out the same way. Sometimes the book is available and sometimes it is already borrowed by someone else or the library may not have a given book. These are all examples of use case scenarios. The outcome in each case if different depending on circumstances, but they all relate to the same goal that is, they are all triggered by the same need(in this case, need for the book) and all the scenarios have the same starting point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Now that we know something about use cases, let us go ahead and describe a simple use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
Use Case 1: Request book from the library (automated system).&lt;br /&gt;
&lt;br /&gt;
1.1: Summary/Goal&lt;br /&gt;
        To borrow book a particular book from the library&lt;br /&gt;
1.2: Actors&lt;br /&gt;
        Student&lt;br /&gt;
1.3: Preconditions&lt;br /&gt;
        Student should be a member of the library and have an id.&lt;br /&gt;
1.4: Main Path&lt;br /&gt;
        System requests for student ID and checks if he/she is a member&lt;br /&gt;
        Student selects “request book”&lt;br /&gt;
        Student enters name(s) of the book(s)&lt;br /&gt;
        System checks for availability of books and displays results accordingly&lt;br /&gt;
        Student confirms the order&lt;br /&gt;
        System displays details of where the requested books are stacked&lt;br /&gt;
1.5: Alternate Path&lt;br /&gt;
        System does not recognize Id or student is not a member. System will not allow any books to be checked out.&lt;br /&gt;
        All books requested are already checked out. Displays this information to student and closes request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The above description shows a very simple use case. However, there are a few essential characteristics to be noticed about the use case:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have identified the key components of a use case, that is, the goal, actors, preconditions, key scenarios/flow and preconditions. It is very essential that we identify these components before writing a use case.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have not gone into any sort of technical details about implementation or user interface design. Use cases only represent a very high level design. We are only trying to understand the flow and uses of the system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of paths (scenarios) that traverse an actor from a trigger event (start of the use case) to the goal (success scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We have recorded a set of scenarios that traverse an actor from a trigger event toward a goal but fall short of the goal (failure scenarios).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing Use Cases ==&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Cases for a system is a process taken between those designing the system and the Stakeholders.  There are many different ways to write Use Cases [SOURCE].  Because of this, there are many different formats that Use Cases can take when they are written.  There are, however, certain guidelines that should be followed in the process of writing Use Cases.  In general, these guidelines are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Never include implementation specific terminology in the Use Case [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Each Use Case should be a set of scenarios, which include different flows of events [SOURCE]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Iterative Process ===&lt;br /&gt;
&amp;lt;p&amp;gt;Normally, this process is done iteratively, so that the iterations can build upon each other [SOURCE].  Below is an example of three iterations of the Use Case writing process to illustrate how it can reveal things about a system and layout the functional requirements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, we will be creating Use Cases to solve the following problem statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Develop a system to allow users to schedule meetings with each other.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this system, the stakeholders will be the users of the system.  The Users will also be the only Actors in the system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 1 ====&lt;br /&gt;
&amp;lt;p&amp;gt;For the first iteration, we will write out short sentences to describe the functionality that the system will have.  Some use cases could be:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Request a Meeting&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Approve a meeting request&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Suggest a new time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;View a User's schedule&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;
&amp;lt;p&amp;gt;In this example, the fourth Use Case may not have been an obvious requirement that could be derived from the original problem statement, but in the process of creating the Use Cases, it was discovered that it would be a good requirement for the system to have.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 2 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The next iteration would involve writing out longer descriptions for each. This could be done in paragraph form, or by writing a list.  Below are the Use Cases in paragraph form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Use Case 1 – Request a meeting'''&lt;br /&gt;
 User A chooses the date and time for a meeting with User B.  User A chooses User B as the recipient of the meeting request.&lt;br /&gt;
 User A sends the meeting request to User B through the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 2 – Approve a Meeting Request'''&lt;br /&gt;
 User A receives a meeting request from User B and accepts the user request.  A notification that User A has accepted the meeting is sent to User B.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 3 – Suggest a different meeting time'''&lt;br /&gt;
 User A receives a meeting request from User B and suggests a different time and/or date for the meeting.  The response is sent to User B through &lt;br /&gt;
 the system.&amp;lt;br&amp;gt;&lt;br /&gt;
 '''Use Case 4 – View a User's schedule'''&lt;br /&gt;
 User A would like to schedule a meeting with User B.  User A starts the system and opens up User B's schedule.  &lt;br /&gt;
 User A can see when User B has already scheduled  meetings and User A can then use that information to send User B a meeting request.&lt;br /&gt;
 Use A can also access their own schedule to view when User A has scheduled meetings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;From writing out the Use Cases with more description, it should become clear that Use Case 2 and Use Case 3 are very similar.  In both Use Cases, User A responds to a meeting request and a response/notification is sent to User B.  This might lead the designers of the system to combine these two Use Cases into one Use Case for &amp;quot;Respond to Request.&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Iteration 3 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In the next iteration, we're going to use a Use Case template.  There are many different Use Case templates, which include different information [SOURCES].  A template can be created that is unique for the system being described, provided each Use Case uses the same template. The template we will use will include:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case &amp;lt;Number&amp;gt;: Title&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.1: &amp;lt;Summary/Goal&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.2: &amp;lt;Actors&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.3: &amp;lt;Preconditions&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.4: &amp;lt;Main Path&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;.5: &amp;lt;Alternate Paths – including sub-flows [S] and error-flows [E]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Writing Use Case 1 in this format yields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Use Case 1: Request a meeting&amp;lt;br&amp;gt;&lt;br /&gt;
 1.1: Summary/Goal&lt;br /&gt;
 User A can choose the date and time for a meeting with User B [Main].  User A can choose User 	B as the recipient of the meeting &lt;br /&gt;
 request [Main], or multiple Users as the recipient [S.2].  User A sends the meeting request to User B through the system [Main]. &lt;br /&gt;
 Before User A sends the meeting request, User A can opt not to send the request and delete it [S.1]. If User B is no longer in &lt;br /&gt;
 the system, User A receives notification that the meeting request cannot be sent [E.1].&amp;lt;br&amp;gt;&lt;br /&gt;
 1.2: Actors&lt;br /&gt;
 Users&amp;lt;br&amp;gt;&lt;br /&gt;
 1.3: Preconditions&lt;br /&gt;
 - User A and User B are recorded as Users in the system&lt;br /&gt;
 - User A has logged into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.4: Main Path&lt;br /&gt;
 1) User A chooses a date for a meeting&lt;br /&gt;
 2) User A chooses a time for a meeting&lt;br /&gt;
 3) User A chooses User B as the recipient for the meeting request&lt;br /&gt;
 4) User A submits the meeting request&lt;br /&gt;
 5) User B receives the meeting request the next time User B logs into the system&amp;lt;br&amp;gt;&lt;br /&gt;
 1.5: Alternative Path&lt;br /&gt;
 S.1 &lt;br /&gt;
 User A creates a meeting request, but down not submit it.  A meeting request is not sent to User B&amp;lt;br&amp;gt;&lt;br /&gt;
 S.2&lt;br /&gt;
 User A creates a meeting request for more than one User.  User A submits the meeting request and each User receives it the next&lt;br /&gt;
 time they log in&amp;lt;br&amp;gt;&lt;br /&gt;
 E.1&lt;br /&gt;
 User B is no longer a User in the system.  User A receives notification that the meeting request cannot be sent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Results ====&lt;br /&gt;
&amp;lt;p&amp;gt;There are a few interesting things revealed about the system by re-writing the Use Case in this format.  The most important is likely that Users will need to &amp;quot;log-in&amp;quot; to the system.  This implies that there could be another Actor in the system, namely an Admin.  This leads to these additional Use Cases:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table border=1&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use Case #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Actor&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;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Log into the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User&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;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Create a User in the system&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Admin&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;
&amp;lt;p&amp;gt;Each of these new Use Cases would then go through the iterations listed above until they are in the template form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see from the example, each iteration refines the Use Case and helps to clarify the requirements of the system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagrams ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Use Case Diagrams are useful for showing how each component in a system will interact with other components of the system [SOURCE].  They are not good for showing the flow of events that a system will have, like the written Use Cases are [SOURCE].  Also, unlike written Use Cases, Use Case Diagrams use UML so that there is a standard.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;DEFINE UML HERE&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Components of a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;UCDs have only 4 major elements: The actors that the system you are describing interacts with, the system itself, the use cases, or services, that the system knows how to perform, and the lines that represent relationships between these elements.[SOURCE: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html#uses – DIRECT QUOTE]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Actors''' in Use Case Diagrams are represented by stick figures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Actor.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Use Cases''' are represented by ovals:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;'''Relationships''' are represented by Solid Lines.  Sometimes, arrowheads are added to the lines to indicate the direction of the invocation, or to show which actor is the primary actor [SOURCE: http://www.agilemodeling.com/artifacts/useCaseDiagram.htm]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lines.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Two special relationships that can be shown in a Use Case Diagram are the ''Extends'' and ''Includes'' relationships.  These relationships are usually shown with a dotted line with an arrowhead and &amp;lt;&amp;lt;extend&amp;gt;&amp;gt; or &amp;lt;&amp;lt;include&amp;gt;&amp;gt; written near the line.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Extends'' relationship is used to show when Use Case X is a special case of Use Case Y [SOURCE].  In this situation, the dotted line is drawn from Use Case X to Use Case Y with the arrowhead pointing to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ''Includes/Uses'' relationship is used to show that every time Use Case X is done, Use Case Y must also be done [SOURCE].  In this case, the arrow points to Use Case Y.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a Use Case Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Use Case Diagram for the same system described in the Writing a Use Case might look something like:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:UCDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As you can see, &amp;quot;Accept Meeting&amp;quot; and &amp;quot;Suggest new time&amp;quot; are special cases of &amp;quot;Respond to request&amp;quot;.  Also, from this diagram, the system designers are saying that in order to &amp;quot;Request a Meeting&amp;quot; the user must &amp;quot;View Schedule&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Topics ==&lt;br /&gt;
== Tools and Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different tools available to create Use Cases. For a more comprehensive list, go to [http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools Wikipedia's list of UML modeling tools]. A sampling are below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Rational Rose:'''&lt;br /&gt;
&lt;br /&gt;
One of the most popular tool for use-case driven development.&lt;br /&gt;
&lt;br /&gt;
http://www-306.ibm.com/software/awdtools/developer/rose/index.html&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Sun Java Studio Enterprise:''' &lt;br /&gt;
&lt;br /&gt;
Sun Java Studio Enterprise offers a UML tool. &lt;br /&gt;
&lt;br /&gt;
http://developers.sun.com/jsenterprise/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Visual case:''' &lt;br /&gt;
&lt;br /&gt;
UML &amp;amp; E/R Database Design Tool&lt;br /&gt;
&lt;br /&gt;
http://www.visualcase.com/&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;p&amp;gt;There are many different examples of Use Cases.  Some are listed below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.objectmentor.com/resources/articles/usecases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.w3.org/2002/06/ws-example &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.agilemodeling.com/essays/useCaseReuse.htm &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.soi.wide.ad.jp/class/20040034/slides/07/9.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://www.cs.colorado.edu/~kena/classes/6448/s05/reference/usecases/examples.html &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; http://courses.softlab.ntua.gr/softeng/Tutorials/UML-Use-Cases.pdf &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Bazinga</name></author>
	</entry>
</feed>