Class 03 – Errors in Computing
Download
1 / 53

Class 03 – Errors in Computing - PowerPoint PPT Presentation

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.

Related searches for Class 03 – Errors in Computing

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

Download Presentation

Class 03 – Errors in Computing

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


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.


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.


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?


Class 03 – Errors in Computing

Error handling

Assumption: we do not want/like errors.

But why?


Class 03 – Errors in Computing

Error handling

Errors cause troubles.

Outage, blockage, interruption, etc. negative impacts.

Impacts on productivity, security, stability.


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


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


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?


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?


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?


Class 03 – Errors in Computing

Error handling

Someone has changed something.


Class 03 – Errors in Computing

Error recovery

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


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?


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


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?


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


Class 03 – Errors in Computing

Division by zero

trace("division by zero");

var m:Number = 10;

var n:Number = 0;

trace(m/n);


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);


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.


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);


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");

}


Class 03 – Errors in Computing

Infinite loop

var i:Number = 1;

var sum:Number = 0;

while (i<100) {

sum += i;

}


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.


Class 03 – Errors in Computing

Y2K error

var birth:Number = 87;

var now:Number = 07;

var age:Number = now - birth;

trace(age);


Class 03 – Errors in Computing

Y2K fix

var birth:Number = 1987;

var now:Number = 2007;

var age:Number = now - birth;

trace(age);


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);


Class 03 – Errors in Computing

Playing with the Y2K issue

Y2K and the Millennium Butterflies


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


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;


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.


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)


Class 03 – Errors in Computing

Glitch music

Pan Sonic


Class 03 – Errors in Computing

Glitch music

Kid606


Class 03 – Errors in Computing

Glitch music

Oval process


Class 03 – Errors in Computing

Glitch music

Autechre


Class 03 – Errors in Computing

Glitch arts

Tony Scott


Class 03 – Errors in Computing

Glitch arts

Tony Scott


Class 03 – Errors in Computing

Glitch arts

Tony Scott

http://www.beflix.com


Class 03 – Errors in Computing

Glitch arts

Jason Salavon


Class 03 – Errors in Computing

Glitch arts

Alessandro Canova


Class 03 – Errors in Computing

Glitch arts

Alessandro Canova


Class 03 – Errors in Computing

Glitch arts

Alessandro Canova


Class 03 – Errors in Computing

JavaScript exercises

Understand scripting within a HTML page.

Defining a function.

Using some default events.


Class 03 – Errors in Computing

JavaScript exercises

<script language="Javascript">

function test01() {

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

return;

}

test01();

</script>


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()">


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()">


Class 03 – Errors in Computing

JavaScript exercises

<script language="JavaScript">

function test01() {

window.status = "How are you?";

return;

}

</script>

<body onLoad="test01()">


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>


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()">


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>


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()">


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()">


Class 03 – Errors in Computing

Have Fun


ad
  • Login