Programming Week 6 LBSC 690 Information Technology.

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, September 19, 2013 Session 3: JavaScript.
Lecture 1: Overview of Computers & Programming
The Web Warrior Guide to Web Design Technologies
Programming Class 9 LBSC 690 Information Technology.
Programming Creating programs that run on your PC
Week 5 LBSC 690 Information Technology Human-Computer Interaction.
Programming Week 9 LBSC 690 Information Technology.
Multimedia and the World Wide Web HCI 201 Lecture Notes #8B.
Web Infrastructure Week 3 INFM 603. The Key Ideas Questions Structured Programming Modular Programming Data Structures Object-Oriented Programming.
Week 11 LBSC 690 Information Technology Human Computer Interaction.
LBSC 690 Session #10 Programming, JavaScript Jimmy Lin The iSchool University of Maryland Wednesday, November 5, 2008 This work is licensed under a Creative.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Programming Week 5 LBSC 690 Information Technology.
Programming Week 5 LBSC 690 Information Technology.
LBSC 690: Session 10 Programming, JavaScript Jimmy Lin College of Information Studies University of Maryland Monday, November 12, 2007.
© Prentice Hall CHAPTER 3 Computer Software.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
Course: Introduction to Computers
SOFTWARE.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Javascript and the Web Whys and Hows of Javascript.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Topics Introduction Hardware and Software How Computers Store Data
Microsoft Visual Basic 2005: Reloaded Second Edition
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
CHAPTER FOUR COMPUTER SOFTWARE.
Interaction Design Session 12 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
1.8History of Java Java –Based on C and C++ –Originally developed in early 1991 for intelligent consumer electronic devices Market did not develop, project.
Tutorial 10 Programming with JavaScript
Chapter 1 Introduction to Computers and C++ Programming Goals: To introduce the fundamental hardware and software components of a computer system To introduce.
Visual C++ Programming: Concepts and Projects
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Interface Design Session 11 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
An Object-Oriented Approach to Programming Logic and Design Chapter 1 An Overview of Computers and Logic.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 8 Scott Marino.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Introduction  Program: Set of sequence instruction that tell the computer what to do.  Software: A collection of programs, data, and information. 
Programming Session 6 LBSC 690 Information Technology.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
“Under the hood”: Angry Birds Maze
Learning to Program D is for Digital.
CSCI-235 Micro-Computer Applications
DDC 1023 – Programming Technique
Introduction to Computers and Java
Computer Science I CSC 135.
Software Programming J. Holvikivi 2014.
Topics Introduction Hardware and Software How Computers Store Data
Week 5 LBSC 690 Information Technology
“Under the hood”: Angry Birds Maze
Understand the interaction between computer hardware and software
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Hardware is… Software is…
Presentation transcript:

Programming Week 6 LBSC 690 Information Technology

Software Software models aspects of reality –Input and output represent the state of the world –Software describes how the two are related Examples –Ballistic computations –Google –Microsoft Word

Types of Software Application programs (e.g., Powerpoint) –What you normally think of as a “program’’ Compilers and interpreters –Programs used to write other programs Operating system (e.g., Windows XP) –M anages display, CPU, memory, disk, tape, E mbedded program (e.g., BIOS) –P ermanent software inside some device

Programming Languages Used to specify every detail of the model Special purpose –Able to specify an entire class of models Spreadsheets (Excel,...) Databases (Access, Oracle,...) General purpose –Able to specify any possible model JavaScript, Java, Perl, C, C++,...

History of Programming Machine language –Language that machine can understand Assembly language –Assembler changes names to machine code High-level languages –Compiler/Interpreter translates to machine language –FORTRAN, COBOL, C, C++, Javascript Visual programming language –Visually arrange the interface components –Visual Basic, …

Machine Language Everything is a binary number –Operations –Data For instance ADD first number (21) second number (86)

Assembly Language Symbolic instruction codes and addresses –Symbolic instruction code “ADD” –Symbolic address “SUM1” For instance ADD 21, SUM1

High level Languages Procedural (modular) Programming –Group instructions into meaningful abstractions –C, Pascal, Perl Object oriented programming –Group “data” and “methods” into “objects” –Naturally represents the world around us –C++, Java, JavaScript

Object Models Represent things in the world as “objects” –Simplest objects are “variables” Represented with a name (n, teacher, …) May be assigned a value (n=4, teacher=“Doug”, …) Represent actions with “methods” –Simplest methods are “operations” Represented with a symbol (+, -, *, /, ^, …) “Classes” group objects with methods –Models how kinds of things behave Objects are instances of classes

Basic Data Types Boolean: true, false Number: 5, 9, String: “Hello World”

Operations and Assignments -xreverse the sign of x (negation) 6+5Add 6 and 5 (numeric) “Hello” + “World” Concatenate two strings 2.1 * 3 Multiply two values x++increase value of x by 1 x = 5set the value of x to be 5 x += yx = x + y x *= 5x = x * 5

Statements Simple assignment statements celsius = 5/9 * (f-32) Statements that invoke a method Temperature.toCelsius(104) Return a value from a method return celsius

Methods Reusable code for achieving a single task function toCelsius(f) { celsius = 5/9 * (f-32) return celsius }

Basic Control Structures Sequential Conditional Repetition

Sequential Control Structure a = 2 b = 3 c = a * b

Conditional Selection Control Structure if (gender == “male”) { greeting = “Hello, Sir” } else { greeting = “Hello, Madam” }

Generating Boolean Results x == y true if x and y are equal x != y true if x and y are not equal x > ytrue if x is greater than y x <= y true if x is smaller than or equal to y x && ytrue if both x and y are true x || ytrue if either x or y is true !xtrue if x is false

Repetition Control Structure Program Example 1: n = 1 while ( n <= 10) { document.writeln(n) n++ } Program 2: For (n = 1; n <= 10; n++) { document.writeln(n) }

Arrays A set of elements –For example, the number of days in each month Each element is assigned an index –A number used to refer to that element For example, x[4] is the fifth element (count from zero!) –Arrays and repetitions work naturally together

Programming for the Web Common Gateway Interface (CGI) [Server side] –Forms encode field values into a URL –CGI passes field values to a Perl program –Program generates a web page as a response JavaScript [Client-side, interpreted] –Human-readable “source code” sent to the browser –Web browser runs the program Java applets [Client-side, compiled] –Machine-readable “bytecode” sent to browser –Web browser runs the program

JavaScript My first script document.write("Hello, world!") Try it at

Handling Events Events: –actions that users perform while visiting the page –Embedded in modern GUI Use event handlers to response events –Event handlers triggered by events –Examples of event handlers in Javascript onMouseover: the mouse moved over an object onMouseout: the mouse moved off an object onClick: the user clicked on an object

Hands On: Adopt a JavaScript Program Launch a Web browser – See how it behaves if you are 13 (or 65) View source and read the program Save a local copy Make some changes and see how it works

JavaScript Resources Google “javascript” –Tutorials: to learn to write programs –Code: to do things you want to do Engineering and Physical Sciences Library –Books in locked case near circulation desk

Aural Perception We respond to sounds without prior focus –Lack of focus limits simultaneous stimuli Absolute amplitude & pitch hard to interpret –But changes stand out clearly Stereo effect provides a sense of direction –Relative amplitude, phase difference

Speech Output Replay of digitized speech clips –High fidelity, but limited vocabulary Speech Synthesis –Generate spoken output from unrestricted input Based on pronunciation rules and lists of exceptions –Sounds unnatural due to misplaced emphasis Prosody-guided speech synthesis –Use pronunciation of similar words as a guide

Auditory Display Nonspeech audio output for user interfaces Same objectives as graphical output: –Alert the user to exceptional conditions –Provide ubiquitous feedback –Present information But different characteristics –Effective even without focus –Fairly low resolution

Auditory Display Design Need a metaphor –Clock ticking, alarm bells, keyboard clicks, etc. Channel is easily overloaded –Focus helps manage cognitive load Changes are more useful than values –Pitch, amplitude, position, harmonics, etc.

An Auditory Image Display Display 2-D images using only sound –Sweep from left to right every second Audible pause and click between sweeps –Top pixels are high frequency, bottom are low Blind users can detect objects and motion –Time indicates horizontal position –Pitch indicates vertical position –Sweep-to-sweep differences indicate motion

Interactive Voice Response Systems Operate without graphical interfaces –Hands-free operation (e.g., driving) –Telephone access Built on three technologies –Speech recognition (input) –Text-to-speech (output) –Dialog management (control) Example: TellMe ( TELL)

Dialogue Management User initiative System initiative –Allows a smaller vocabulary Mixed initiative (e.g., barge in)

Interaction Design Where are you departing from? Where do you want to go? What day do you want to travel? VerificationGoodbye Wrong Confirmed Baltimore National Dulles San Francisco Oakland San Jose Anywhere else Day when there are flights Not a day Sorry Another day Anywhere else

Evaluation Measures Time to learn Speed of performance Error rate Retention over time Subjective satisfaction

Evaluation Approaches Extrinsic vs. intrinsic Formative vs. summative Human subjects vs. simulated users Deductive vs. abductive

Summary HCI design starts with user needs + abilities –Users have a wide range of both Users must understand their tools –And these tools can learn about their user! Many techniques are available –Direct manipulation, languages, menus, etc. –Choosing the right technique is important LBSC 795 in Spring 2006 has this focus