 Administration  Computers  Software  John Edgar3.

Slides:



Advertisements
Similar presentations
Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 1 Engineering Problem Solving.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
CMPT 120 Introduction to Computer Science and Programming I Chris Schmidt.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Introduction to Computers and Programming
Introduction to Programming (in C++) Introduction Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
CS102 Introduction to Computer Programming
Computer Programming-1 CSC 111 Chapter 1 : Introduction.
1 Chapter-01 Introduction to Computers and C++ Programming.
The Study of Computer Science Chapter 0 Intro to Computer Science CS1510, Section 2.
Introduction CSE 1310 – Introduction to Computers and Programming
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
1.1 1 Introduction Foundations of Computer Science  Cengage Learning.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Chapter 1 Engineering Problem Solving 1. Hardware and Software 2 A computer is a machine designed to perform operations specified with a set of instructions.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
The Study of Computer Science Chapter 0 Intro to Computer Science CS1510.
Lesson 1b: Computer Systems and Program Development CPS118.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
1 8/29/05CS150 Introduction to Computer Science 1 Professor: Shereen Khoja
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
COMPUTER PROGRAMMING. Computer programming the objective of the module to gain the necessary skills to develop a computer program using one of the high.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Computing Systems & Programming ECE Fundamental Concepts Chapter 1 Engineering Problem Solving.
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Programming and Languages Dept. of Computer and Information Science IUPUI.
Chapter 1 Introduction. Components of a Computer CPU (central processing unit) Executing instructions –Carrying out arithmetic and logical operations.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
Course Instructor: Hira Farman Course : BY:HIRA FARMAN.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Ch 1 - Introduction to Computers and Programming Hardware Terminology Main Memory Auxiliary Memory Drives Writing Algorithms Using Pseudocode Programming.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
CS 177 Recitation Week 1 – Intro to Java. Questions?
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Introduction to Computer Programming using Fortran 77.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
The Study of Computer Science Chapter 0
Engineering Problem Solving With C An Object Based Approach
CSCI-235 Micro-Computer Applications
Computer System and Programming
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
The Study of Computer Science Chapter 0
Introduction CSE 1310 – Introduction to Computers and Programming
CS190/295 Programming in Python for Life Sciences: Lecture 1
The Study of Computer Science
Computer Science I CSC 135.
Programming.
The Study of Computer Science
Principles of Programming Languages
The Study of Computer Science Chapter 0
ICS103 Programming in C 1: Overview of Computers And Programming
Course Curriculum – Computer Programming
Presentation transcript:

 Administration  Computers  Software

 John Edgar3

 Come to class  Read ahead  Attend the labs  And ask questions if you need help  Complete the assignments  You get marks for them, and  You learn to program by programming  Ask questions

 Programming in C  Problem solving, fundamental algorithms  Elementary data structures  Software design  Algorithms John Edgar5

 Assignments and Labs – 30%  Midterm exam in class – 25%  Final exam – 45% John Edgar7

 Labs are every week  Except for the first week  Labs are assessed  0.5% for each lab  But they are not exams – we want you to learn how to program – so ask for help!  Some labs may be open labs to get help with assignments

 There will be a number of programming assignments, 4 or 5  They must be submitted on the Computing Science submission server  They must be completed on your own unless specified otherwise by the instructor (me)

 Read the policypolicy  Section (e) forbids  Cheating in assignments, projects, examinations or other forms of evaluation by: i.using, or attempting to use, another student’s answers; ii.providing answers to other students; iii.failing to take reasonable measures to protect answers from use by other students; or iv.in the case of students who study together, submitting identical or virtually identical assignments for evaluation unless permitted by the course Instructor or supervisor.

IIt's cheating … BBecause we may catch you and then YYou get zero on your assignment YYou get a letter on your file ▪A▪And if you keep doing it ▪Y▪You get chucked out of SFU YYou won't learn how to program in C BBecause you won't learn how to program in C you are far more likely to fail the final exam

And Computing Science

 Computers come in many shapes and sizes  Desktops  Laptops  Phones  Specialized systems ▪ Brakes ▪ Toasters  It's probably more useful to look at some characteristics of (modern) computers

Can do basic arithmetic (+, -, *, /) Can perform these arithmetical operations very fast Represents data in binary Has a large main memory that can efficiently store and retrieve data Can accept input and produce output Can be programmed Stores programs in main memory One of the characteristics of the Von Neumann architecture John Edgar14

 This course doesn't encompass philosophy  Do computers think, for example? ▪ Which leads to, what is thought?  Computers are very good at doing things that we find difficult to do  At least with any reasonable speed  But does that mean that computers are generally “smarter” than people?

 Alienware Area 51  Uses Intel Core i7   300,000 MIPS  Lots of memory!  16GB of RAM  4 TBs of storage  And it looks cool

 Human brain  Processing power estimated at 100 million MIPS  Memory estimated at 100,000 GB

It is the study of algorithms and data structures, including their formal and mathematical properties hardware realizations linguistic realizations applications John Edgar18

It is the study of algorithms and data structures, including their formal and mathematical properties What can be computed? What is the most efficient way to solve a particular problem? hardware realizations linguistic realizations applications John Edgar19

It is the study of algorithms and data structures, including their formal and mathematical properties hardware realizations What’s the structure of a CPU? How is computer memory implemented? What is the most cost-effective kind of computer hardware? linguistic realizations applications John Edgar20

It is the study of algorithms and data structures, including their formal and mathematical properties hardware realizations linguistic realizations What’s the clearest/shortest way to describe computations? What’s the best way to organize large programs? applications John Edgar21

It is the study of algorithms and data structures, including their formal and mathematical properties hardware realizations linguistic realizations applications Graphics, artificial intelligence, databases, networking, software engineering, etc. John Edgar22

 Telecommunications  Medicine  Information and Research  Entertainment  Finance  Transportation  …

 Hardware refers to computer equipment  Central Processing Unit (CPU)  Hard disk  Input devices (mouse, keyboard)  Output devices (printer, monitor)  Software refers to the programs that give computers their behaviour

 What is software?  A set of instructions for a computer  Programming therefore is telling the computer what to do  Why is programming (considered) hard?  Because we want to solve hard problems ▪ Usually things we can’t easily do by hand  And because computers are fundamentally stupid

WWe write software to tell computers how to solve a problem WWe’ve all given instructions before ▪D▪Directions to a house ▪U▪Using the microwave BBut, remember, computers are stupid TThey can’t deal with ambiguity IInstructions must be precisely defined in perfect grammar

 Though C programs are written in an English like language they are very formal  They must be written using correct syntax  They must be precise and unambiguous  A program is a sequence of instructions that must be followed step by step  Implementation of algorithms that can be processed by a computer  Each instruction must be correctly specified for the program to function as desired

A set of instructions for solving a problem Algorithms can be expressed in many different languages, for example: English A programming language (C for example), or Pseudocode John Edgar29

Input positive integers a and b Output the greatest common divisor (GCD) of a and b Algorithm Repeat until a and b are the same value: if a is greater than b: set a to a – b else: set b to b – a Return a as the answer John Edgar30 Try it when a = 91 and b = 65

26 a 91 Repeat until a and b are the same value: if a is greater than b: set a to a – b else: set b to b – a Return a as the answer b 65 Result

Every step is unambiguous Input and output are clearly defined It must be executable in a finite amount of time John Edgar32

Every step is unambiguous This is because it is going to be run by a computer that is so stupid that if it makes Homer Simpson look like Albert Einstein Input and output are clearly defined It must be executable in a finite amount of time John Edgar33

Every step is unambiguous Input and output are clearly defined Why? Like, if the, you know, stuff that you, like, want to get and the other stuff that you, well, want isn’t, uhhhm. You know, if you don’t really, like, know what you need to know, then it’s really hard to, like, figure stuff out. You know? It must be executable in a finite amount of time John Edgar34

Every step must unambiguous Input and output are clearly defined It must be executable in a finite amount of time I’ve got things to do, places to go, and programs that run forever are really dull to watch, and are just not quite as useful as ones that actually finish John Edgar35

 Analysis  What is the problem?  Design  What is the solution?  Programming  Write the program  Testing  Make sure the program works Implementation

 Correct  Reliable  Well designed  Affordable  Maintainable

 A program is written using a programming language  There are different kinds of languages  Machine language  Assembly language  High level languages ▪ C, C++, Lisp, Python, Java, Fortran, Perl, …

 Machine language is so called because it can be processed directly by a computer  A program is a sequence of instructions  Each instruction code is represented by a number  Each number is represented in binary  Machine languages are very hard for humans to write and understand

 Assembly languages are human readable versions of machine code  Numeric codes are replaced by simple strings  It is simple to convert an assembly language program into machine code

 Assembly language is made up of very low level instructions  Simply adding two number may require four or five separate operations!  High level languages are much easier to write and understand  Although their compilers are more complex  C is a high-level language

 C is a high level programming language  It can be compiled into machine code  And executed on a computer  Programming languages are formal and lack the richness of human languages  If a program is nearly, but not quite syntactically correct then it will not compile  The compiler will not “figure it out”

 Create in 1972 by Dennis Ritchie of Bell Labs  When he and Ken Thompson were designing Unix ▪ Developed from Thompson’s B language  Developed to be used as a tool for programmers  Working on low level system programs

 Efficient  Compact and runs quickly  In some ways similar to assembly language  Portable  Programs run on one system can be run with little modifications on other systems  Often used for embedded systems  Flexible  Allows programmers a lot of control

 With flexibility and freedom come the possibility of more mistakes  While compact it can be harder to learn with than more recent languages  C is not an object-oriented language  Although C++ is