31
1

M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

  • Upload
    dohanh

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

1

Page 2: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

2

Page 3: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

PT3 – Have all students seen/reviewed TMA01?

3

Page 4: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

Average Score 74% Top score 100%

•Word counts

•TMA naming convention tah252_M150_TMA02 - needs to be identifiable.

•Paraphrasing: One of the questions in the TMA was very difficult for students to write in their own words – web sites all very similar and information all the

same.

Be very careful when writing your answers that you write entirely in your own words – many web sites you will find paraphrase or copy each other

(not always with permission or reference) If you do paraphrase (rewrite someone else's argument using your own words, phrasing and

interpretation) , then you should cite the reference. There is no shame in using other peoples work to help research your own – acknowledge it.

Good academic practice is about making sure that anyone reading your work can easily distinguish your thoughts/arguments and ideas easily from those

of other people.

Academic integrity is used by the OU as a term to define the good academic practice that enables every individual to demonstrate how much and what they

have learned within their subject/programme of study, and that they are able to put this into practice. It also allows your tutors and other students to fairly

assess the extent of learning progression made by each individual, and encourages everyone to respect and acknowledge the work of others.

At undergraduate level this is demonstrated mostly in the completion of assignments: When you produce answers to assignments, it is important that the

person reviewing it knows that the words on the page originated with you (author) and are easily distinguishable as your work - thoughts ideas:

Makes your new knowledge your own - it becomes intelligible and pertinent to you - effective learning.

Skills you learn are transferable.

Reflects your true academic ability which can be assessed and compared to other students (grading of work in a fair and appropriate manner

Gives you a true refection on how you are progressing and achieving.

Tutor feedback is fair and accurate reflection on your work , and so support is personal to your needs and abilities.

4

Page 5: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

5

The last link is the one referenced from the course website!

Bibliography = a list of all the relevant resources that you consulted in your research.

References are the resources that you directly use/mention or directly quote.

Page 6: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

6

Page 7: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

What is HTML – Hypertext Mark up Language

What is hypertext provides link to other documents or related parts of the same document

HTML tags – delimit the text intended for specific styling.

Used for writing web pages

Use Laptop as group Notepad++ and Firefox

7

Page 8: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

8

When we speak most of us naturally say more words than is strictly necessary for the meaning – we illustrate and add description –

this is often not necessary in an assignment

Use dictionary and a thesaurus. Requires practise and sometimes many drafts.

See also: Siegel K. A., (2007) ”Writing Labs: Writing Concisely” [online] IconLogic Available from:

http://www.iconlogic.com/WritingConcisely.htm (accessed Dec 2009)

1) We would like to call your attention and to the attention of others in your office to the fact that your report is overdue because

the deadline was last Friday.

We remind you that your report is overdue.

2) The document that you refer back to is not included in the sample documents that go to make up the enclosure.

The document is not included in the samples.

3) The purpose of this memo is to provide a reference for all your staff members of the formats of various documents that go

forward by transmission to headquarters.

This memo describes the formats for documents going to headquarters.

4) The need for reports that have logic and are relevant is still great.

We need logical, relevant reports.

Page 9: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

9

Page 10: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

10

exercise from: Northedge, A., Thomas, J., Lane, A., Peasgood,A.,(1997), "The Good Sciences Study Guide" Chapter:Writing and Assignments., Milton Keynes: The Open University

Page 11: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

When programming we sometimes need code to execute if certain conditions occur e.g.

selection: if something is true or

iterative: while something is true

We need therefore to understand how to construct truth tables so that we can plan our code.

The only way to find the error is often by tracing the code but first of all you need to understand how Boolean expressions combine and give results.

George Boole ( 1815 – 1864) English Mathematician and philosopher - inventor of Boolean Logic – which is the basis of digital computer logic - therefore

considered as the founder of computer science. Boolean algebra was used to optimise the design of electromechanical relays and later telephone routing

switches – employing the properties of electrical switches to process logic is the basic concept of modern electronic digital computers.

In very simple form we will look at Truth Tables.

11

Page 12: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

12

Page 13: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

13

Keep it simple note AND Both operands have to be TRUE for the statement to be TRUE (truth, the whole truth and nothing but the truth!) but if you have OR

only one operand has to be TRUE for the statement to be true., a sort of catch all.

A AND B

A OR B

NOT A

NOT B

Remember rules of precedence:

Left to right

Brackets

Unary operators (e.g. NOT A) then

Binary operators A AND B (Maths / then x then + and finally -)

e.g. 3 + 4 x 2 = 11

4 - 2 + 3 x 2

3 x 4 / 2 x 6 = 36

TMA requires you to compare two statements and say if they are equivalent:

Set tables out the same way and always finish with a concluding statement…by comparing the last two columns of the two tables we can see that the

statements are/are not equivalent. .

A B

True True

True False

False True

False False

These can be combined e.g.

A AND B OR NOT A

A OR B AND (A AND B)

Remember rules of precedence

Left to right

parentheses first

then unary operators e.g. NOT i.e. takes one operand

then binary operators e.g. AND OR i.e. takes two operands

Truth table for NOT A AND NOT B

A B NOT A NOT B NOT A AND NOT B

true true false false false

true false false true false

false true true false false

false false true true true

Page 14: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

14

Plain paper:

Draw some simple objects: drawer has to guess what he is drawing

Umbrella

House

Chair

Stairs

Now look at these commands and lets simplify the shapes but make it so that everyone draws the same shape not their own interpretation of your command.

Squared paper

Umbrella

House

Chair

Stairs

Page 15: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

15

On plain paper: Draw a house

Now use graph paper and these commands to draw the house

Compare visual and ease. What do you notice?

Draw a circle with angles in case any one has difficulties

Use these commands to draw a

Square, Stairs, Rectangle, cross squares inside a square.

Hexagon

Circle

Triangle

Pentagon

How could make it more efficient? Is there a pattern/repetition to your commands could you use selection?

New Course being written TU100 (My Digital Life) e will use an adapted version of Scratch (Squeak Smalltalk) written by MIT for Kindergarten and uses a

building blocks style. It is very intuitive to use and requires little instruction. http://scratch.mit.edu/

A very visual tool is MSLogo – also available free

Page 16: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

16

Page 17: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

17

Page 18: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

18

If I can have this I will do that or I will do something else!

Page 19: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

19

Page 20: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

20

Page 21: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

21

Page 22: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

22

e.g. Credit agencies are not permitted to keep bad debt records longer then 7 years.

Data Protection Act 1998

End of Transitional Arrangements - October 2007

The Data Protection Act 1998 came into force in March 2000. A number of 'transitional

relief’ arrangements were included in the legislation. These arrangements provided a set

period of time for data controllers to bring their personal information handling practices and

records fully in line with the 1998 Act. The purpose of this was to ensure a smooth

transition from the original requirements of the Data Protection Act 1984 to the additional

requirements of the 1998 Act.

Page 23: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

23

1 Intent to secure Unauthorised Access - if he causes a computer to function in such a way that it could gain unauthorised access to a program(s) or data held in any computer.

2 Intent to use access for criminal activity at time or in the future

3 If at the time of access he knowingly modifies the content of the computer so as to impair the functioning of the computer , a program or reliability of the data or impair access to a program and or data

The law was inspired by the Law Lords' acquittal on appeal of Robert Schifreen and Steve Gold, two journalists who had hacked into Prince Philip's mailbox

1984 on the British Telecom service Prestel.

And several other hacks including:

someone accessed and destroyed the data on a breast cancer research server

Page 24: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

24

PUBLIC AUTHORITIES not private companies/individuals:

Schools, police, health service central government, local authorities.

Or environmental information – Environment Information Regulations.

Rolled out January 2005

Page 25: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

25

Spyware Activity:

Discussion: Student digs: 3 students, a, b and c: The students all agree they want a broadband connection so student a signs up with an ISP in their name,

the others help pay for it and each have their own email address and mailbox as part of the ISP service.

Student a finishes studies and moves out but doesn’t change name or stop ISP. The telephone line is in the name of student b and the others continue to pay

for the ISP

*Who owns the account? The named person, the people paying for it? The person whose telephone line it is? All of the students?

*Is/should student a still permitted to access their emails from the net mail facility now they are not paying?

*If student a accesses the emails of student b and student c is there an issue? What if the emails are downloaded by student a to their computer, thus

preventing student b and student c receiving their emails?

*What if the student a answers an email written to student b and writes to someone they didn’t have an email address for?

Email accounts require passwords/authentication

Computer Ethics Discussion

Ethics are about placing values on acts by people according to whether they are good or bad. Every society has rules which govern what

behavior is acceptable and when these rules become a consensus they are formalized into laws. The Ten Commandments of computer

ethics have been defined by the Computer Ethics Institute. See Unit 5

1) Thou shalt not use a computer to harm other people: If it is unethical to harm people by making and using a bomb but it is equally

bad to write a program that handles the timing of the bomb. As it is bad to steal and destroy other people’s books and notebooks, it is

equally bad to access and destroy their files. Consider also a persons or companies reputation. The person who stole the data from the

Inland Revenue re child benefit brought the government into disrepute and also potentially has the means to harm many millions of

people.

2) Thou shalt not interfere with other people's computer work: Computer viruses are small programs that disrupt other people’s

computer work by destroying their files, taking huge amounts of computer time or memory, or by simply displaying annoying messages.

Generating and consciously spreading a computer virus is unethical. Time is a very precious commodity, spam takes time and resources

from the user in order for them to make judgment and action such as deletion.

3) Thou shalt not snoop around in other people's files: Reading other people’s e-mail messages is like reading their letters, it is an

invasion of privacy. Obtaining other people’s non-public files should be judged the same way as breaking into their rooms and stealing

their documents. If documents are protection by even weak encryption and this is hacked you have issues re 7.

4) Thou shalt not use a computer to steal: Using a computer to misappropriate money or data is unlawful. Using someone else’s

computer /internet connection without their permission is also theft of resources. If it is a secure connection you also have issues related

to 7.

5) Thou shalt not use a computer to bear false witness: The Internet is a tool that can be used to rapidly and widely spread

information, truths and untruths… once public, it is always public…Consider also deliberately giving false information on Wikipedia.

6) Thou shalt not use or copy software for which you have not paid: Software is an intellectual product. In that way, it is like a book:

Obtaining illegal copies of copyrighted software is as bad as photocopying a copyrighted book. There are laws against both.

7) Thou shalt not use other people's computer resources without authorization: user names and passwords are used to authorize

allocation of system resources/accounts and to safeguard information. You should not try to bypass this authorization process. Hacking a

system to break and bypass the authorization is unethical and against the Computer Misuse Act 1990

8) Thou shalt not appropriate other people's intellectual output: e.g., the programs you write for the activities designed for this course

are your own intellectual output. Copying somebody else’s program without proper authorization is software piracy and is unethical.

Intellectual property is a form of ownership.

9) Thou shalt think about the social consequences of the program you write: You have to think about computer issues in a more

general social framework: Can the program you write be used in a way that is harmful to society? Is the content of the computer game

animations indecent and therefore potentially harmful to children?

10) Thou shalt use a computer in ways that show consideration and respect: Don’t send inflammatory or insulting messages, once

sent an email cannot be intercepted – once committed to the net content should be considered as permanent. Computers give a distorted

sense of immediacy, permanence and personal contact. It is not considerate to use someone else’s bandwidth for accessing the internet

and reduce their capacity, or their account to send spam or phishing emails.

Page 26: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

26

When code does not work as we expect (it works but produces results that we do not predict) then a logical approach to finding the error is vital to save what

can escalate into hours of hair pulling frustration.

Lets look at the code

Number is set to 1

Print number

Add one to number

Print number

Page 27: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

27

Output is 12

Page 28: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

28

What is the output?

Dependent upon the users entry.

How would you find an odd or an even number?

Modulo in JavaScript this is a % and it gives the remainder after division of n by m so you would have something like (number % 2 == 0)

In computing, given two numbers (either integer or real), a and n, a modulo n is the remainder after numerical division of a by n, under certain constraints.

See modulo operation.

Page 29: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

29

Output: Started*7*1finished

See Trace Table Exercise 1.zip

See also Trace Table Exercise 2.zip

Page 30: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

30

Page 31: M150 Tutorial 4 - myweb.tiscali.co.ukmyweb.tiscali.co.uk/tamsdomain/ousite/M150/M150_Tutorial 15-Dec... · PT3 –Have all students seen/reviewed TMA01? 3. Average Score 74% Top score

31

Jan 12th 2010

TMA02 Due 18th January

We will use Notepad++ and Firefox’s error console to debug some common JavaScripting errors.