Class 03 – Errors in Computing
Download
1 / 53

Class 03 - PowerPoint PPT Presentation


  • 238 Views
  • Updated On :

Class 03 – Errors in Computing Today’s Agenda A short video about the Y2K issues in Hong Kong. Classification and analysis of the error images collected. Common ‘practices’ to create errors in software. The biggest error in computing technology. Errors used in digital art and music.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Class 03 ' - oshin


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Slide1 l.jpg

Class 03 – Errors in Computing

  • Today’s Agenda

  • A short video about the Y2K issues in Hong Kong.

  • Classification and analysis of the error images collected.

  • Common ‘practices’ to create errors in software.

  • The biggest error in computing technology.

  • Errors used in digital art and music.

  • Glitch art.

  • Hands on exercises to go through the tactics of Jodi and Jim Punk.


Slide2 l.jpg

Class 03 – Errors in Computing

Y2K – the Hong Kong Connection

I’ll go through the programming details afterward.

You try to record the keywords that are often used to describe the issues, the impacts and the resolutions in the video.


Slide3 l.jpg

Class 03 – Errors in Computing

  • Error sharing

  • Based on the material collected over the last two weeks, choose the 5 most interesting ones and describe them to us with the following in mind,

  • Who are the victims of the error?

  • What may be the causes of the error?

  • What did the users respond to the error?

  • What can be the impacts of the error?

  • Do you feel good with the error?


Slide4 l.jpg

Class 03 – Errors in Computing

Error handling

Assumption: we do not want/like errors.

But why?


Slide5 l.jpg

Class 03 – Errors in Computing

Error handling

Errors cause troubles.

Outage, blockage, interruption, etc. negative impacts.

Impacts on productivity, security, stability.


Slide6 l.jpg

Class 03 – Errors in Computing

Mooninite

http://edition.cnn.com/2007/US/02/01/boston.bombscare/index.html

http://sweb.cityu.edu.hk/sm2263/class03/moon01.htm


Slide7 l.jpg

Class 03 – Errors in Computing

Error handling

Scale / scope of the error

Natural error – earthquake

Mechanical failure – car engine breakdown

Informational error – bug, programmed transaction

Biological error – infection

From local to global


Slide8 l.jpg

Class 03 – Errors in Computing

Error handling

We somehow know we cannot completely eliminate errors.

To err is human.

We want to manage them.

But how?


Slide9 l.jpg

Class 03 – Errors in Computing

Error handling

Can we prevent the error?

Can we avoid the error?

Can we fix the error?

Can we reduce the impact of the error?


Slide10 l.jpg

Class 03 – Errors in Computing

Error handling

Our logic: for every error, there is a cause.

When a machine is running smoothly for a period and suddenly there is an error, what will you think?

Will you try to find out the cause of the error?


Slide11 l.jpg

Class 03 – Errors in Computing

Error handling

Someone has changed something.


Slide12 l.jpg

Class 03 – Errors in Computing

Error recovery

If we undo the change made by someone, can we resume the machine back to normal?


Slide13 l.jpg

Class 03 – Errors in Computing

Error resolution

What if that someone makes the change again in the future?

Can we not allow that someone to make any changes in the machine?

Can we kill that someone?

Can we modify the machine such that even if someone makes the change again, it won’t fail?


Slide14 l.jpg

Class 03 – Errors in Computing

Error preparation

Can we try out the error situation such that we can prepare for the worst?

Remember fire drill in primary school


Slide15 l.jpg

Class 03 – Errors in Computing

Benefits of errors

Reveal exceptional situations.

Reveal the deficiency of the initial design.

Reveal a room for improvement.

Reveal a lack of quality assurance.

Reveal a spark of creativity?


Slide16 l.jpg

Class 03 – Errors in Computing

Common ‘practices’ to create errors in program

Division by zero

Mixing data type

Rounding error

Index out of bound

Confusion with syntax

Infinite loop

File not found

End of file

Overwrite existing file


Slide17 l.jpg

Class 03 – Errors in Computing

Division by zero

trace("division by zero");

var m:Number = 10;

var n:Number = 0;

trace(m/n);


Slide18 l.jpg

Class 03 – Errors in Computing

Mixed data type

trace("invalid datatype");

var m:Number = 10;

var n:Number = 7;

var q:String = "12";

trace(m+n);

trace(q+n);


Slide19 l.jpg

Class 03 – Errors in Computing

Round error

The integer 3 will equal 3.3 if the later is rounded according to arithmetic function round().

There are cases where programmers purposely round down the dollar figures in bank accounts and transfer the cents into their own accounts which can be a significant sum.


Slide20 l.jpg

Class 03 – Errors in Computing

Index out of bound

trace("array index error");

var m:Array = new Array(3);

m[0] = 3;

m[1] = 2;

m[2] = 1;

trace(m);

trace(m.length);

m[5] = 167;

trace(m);

trace(m.length);


Slide21 l.jpg

Class 03 – Errors in Computing

Confusion with syntax

var m:Number = 0;

var n:Number = 3;

if (m=n) {

trace("m = n");

} else {

trace("m not = n");

}


Slide22 l.jpg

Class 03 – Errors in Computing

Infinite loop

var i:Number = 1;

var sum:Number = 0;

while (i<100) {

sum += i;

}


Slide23 l.jpg

Class 03 – Errors in Computing

The biggest error in our times

Y2k, the millennium bug

Remember the coverage in media just before the year 2000.


Slide24 l.jpg

Class 03 – Errors in Computing

Y2K error

var birth:Number = 87;

var now:Number = 07;

var age:Number = now - birth;

trace(age);


Slide25 l.jpg

Class 03 – Errors in Computing

Y2K fix

var birth:Number = 1987;

var now:Number = 2007;

var age:Number = now - birth;

trace(age);


Slide26 l.jpg

Class 03 – Errors in Computing

Y2K fix

var birth:Number = 83;

var now:Number = 07;

if (birth>50) {

birth += 1900;

} else {

birth += 2000;

}

if (now>50) {

now += 1900;

} else {

now += 2000;

}

var age:Number = now - birth;

trace(age);


Slide27 l.jpg

Class 03 – Errors in Computing

Playing with the Y2K issue

Y2K and the Millennium Butterflies


Slide28 l.jpg

Class 03 – Errors in Computing

Glitch arts

A glitch is a short-lived fault in a system. The term is particularly common in the computing and electronics industries, as well as among players of video games, although it is applied to all types of systems including human organizations. From the German glitschen, meaning 'to slip.'

from wikipedia


Slide29 l.jpg

Class 03 – Errors in Computing

  • Glitch arts

  • Glitch as aesthetic that plays with errors and noise in the presentation of the artwork;

  • Glitch as a component of the creative process;


Slide30 l.jpg

Class 03 – Errors in Computing

Glitch music

The use of digital artifacts, noise like distortion, which sound like digital errors in the process.

Some artists physical scratch the medium, like pouring acid onto the cd surface to create glitch like sound.


Slide31 l.jpg

Class 03 – Errors in Computing

Glitch music

Examples can be found in,

Pan Sonic (formerly known as Panasonic)

Kid606

Oval (Markus Popp)

Autechre (Rob Brown, Sean Booth)


Slide32 l.jpg

Class 03 – Errors in Computing

Glitch music

Pan Sonic



Slide34 l.jpg

Class 03 – Errors in Computing

Glitch music

Oval process


Slide35 l.jpg

Class 03 – Errors in Computing

Glitch music

Autechre


Slide36 l.jpg

Class 03 – Errors in Computing

Glitch arts

Tony Scott


Slide37 l.jpg

Class 03 – Errors in Computing

Glitch arts

Tony Scott


Slide38 l.jpg

Class 03 – Errors in Computing

Glitch arts

Tony Scott

http://www.beflix.com


Slide39 l.jpg

Class 03 – Errors in Computing

Glitch arts

Jason Salavon


Slide40 l.jpg

Class 03 – Errors in Computing

Glitch arts

Alessandro Canova


Slide41 l.jpg

Class 03 – Errors in Computing

Glitch arts

Alessandro Canova


Slide42 l.jpg

Class 03 – Errors in Computing

Glitch arts

Alessandro Canova


Slide43 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

Understand scripting within a HTML page.

Defining a function.

Using some default events.


Slide44 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="Javascript">

function test01() {

document.write("I love SM2263.<br>");

return;

}

test01();

</script>


Slide45 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="Javascript">

function test01() {

document.write("I want to eat now.<br>");

return;

}

</script>

<body onLoad="test01()">


Slide46 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="Javascript">

function test01() {

window.resizeTo(100,100);

window.moveTo(300,300);

return;

}

</script>

<body onLoad="test01()">


Slide47 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="JavaScript">

function test01() {

window.status = "How are you?";

return;

}

</script>

<body onLoad="test01()">


Slide48 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="JavaScript">

var i = 0;

function test01() {

i++;

window.status = "counting to "+i;

return;

}

function test02() {

window.setInterval("test01()",1000);

return;

}

test02();

</script>


Slide49 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="JavaScript">

var i = 0;

function test01() {

i++;

document.myForm.myNum.value = i;

return;

}

function test02() {

window.setInterval("test01()",1000);

return;

}

</script>

<body onload="test02()">


Slide50 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="JavaScript">

function test01() {

var x = screen.availWidth;

var y = screen.availHeight;

document.write("screen width is "+x+"<br>");

document.write("screen height is "+y+"<br>");

return;

}

test01();

</script>


Slide51 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="JavaScript">

function test01() {

window.moveBy(10,0);

return;

}

function test02() {

window.resizeTo(200,200);

window.moveTo(0,200);

window.setInterval("test01()",1000);

return;

}

</script>

<body onload="test02()">


Slide52 l.jpg

Class 03 – Errors in Computing

JavaScript exercises

<script language="JavaScript">

function test01() {

window.scrollBy(0,5);

return;

}

function test02() {

window.resizeTo(700,180);

window.moveTo(100,200);

window.scrollTo(0,0);

window.setInterval("test01()",500);

return;

}

</script>

<body onload="test02()">



ad