Compression

Compression is a reduction in size of a file. It is useful because files can be made smaller so can be sent and downloaded faster and take up less storage. A disadvantage is that while being compressed files can lose quality, they also have to be decompressed which takes time.

There are two types of compression. Lossy and lossless. Lossy compression is when some of the data is lost but the file size is smaller. Lossy cant be used on blocks of texts as when decompressed it would not make sense. Lossless is when the original file can be recreated so is a bit bigger than lossy.

eg. before and after compression with a block of text

 

compression 2

 

compression 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Relational Operators

AKA Logical operators or Comparison operators.

Relational operators compare data and produce an answer of either true or false. The answer can control the flow of a program using IF, WHILE or REPEAT UNTIL statements.

Example:

If DblSalary <= 1000 then

Symbols used:  <,>,=

 

 

 

Assignment and Arithmetic

Arithmetic operators manipulate numbers through normal arithmetic tasks, for example addition or subtraction

Binary operator- acts upon the two numbers that are going to be calculated.

Unary operator- acts upon the single number.

 

Assignment operators are an instruction that gives a value to a specified value. They can be manipulated, for example the result of a calculation.

Arrays

An array is a data structure that orders several sets of data under one identifier.

Arrays are used because they are shorter than writing lists out individually. This means that the code is more efficient and easier to maintain.

Example:

array

array output

 

Although VB.net starts arrays at 0, in pseudocode arrays start at 1.

 

 

 

 

 

 

 

 

Debugging

Debugging detects and suggests corrections for errors in syntax and logic. IDEs have a number of ways for debugging.

IDEs include:

Diagnostic programs which detect and locate faults in a program.

Debuggers which inspect variable values and allow run time detection for logical errors.

Step mode which executes code one step at a time under users control to see the effects of each line of code.

Traces which are printouts that show the statement tables executed as the program is run and see where an error occurs.

Crash Dump which shows the state of variables when an error occurs.

Stack contents which shows sequencing through procedures and modules

Cross references which identifies variables so errors such as unplanned duplicates are identified.

Variables and Constants

A variable has an identifier which is associated with its memory location. It is used to store and manipulate data and can change while the program is running.

A constant is the same except it does not manipulate data it only stores is as it cant change while the program is running.

There are different types of variables:

String- a set of characters symbols or numbers.

Integer- A whole number

Boolean – True or false

Float – A decimal or fractional number

 

There are two types of variable, global and local. Global variables are declared at the beginning of a program and are available throughout the program. A local variable is declared in a subprogram and is only available in that section of code.

Example:

variable and constant

variable output

 

 

Web Technologies

HTML standing for hyper text markup language is the standard markup language used to create web pages. It can be used on any browser on any device.

For example:

html

 

CSS meaning cascading style sheets is used for describing the look and formatting of a document written in HTML and defines how part of a webpage looks. Advantages are that it is simpler to read than HTML therefore is easier to work with.

Example:

css

JavaScript is a scripting language which means it is more basic than a programming language. It is dynamically typed and creates interactivity and dynamics to  a website.

example:

javascript