Programming. leads to programming languages. leads to operating systems

Similar documents
Programming. translate our algorithm into set of instructions machine can execute

Programming language components

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program

Where do we go from here?

Chapter 1: Why Program? Computers and Programming. Why Program?

An Introduction to Python (TEJ3M & TEJ4M)

Introduction to Programming: Variables and Objects. HORT Lecture 7 Instructor: Kranthi Varala

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

CS1500 Algorithms and Data Structures for Engineering, FALL Virgil Pavlu, Jose Annunziato,

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples


Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Introduction to C++ Programming. Adhi Harmoko S, M.Komp

Evolution of Programming Languages

Scientific Computing

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

o Counter and sentinel controlled loops o Formatting output o Type casting o Top-down, stepwise refinement

Programming Languages and Program Development

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

Exam 1. CSI 201: Computer Science 1 Fall 2018 Professors: Shaun Ramsey

CSI32 Object-Oriented Programming

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program?

Lecture 01 & 02 Computer Programming

Unit 1 : Principles of object oriented programming

9/7/17. Outline. Name, Scope and Binding. Names. Introduction. Names (continued) Names (continued) In Text: Chapter 5

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Software Development. Integrated Software Environment

Chapter 1: Introduction to Computers and Programming

COS 109 Final Exam, Fall 2016

What is a programming language?

Homework #3 CS2255 Fall 2012

Fundamentals of Programming. By Budditha Hettige

Chapter 11 Program Development and Programming Languages

SOFTWARE ARCHITECTURE 6. LISP

1. In COMAL language programs, parameters after name of procedure must be put in A. brackets B. back-slash C. insecure data D.

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

CSI33 Data Structures

CS Introduction to Computational and Data Science. Instructor: Renzhi Cao Computer Science Department Pacific Lutheran University Spring 2017

CS252 Advanced Programming Language Principles. Prof. Tom Austin San José State University Fall 2013

1DL321: Kompilatorteknik I (Compiler Design 1) Introduction to Programming Language Design and to Compilation

Lab 2.1: Fixing a C++ program

} Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = / 2; 3. int x = 5 / ; 4. double x = 5 / 2.

C H A P T E R 1. Introduction to Computers and Programming

CHAPTER 1 Introduction to Computers and Java

WARM UP LESSONS BARE BASICS

Chapter 17 - Notes Recursion

Starting Out with C++: Early Objects, 9 th ed. (Gaddis, Walters & Muganda) Chapter 2 Introduction to C++ Chapter 2 Test 1 Key

C++ Support Classes (Data and Variables)

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Principles of Programming Languages. Lecture Outline

The American University in Cairo Department of Computer Science & Engineeringt CSCI &09 Dr. KHALIL Exam-I Fall 2009

EE 109 Lab 8a Conversion Experience

Performance Per Watt. Native code invited back from exile with the Return of the King:

1a Computers, Problem Solving!


(5-1) Object-Oriented Programming (OOP) and C++ Instructor - Andrew S. O Fallon CptS 122 (February 4, 2019) Washington State University

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo

CISC 124: Introduction To Computing Science II

Structured Programming Using C++ Lecture 2 : Introduction to the C++ Language. Dr. Amal Khalifa. Lecture Contents:

Chapter 1 INTRODUCTION

do { statements } while (condition);

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Computing Seminar Introduction Oct

Mechanization. A little bit of history. Mechanization. The old dream of mechanical computing. Jordi Cortadella Department of Computer Science

CS101 Introduction to Programming Languages and Compilers

Total 100. The American University in Cairo Computer Science & Engineering Department CSCE 106. Instructor: Final Exam Fall Section No.

1DL321: Kompilatorteknik I (Compiler Design 1)

assembler Machine Code Object Files linker Executable File

A little bit of history. Jordi Cortadella Department of Computer Science

A Tour of Language Implementation

Richard Mallion. Swift for Admins #TEAMSWIFT

CSCI 3136 Principles of Programming Languages

Programmiersprachen (Programming Languages)

Computer Programming. Basic Control Flow - Loops. Adapted from C++ for Everyone and Big C++ by Cay Horstmann, John Wiley & Sons

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End

The American University in Cairo Department of Computer Science & Engineering CSCI &09 Dr. KHALIL Exam-I Fall 2011

Review for COSC 120 8/31/2017. Review for COSC 120 Computer Systems. Review for COSC 120 Computer Structure

v.m.g.rajasekaran ramani sri sarada sakthi mat. Hr. sec. school

In the hardware module, you saw the basic execution of a program Programs are written in specific languages Each language has it s strengths and

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

CSc 372 Comparative Programming Languages

I101/B100 Problem Solving with Computers

Concepts in Programming Languages

Chapter 1. C++ Basics. Copyright 2010 Pearson Addison-Wesley. All rights reserved

Unit 14. Passing Arrays & C++ Strings

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering?

Programs are: CMPSCI 105/119/120: Programming, Flowchar<ng, and Running Program Flowcharts

Concepts of Programming Languages

Basics of Computation. PHY 604:Computational Methods in Physics and Astrophysics II

Programming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102

Chapter 8 Statement-Level Control Structure

Data Structures and Programming with C++

This watermark does not appear in the registered version - Slide 1

C and C++ I. Spring 2014 Carola Wenk

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

Transcription:

Programming it's hard to do the programming to get something done details are hard to get right, very complicated, finicky not enough skilled people to do what is needed therefore, enlist machines to do some of the work leads to programming languages it's hard to manage the resources of the computer hard to control sequences of operations in ancient times, high cost of having machine be idle therefore, enlist machines to do some of the work leads to operating systems

Evolution of programming languages 1940's: machine level use binary or equivalent notations for actual numeric values 1950's: "assembly language" names for instructions: ADD instead of 0110101, etc. names for locations: assembler keeps track of where things are in memory; translates this more humane language into machine language this is the level used in the "toy" machine needs total rewrite if moved to a different kind of CPU loop get # read a number ifzero done # no more input if number is zero add sum # add in accumulated sum store sum # store new value back in sum goto loop # read another number done load sum # print sum print stop sum 0 # sum will be 0 when program starts assembly lang program assembler binary instrs

Evolution of programming languages, 1960's "high level" languages: Fortran, Cobol, Basic write in a more natural notation, e.g., mathematical formulas a program ("compiler", "translator") converts into assembler potential disadvantage: lower efficiency in use of machine enormous advantages: accessible to much wider population of users portable: same program can be translated for different machines more efficient in programmer time sum = 0 10 read(5,*) num if (num.eq. 0) goto 20 sum = sum + num goto 10 20 write(6,*) sum stop end Fortran program compiler assembler binary instrs

Evolution of programming languages, 1970's "system programming" languages: C efficient and expressive enough to take on any programming task writing assemblers, compilers, operating systems a program ("compiler", "translator") converts into assembler enormous advantages: accessible to much wider population of programmers portable: same program can be translated for different machines faster, cheaper hardware helps make this happen #include <stdio.h> main() { int num, sum = 0; C program C compiler } while (scanf("%d", &num)!= -1 && num!= 0) sum += num; printf("%d\n", sum); assembler binary instrs

Evolution of programming languages, 1980's "object-oriented" languages: C++ better control of structure of really large programs better internal checks, organization, safety a program ("compiler", "translator") converts into assembler or C enormous advantages: portable: same program can be translated for different machines faster, cheaper hardware helps make this happen #include <iostream> main() { int num, sum = 0; } while (cin >> num && num!= 0) sum += num; cout << sum << endl;

Evolution of programming languages, 1990's "scripting", Web, component-based,...: Java, Perl, Python, Ruby, Visual Basic, Javascript,... write big programs by combining components already written often based on "virtual machine": simulated, like fancier toy computer enormous advantages: portable: same program can be translated for different machines faster, cheaper hardware helps make this happen var sum = 0; // javascript var num = prompt("enter new value, or 0 to end") while (num!= 0) { sum = sum + parseint(num) } num = prompt("enter new value, or 0 to end") alert("sum = " + sum)

Programming languages in the 21 st century? new general-purpose languages Go, Rust, Swift, Scala,... ongoing refinements / evolution of existing languages C, C++, Fortran, Cobol all have new standards in last few years specialized languages for specific application areas e.g., R for statistics old languages rarely die it costs too much to rewrite programs in a new language

Why so many programming languages? every language is a tradeoff among competing pressures reaction to perceived failings of others; personal taste notation is important "Language shapes the way we think and determines what we can think about." Benjamin Whorf the more natural and close to the problem domain, the easier it is to get the machine to do what you want higher-level languages hide differences between machines and between operating systems we can define idealized "machines" or capabilities and have a program simulate them -- "virtual machines" programming languages are another example of Turing equivalence