The name associated with a particular memory
location used to store data. By using the variable
name, the programmer can store, retrieve and
manipulate data without knowing what the data will
be.
Identifier
A name or label chosen by the programmer to represent an
object within a program. The object could be a variable, a
function, a procedure, a data type etc.
Reserved
word / Keyword – Any vocabulary of a programming
language that can have only the meaning which is
defined in the language. Variables or other identifiers
can NOT use reserved or keywords.
Variables
A name used to refer to a particular memory location that
is used to store data. The value of the data held in that
memory location is not known when the program is
written and can chance while the program is running.
Constant
A data item with a fixed value. In a high-level language, it
is assigned to a variable that cannot be changed when
the program is executed.
A name used to refer to a fixed value. The value is set when the
code is written and cannot chance while the program is running.
Local variable
One that is declared and used inside a module, subroutine,
procedure or function and is only available in that module. It
is created when the subroutine is called and destroyed when it
exits.
Global variable
One that is declared at the beginning of the code and is
available throughout the code, including all its subroutines,
procedures and functions.
Types of programming errors
Syntax Error
Error that occurs when a statement has been written in
the program that breaks the rules of that programming
language.
Logical Error
Error that occurs because there is a mistake in the
algorithm that results in the program doing
something other than what it was intended to do.
Run-time Error
Error which occurs due to an unexpected
situation with the data being processed or
another external factor. The program would
otherwise work under normal operating
conditions.
Black box testing
Black box testing is only concerned with the inputs and outputs of
the program, and not how the program works. You are testing
whether the inputs produce the output that would be expected.
Types of input data to consider testing for: Valid data: data which you
would normally expect the user to input. Invalid data: data which should
generate an error message if it was input. Borderline data: you need to be
especially careful to test the data at the boundaries between different
cases, to ensure they are dealt with correctly.
White box testing
White box testing techniques test the algorithm in the code
to make sure that all parts of the algorithm function as
intended.
Alpha and beta testing
Alpha testing is normally limited to being tested by the internal
employees and friends / family of the company. It is a very early
version of the software and is normal full of bugs.
Beta testing tends to be opened up to the wider world normally though beta sign
up programs. The program is almost in it’s finished state now and the developers
normally want to test areas such as load balancing at this point.
Acceptance testing
The purpose of acceptance testing is to demonstrate to the end user that the
software works correctly and all desired features have been implemented.
Other common causes of run-time
errors are
Overflow error
when the program attempts to use a variable to store a
value that is to large for it.
Stack overflow error
when the program runs out of stack
space to store operations of the program.
This can happen especially when the program is
executing a recursive algorithm.
Library error
the program refers to an external library
that does not exist.