Nothing going on here, move along…

Archive for the ‘Semister 2’ Category

New Zealand Legal System tidbits

New Zealand has two types of law common and statute. Common law is based on England law while statute law has been created here.

A bill can be put forward by any member of parliament

A select committee is a cross section of parliament

There is no single constitutional document in NZ

Explaination of the program life cycle and its components

The program development life-cycle has 6 phases

  1. Define the problem
  2. Design the solution
  3. Code the program
  4. Test the program
  5. Document the program
  6. Implement the program

In this post I will further define these phases

Define the problem

  • Determine the program requirements – What should it do?
  • Usually this means meeting with analysts/users
  • Identify the program components – Input, processing, output (IPO)

Design the solution

  • Design an algorithm for a solution to the problem
  • An algorithm is a series of logical steps required to solve a particular problem
  • Design tools help to break down the problems and describe the solution

Design tools

  • Flow charts to show the steps in the algorithm
  • Structure charts to show program flow
  • Desk checking to validate the solution

Flowcharting

  • A flow chart is a graphical representation of an algorithm
  • Each step is represented by a symbol and the arrows indicate the flow and order of the steps
  • The shape of the symbol indicates the type of operation that is to occur
  • Flow charts may help the more visual students learn and understand logic

Structure charts

  • Structure charts like flow charts are graphical
  • They show the order in which each step in the algorithm should be performed – the program flow
  • They also show the logic that determines the order

Desk checking

After designing a solution, make sure it is going to work before coding it by desk checking it.

  1. Develop sets of test data (inputs)
  2. Determine the expected result (output) for each data set without using solution algorithm
  3. Step through solution using one set of test data and writing down actual result obtained (output)
  4. Compare expected results with actual results
  5. Repeat steps 3 and 4 for each set of test data

Code the program

  • Translate the solution algorithm into a programming language
  • Enter program code into a programming development tool using the correct syntax

Test the program

  • Remove the syntax and logic errors
  • Syntax error – when code violates the programming languages rules
  • Logic error – when the program does not generate expected output when using the test data
  • Logic errors are also called bugs, so finding and fixing bugs is referred to as ‘debugging’
  • Debugging tools – some errors are difficult to find so programmers use a debugger that allows them to walk through the as each statement is executed

Document the program

Programs should be documented so that others can easily understand and change them

Details include:

  • A narrative description of the program
  • Comments in the program that explain what is happening
  • Flow charts, IPO charts and structure charts
  • Testing procedures

Implement and maintain the program

  • The program(s) are installed on the clients system
  • Training, user manuals, user upgrades and conversions must be taken into consideration during the implementation
  • Eventually programs may need to be updated due to mandatory updates such as government regulations or changes in the way the business operates
  • Programs may be enhanced to add new features or functionality
  • Programs may become obsolete when changes become too difficult or new technology becomes available. When this happens, the program development life cycle starts again

Input, Processing and Output (IPO charts)

Many programs use three steps:

  1. Gather input data – from the keyboard, from files on disk drives
  2. Process the input data
  3. Display the results as an output – Send it to the screen, write it to a file.

History of programming languages

ENIAC Electronic Numerical Integrator And Computer (1946)

The first using of programming, although cables were connected to ports to achieve this.

UDSAC (1947)

First computer with memory

FORTRAN (1954-57)

The first language with a compiler, this cut programming time from 2 weeks to 2 hours

GOTO statements

These are bad for programming, they organise the program in a way that makes it almost impossible to debug.

Object-Orientated

The data and its processes are kept as a single unit called an object

Declarative languages

The computer is told what to do, not how to do it such as SQL

Constraint based languages

Conditions need to be met before processes will be executed

 

Programming language generations

First generation – Machine code (0’s and 1’s)

Second generation – Assembler (Mnemonic codes)

Third generation – Modern programming languages (BASIC, C and PASCAL)

Forth generation – Declaritive languages (SQL etc. code tells computer what, not how to do it)

Fifth generation – Constraint based languages (Prolog, artificial intelligent applications)

 

 

The meaning of life and research

*Disclaimer: I was lying about the life bit*

Research begins with a theory (or lack of one) which is sometimes based on an assumption and explains phenomenons.

There are five ways in which we gain knowledge:

  • Experience (although what works for one person may not work for another)
  • Asking questions
  • argument
  • Consulting authority
  • Research (Which actually may use all but experience)

Research is conducted for many different reasons and there are many different types, it will never give completely definite answers and over time some research will inevitably become void

We research to explain and understand things, to expand knowledge of subjects, to make or save money, for personal satisfaction or organisational research and development

Research is a process with a beginning, an end and some stuff in the middle.

Questions are refined

Data is collected

And most research opens up new questions and horizons

In order to conduct research to a standard it must be about:

The right questions

Honesty and accuracy

Record keeping

Accepting limitations

Over all

Attempt to seek answers

Draw conclusions from data

generalise conclusions

Add to existing knowledge and improve understanding of the world around us

Tag Cloud