1 / 19

CMP 131 Introduction to Computer Programming

CMP 131 Introduction to Computer Programming. Violetta Cavalli-Sforza Week 1, Lecture 1. Course Description. Introduction to algorithms and programming What is an algorithm? What is programming? Programming philosophy How to think of a programming problem

rmaria
Download Presentation

CMP 131 Introduction to Computer Programming

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMP 131Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lecture 1 CMP 131 Introduction to Computers and Programming

  2. Course Description • Introduction to algorithms and programming • What is an algorithm? • What is programming? • Programming philosophy • How to think of a programming problem • How to plan the solution to the problem • Problem decomposition • Top-down refinement CMP 131 Introduction to Computers and Programming

  3. Course Description (2) • Using an interactive development environment (IDE) • Types of programming errors • Syntactic • Semantic • Using a structured programming language (Pascal) • What is a programming language? • What is a structured programming language? CMP 131 Introduction to Computers and Programming

  4. Course Description (3) • Main language concepts covered: • Simple data types • Numbers (integer, real) • Boolean • Characters • Strings (NOT structured/complex data types) • Input / output statements • Basic statements (assignment, conditionals, iteration/looping) CMP 131 Introduction to Computers and Programming

  5. Course Objectives • Understand basic components in a computer architecture • Appreciate the role of programming languages • Design a top-down solution for solving problems • Be familiar with an IDE • Edit, compile, debug and run short programs CMP 131 Introduction to Computers and Programming

  6. Logistics • Detailed description • Will have to wait a little bit because … • I will post it on the web, as well as assignments, etc. • Class meetings (each week): • Mon,Wed: lectures (1.5 hours each) • Thu: lab (1.5 hours) CMP 131 Introduction to Computers and Programming

  7. Assessments • Exams (50%) • midterm (7th week) – 20% • final (end of course) – 30% • Quizzes (30%) • measure progress • every 2 weeks • Homework (10%) … will say more • Participation (10%) • attendance • will I remember who you are? CMP 131 Introduction to Computers and Programming

  8. Homework • Initially not programming, but thinking about programs • Small programs, 1 or more, depending on the complexity • Frequently assigned (each week) • Like a language, you need frequent practice • Do not wait until the last moment to work on your program CMP 131 Introduction to Computers and Programming

  9. Homework • Expect (esp. true of programming HW): • I will assign homework on Monday • I will take questions on it on Wednesday • I will help you out on Thursday during lab • You will submit it by mail on Friday • I will discuss briefly on following Monday CMP 131 Introduction to Computers and Programming

  10. Computers CMP 131 Introduction to Computers and Programming

  11. What is a computer? • Computer • one that computes (Webster’s dictionary) • In other languages: • French: ordinateur (from “order”) • Italian: cervello elettronico (“electronic brain”) • Other? • Computer: a programmable device that can store, retrieve and process data. CMP 131 Introduction to Computers and Programming

  12. What’s in a Computer? • Hardware: • The actual physical machine • Consists of several hardware devices • Software: • The programs that tell the machine what to do, i.e. give instructions to the machine • Different types of programs written in different languages CMP 131 Introduction to Computers and Programming

  13. Hardware Devices • Input: • Keyboard • Mouse, Touchpad, Joystick • Pen & tablet, Perforated cards • Output: • Printer • Screen (monitor) • Teletype • Input & Output: • Auxiliary Devices: • disks (hard disk, floppies, DVDs/CDs, USB keys, Flash memories) • tape drives • Touch screen • Network cards (intranet, internet) CMP 131 Introduction to Computers and Programming

  14. Hardware Devices (2) • Memory • Permanent: Disks & other I/O devices • Volatile: Main memory, Graphic memories • Virtual Main memory is like a very large set of mailboxes, each with its own address. It stores data encoded as binary numbers. CMP 131 Introduction to Computers and Programming

  15. Hardware Devices (3) • Central Processing Unit(s) • One or more • A CPU contains • Arithmetic Logic Unit (ALU) • A Control Unit: controls the actions of other components • Special Floating Point processors • The CPU controls just about everything else by executing instructions • stores data in memory • retrieves data from memory • performs computations • sends and gets data from other devices CMP 131 Introduction to Computers and Programming

  16. Hardware Devices (3) • Bus: A group of wires through which the other devices communicate. I/O devices are controlled by drivers, which are very specialized kinds of programs CMP 131 Introduction to Computers and Programming

  17. Computers through Time • Vacuum tubes • Mainframe computers (IBM) • Mini computers (DEC) • Micro computers (IBM, NEC, MacIntosh) • Desktops • Laptops • Blackberry • Supercomputers CMP 131 Introduction to Computers and Programming

  18. Hardware Trends • Every year or two computer power approximately doubles • Memory size (RAM) • Memory used to execute programs • Secondarystorage (permanent storage) • E.g. disk storage, used to to hold programs and data over time • Processor speeds • Speed at which computers execute their programs CMP 131 Introduction to Computers and Programming

  19. Hardware/Software Trends • Applications: • Rapidly increasing hardware power allows applications to get bigger and more complex • Costs • Hardware costs dropping • Software development costs rising • Software development complexity • Programmer salaries • Cost of slipping schedules • Unanticipated interactions in complex systems • Unpredictability of software development times CMP 131 Introduction to Computers and Programming

More Related