Coding Definitions / Terminology

Variable

A variable is a value that can change, depending on conditions or on information passed to the program.

Constant

Opposite to a variable, a constant is a value that never changes.

Coding Convention

These are a set of guidelines for a specific programming language (e.g. c#, c++, java) which recommend practices and methods for each aspect of programming language written.

These conventions often cover aspects such as:

  • Indentations
  • White Space
  • Declarations
  • Statements
  • Comments

Overall, these conventions increase the readability of your code, making maintenance easier and is not essential for your code to compile.

Identifier

An identifier is user-defined name used to uniquely identify a program element in the code.

Camel Case

Camel Case is a naming convention in which a name is formed of multiple words that are joined together as a single word (compound word) with the first letter of each of the multiple words being capitalised so that each word that makes up the name can easily be read.

Example: “camelCase”

Pascal Case

Also know as upper camel case, Pascal Case is much like camel case, however the first word is also capitalised.

Example: “PascalCase”

Data Type

A  data type is a data storage format that can contain a specific type or range of values. Some common data types include:

  • Integers
  • Floats
  • Characters
  • Strings
  • Arrays

Increment

Increment operators (++) are used to increase the current value of variable by adding integer 1.

Decrement

Opposite to increment, decrement operators (–) are used to decrease the current value of variable by subtracting integer 1.

Declare

A declaration specifies the properties of an identifier. It introduces an identifier and describes its type, be it a type, object, or function.

Example: “public int number;” or “public int number(int, int);”

Parameter

Parameters are the names of the information that you pass into a function or procedure. The values passed in are called arguments.

Operator

An operator is an object / symbol that is capable of manipulating a value on which it is applied.

Examples:

Operator Alternative Explanation Examples
= Eq Equals a = b
== Eq Equals a == b
!= Ne Not equal a != b
+ Plus a + b
+= Addition a += b
++ Increment a++
Minus a – b
-= Subtraction a -= b
Decrement a–
/ Divide a / b
* Times a * b
> Gt Greater than a > b
< Lt Less than a < b
>= Ge Greater than or equal to a >= b
<= Le Less than or equal to a <= b
|| or Boolean or a || b
&& and Boolean and a && b
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s