Welcome to CS120 Fall 2012 1 John Magee

Slides:



Advertisements
Similar presentations
Introduction to Alice Alice is named in honor of
Advertisements

Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Chapter Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing Describe.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Computers: Tools for an Information Age
Introduction to Alice Basics : What is Alice? Object Oriented Definitions What Does it Look Like? Where Can I Use it?
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Introduction to Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland.
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Chapter 01 Nell Dale & John Lewis.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Introduction COMP104: Fundamentals and Methodology.
CSE 1340 Introduction to Computing Concepts Class 2.
Introduction CSE 1310 – Introduction to Computers and Programming
Programming Logic Program Design. Objectives Steps in program development Algorithms and Pseudocode Data Activity: Alice program.
1.1 1 Introduction Foundations of Computer Science  Cengage Learning.
Topics Introduction Hardware and Software How Computers Store Data
Computer Hardware and Software Chapter 1. Overview Brief History of Computers Hardware of a Computer Binary and Hexadecimal Numbers Compiling vs. Interpreting.
CSC1401: Introductory Programming Steve Cooper
4 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
Copyright © 2012 Pearson Education, Inc. Chapter 1 Introduction to Computing and Programming.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
Chapter 1 The Big Picture.
Chapters 7, 8, & 9 Quiz 3 Review 1. 2 Algorithms Algorithm A set of unambiguous instructions for solving a problem or subproblem in a finite amount of.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
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
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 1: Introduction.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Introduction to Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland Slides Credit: Joel Adams, Alice in Action CS120 Lecture August,
Alice and Algorithms Chapter 1 Part Reasons to Program The joy of programming To create a tool To use your creativity abilities For non programmers.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Chapter 1 : Overview of Computer and Programming By Suraya Alias
CSC 1010 Programming for All Lecture 1 Some material courtesy of Python for Informatics: Exploring Information (
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Installing Java on a Home machine For Windows Users: Download/Install: Go to downloads html.
A computer contains two major sets of tools, software and hardware. Software is generally divided into Systems software and Applications software. Systems.
Chapter 4 Software. Introduction Program: is a set of sequence instructions that tell the computer what to do. Software: is a collection of programs,
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Chapter 1 An Overview of Computers and Programming Languages.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Alice in Action with Java Chapter 1 Getting Started with Alice.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Topics Introduction Hardware and Software How Computers Store Data
CSCI-235 Micro-Computer Applications
Introduction CSE 1310 – Introduction to Computers and Programming
Programming COMP104: Fundamentals and Methodology Introduction.
CS190/295 Programming in Python for Life Sciences: Lecture 1
Alice in Action with Java
Topics Introduction Hardware and Software How Computers Store Data
Chapter 1 Introduction(1.1)
CMP 131 Introduction to Computer Programming
Programming.
15-110: Principles of Computing
Presentation transcript:

Welcome to CS120 Fall John Magee

Welcome to CS120 Computing is ubiquitous Computing is ubiquitous –Daily life, news, eCommerce… –Sciences and engineering fields –Social sciences, humanity, –Arts, music, sports –Education –…

Computing One core objective of computing is efficient problem solving One core objective of computing is efficient problem solving Computing shares common methodologies with other fields Computing shares common methodologies with other fields Given a problem, how to –Understand it, formulate it, make hypotheses…  Many computing problems come from other fields –Design a solution  strategies for big problems, such as divide and conquer –Implement a solution  Should be done in a systematic, disciplined fashion –Test a solution –Revise, improve…

CS120 Object-oriented programming Object-oriented programming Graphics/animation-based problems Graphics/animation-based problems Alice: A 3D animation language Alice: A 3D animation language Java: an Eventful Approach Java: an Eventful Approach Main topics Main topics –Methods –Variables and functions –Control structures –Lists and Arrays –Events –Classes

Why Learn Programming? – –Programming is a challenging and intellectually engaging experience. – –Programming is a part of computer science, and is therefore important to anyone interested in becoming a computer professional. 5

Why Learn Programming? – –Computers have become commonplace in our society, and understanding their strengths and limitations requires an understanding of programming. – –Programming can be a lot of fun. – –Programming is a skill that can pay the bills. Very well. 6

About Learning to Program Pre-requisites This is a first course in computer science. There are no formal pre-requisites. Some informal pre-req’s: – –using , browsing the web – –copying and pasting text – –some high-school level algebra Time Anyone can be successful at learning programming. Decent results, however, take a lot of time. 7

How do we get there? 8 9 Lectures Teaching Labs Weekly Homeworks Projects Midterm Written Exam and Practical Exam

Expectations 9 9 Attendance This is not a correspondence course. Participation Questions and discussion are what makes the class interesting.

Administrative Questions? 10 9

What You’ll Learn Today –What is computer science? –What is a computer? –What are hardware and software? –How can computers learn new tricks? –What is Programming? 11

What is Computer Science? 12

What is CS? The fundamental ideas of CS are: –Algorithms –Protocols –Encoding Information –Abstraction 13

Flashlight Messaging Imagine you are 10 years old, in Your best friend lives next door. You want to send messages at night. You each have a flashlight. What do you do? 14

ABC means (Meet me at Starbucks) 15

Numbered Code Replace each character with a number… Coded Message Example: Encoding is about converting data into a coded form. Decoding is about converting from coded to normal form. 16

Algorithm An algorithm is a sequence of clear and precise step-by-step instructions for solving a problem in a finite amount of time. 17

Protocols A protocol is a set of rules governing the exchange or transmission of data between devices. 18

The Braille Encoding Scheme Each character is up to 6 dots. Each dot is either on or off. Invented by Louis Braille ( ). 19

What are we looking at? 20

No, this is the matrix! 21

What is this? 22

23 Your web browser interprets the coded data (1s and 0s) and renders the Facebook webpage.

Abstraction Abstraction is about hiding unnecessary details and retaining only the relevant information. Eg. Eg. “Tie your shoe” “Drive a car” 24

Encoding/Decoding The binary coded data (1s and 0s) is what your web browser interprets as the Facebook webpage. How? The digital computer is a machine which encodes, processes, and decodes data. 25

Data and Information Data is a fact pattern: Information is how we interpret that pattern: 26

What is a Computer? 27 2 What is a computer, anyway? Give some examples: A computer takes an input, applies a process, and produces an output.

What is a Computer? 28

Hardware 29 3

Software 30 3

Early History of Computing 31 Joseph Jacquard (1801) Jacquard’s Loom, the punched card

Harvard Mark I 32 IBM Archives

First Computer Bug 33 Log of first computer bug, discovered by Grace Hopper, 1945 A Computer Science Pioneer, she later wrote the first Compiler.

Programmability 34 3 What tricks does your computer do? – Web browsing, , instant messenger – Play games – Watch movies, organize photos – Word processing, spreadsheets, database Programmability is the ability to give a general- purpose computer instructions so that it can perform new tasks.

Programming Languages A program is a sequence of instructions. Spock: Computer. This is a Class-A compulsory directive. Compute, to the last digit, the value of pi. Computers are not very good at understanding natural languages –Ambiguity and imprecision –Dialects, accents, etc 35

Programming Languages Computer languages are exact and unambiguous. Programming is the process of encoding our ideas for the computer: –Syntax (form) –Semantics (meaning) Popular programming languages: –BASIC, C++, Java, Perl, Python 36

Machine Language Computing hardware performs only a small set of concrete operations, which are created in circuitry: load the number from memory location 2001 into the CPU load the number from memory location 2002 into the CPU add the two numbers in the CPU store the result into location 2003 These instructions must be provided to the CPU as binary notation (1s and 0s), called machine language 37

High Level Languages Java is a high-level language c = a + b c = a + b High level languages are more natural for us to understand, but need to be translated into the machine language for execution. 38

Alice A modern programming tool A modern programming tool – 3-D graphics – 3-D models of objects Animation Animation – Objects can be made to move around the virtual world (a video game or simulation implemented in 3-D) Two kinds of animations: Two kinds of animations: –Movie: passive user watches the animation –Interactive: active user clicks on mouse, types a key on keyboard …  Actions of user are called events

Demo: Getting started Starting Alice Starting Alice Load and run a world Load and run a world – FairyCourt(movie) – HelicopterSimulation(interactive) –First program: Alice and WhiteRabbit welcome us to their world (movie)

Getting and Running Alice Alice software is freely distributed Alice software is freely distributed Downloading Alice Downloading Alice –Go to the website: –Click the link Get Alice 2.2 –Click download link specific to your operating system –Save Alice.zip (or Alice.dmg ) to your PC Installing and running Alice Installing and running Alice –Extract Alice from Alice.zip (or Alice.dmg ) file –Create desktop shortcut (alias) to Alice.exe –Double-click Alice icon to launch Alice application 41

Go through the tutorials to learn the basics of Alice 42 The Alice Tutorials (continued)

Alice Drag-and-drop based programming Drag-and-drop based programming –Major advantage: preventing syntax errors –Limitations  Restricted editing  Restricted reusing –Statement resusable within a method (but not statements) –Clipboards available for copying and pasting statements between methods of a class (but not all statements) –Saving a object (with newly defined methods) as a class for using in other worlds  Objects need to be pre-created (inconv. for arrays)

User Stories Contain Contain –Basic description of what happens when program runs –Nouns in story (Alice, the White Rabbit) correspond to objects –Verbs correspond to actions, responses to messages –Chronological flow describes the sequence of the actions When the program begins, Alice and the White Rabbit are facing each other, Alice on the left and the White Rabbit on the right. Alice turns her head and then greets us. The White Rabbit also turns and then greets us. Alice and the White Rabbit introduce themselves. Simultaneously, Alice and the White Rabbit say “Welcome to our world.” When the program begins, Alice and the White Rabbit are facing each other, Alice on the left and the White Rabbit on the right. Alice turns her head and then greets us. The White Rabbit also turns and then greets us. Alice and the White Rabbit introduce themselves. Simultaneously, Alice and the White Rabbit say “Welcome to our world.” Alice in Action with Java44

User Story and Story Board A numbered sequence of objects and actions 1. Alice turns her head toward the user 2. Alice greets the user 3. The white rabbit turns toward the user 4. The white rabbit greets the user 5. Alice introduces herself 6. The white rabbit introduces himself 7. Simultaneously, Alice and the white rabbit say “Welcome to our world.” Alice in Action with Java45

Program Design For a given user story For a given user story –plan scents and shots  Scene: a piece of the story usually set in one location  Shot: part of scene told with camera in one position –Create storyboards Alice in Action with Java46

Topics in CS120 Eventful Java (tentative) Eventful Java (tentative) –Events –Primitive types –Control Structures –Classes –Arrays –(Animation ?)

What You Learned Today –Computer Science is… –A Computer is…  Hardware vs. Software  Programmability –Programming Languages  Machine language vs. high level –Introducing Alice and Java 48

Announcements and To Do List –Visit the course web page –Download Alice 2.2  Do the tutorials –Readings:  Alice in Action, Chapter 1 49