There are only 10 types of people in the world, those who understand binary and those who don't.

Slides:



Advertisements
Similar presentations
© Peter Andreae What is Programming About COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
Advertisements

CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
Creating Computer Programs lesson 27. This lesson includes the following sections: What is a Computer Program? How Programs Solve Problems Two Approaches:
Game Programming and Scratch (Lecture 1) Game Programming and Design Brooklyn College Bridges To Computing.
Overview of Programming Paradigms
Chapter 3.2 C++, Java, and Scripting Languages. 2 C++ C used to be the most popular language for games Today, C++ is the language of choice for game development.
The Analytical Engine Module 6 Program Translation.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
(An Introduction for Programmers)
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
By: Felegh Solomon ITEC SPRING 2013 CHAPTER 4: KEY CONSTRUCTION DECISIONS.
Binary There are only 10 types of people in the world, those who understand binary and those who don't.
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Chapter 1. Introduction.
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
CS101 Introduction to Computing Lecture Programming Languages.
Programming History. Who was the first programmer?
Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited.
Computer Concepts 2014 Chapter 12 Computer Programming.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
National Diploma Unit 4 Introduction to Software Development Introduction to Programming Languages.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Game Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer, J. Rodney.
Chapter One An Introduction to Programming and Visual Basic.
Programming Languages
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
Programming and Languages Dept. of Computer and Information Science IUPUI.
Introduction to Programming Using Scratch Brooklyn College Bridges To Computing (2009) M. Meyer.
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Chapter 1: Introduction to Computers and Programming.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
HIGH-LEVEL LANGUAGE PROGRAMMING PARADIGMS. Programming languages come in many forms or 'paradigms'. Each form of language offers advantages over other.
High-level language programming paradigms. Programming languages come in many forms or 'paradigms'. Each form of language offers advantages over other.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Programming Language Basics. What is a Programming Language? “A computer, human-created language used to write instructions for a computer.” “An artificial.
Introduction to Programming in C++ Seventh Edition Chapter 1: An Introduction to Programming.
Chapter 1. Introduction.
Programming Languages 2nd edition Tucker and Noonan
The language focusses on ease of use
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Why study programming languages?
Basic 1964 PC general purpose Imperative Small Easy to use.
CSCI-235 Micro-Computer Applications
Introduction of Programming Languages
CS101 Introduction to Computing Lecture 19 Programming Languages
Introduction to Programming Using Scratch
Developing Applications
Computer Programming.
Introduction to Computers and Python
Programming Languages 2nd edition Tucker and Noonan
CS105 Introduction to Computer Concepts Intro to programming
Programming Language Basics
and Program Development
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Tonga Institute of Higher Education IT 141: Information Systems
An Introduction to Programming with C++ Fifth Edition
Tonga Institute of Higher Education IT 141: Information Systems
What is Programming Language
CS105 Introduction to Computer Concepts Intro to programming
Presentation transcript:

There are only 10 types of people in the world, those who understand binary and those who don't.

Introduction to Programming Languages CISC 1600 Brooklyn College

Content 1.Languages 1.Defined 2.Syntax & Semantics 2.Computer Languages 1.Binary & Assembly 2.Compilers & Interpreters 3.Programming vs. Scripting Languages 3.Paradigms 1.Common Paradigms 2.Imperative 3.Procedural 4.Object-Oriented 4.Examples 1.Scratch 2.Processing 3.C++ 4.JavaScript

(1.1) Languages For our purposes: A language is a structured means of information exchange. Spoken languages (English, Chinese) Written languages (Arabic, Latin) Visual languages (ASL, QE) Tactile languages (Braille)

(1.2) Syntax & Semantics All languages, to be useful and reliable, must have a well defined syntax and semantics. Syntax: The structure and punctuation of the language Semantics: The meaning of objects (words) and combination of objects in the language.

(2.1) Computer Languages At the lowest level computers are exchanging information in binary format (0,1). Combination's of 0's and 1's can have different meanings though, depending on the "encoding scheme" (language) being used. Assembly -> > (Use register 9) ASCI -> > (Tab character)

(2.2) Compilers & Interpreters Having to write everything out in binary would be both difficult and time consuming. Compilers and Interpreters are programs that can take code written in other "high-level" languages and convert that code to the 0's and 1's (the binary) that a machine will actually understand. High level languages (like C/++/#, Java, Scratch, Robolab, PHP, Python) combined with compilers and interpreters allow humans to write using the alpha/numeric characters (abc, 123) that they are already familiar with.

(2.3) Programming Languages vs. Scripting Languages All programming languages: Allow us to "talk" to a computer, in a language that we can understand. Require a well-defined syntax and semantics. Allow us reuse and share code (functions and libraries) which can't be done with "embedded" programs. For our purposes a full strength "programming language" is a language that provides some means for the programmer to talk directly to a computers hardware. A "scripting language" by contrast only allows the programmer to create code that will talk to another existing program or application.

(3) Paradigms - 1 Some spoken/written languages have a very similar syntax and semantics. An example are the "romance languages" of Spanish, Portuguese, French, Italian, Romanian, Catalan. If you know one of these languages already, it is considered much easier to learn one of the others. Likewise some programming languages have similar syntax and semantics. But more important than the syntax and semantics, when learning a new programming language, is whether or not the new programming language belongs to a "programming paradigm" that you already know.

(3) Paradigms -2 A paradigm is a structured approach to solving a problem. When we are writing a program, we aren’t just trying to "communicate" to with the computer, we are trying to get the computer to accomplish a specific task. Programming paradigms are organized approaches to solving the problem of how to get a computer to accomplish a task.

(3) Paradigms -3 There are hundreds of programming paradigms. Some famous paradigms are: Functional o Views program as a mathematical equation o Examples: Haskel Logical o Views a program as a logic puzzle o Examples: Prolog Imperative o Views a program as a "smart" list o Examples: COBOL, BASIC, Fortran, Ada, C, C++, C#, D, Visual Basic, Java, Python, Perl, PHP, Ruby, Scratch, Robolab, Processing and AS3 to name just a few.

(3) Paradigms -4 The advantage to learning about programming paradigms is that once you understand a particular paradigm it is easier to learn new programming languages that use that same paradigm. 3-paradigms will be very important to you in this class: 1.Imperative A program as a "Smart List" 2.Procedural "Sending messages" 3.Object-Oriented A program as set of interacting objects Objects have facts (properties) and functions (procedures) Objects are created from templates or patterns (classes)

(3.1) Imperative Programming The imperative paradigm views a program as a "list" of things to do. You might want to remember it as a "smart list". Imperative languages need 3 things: 1.Sequence -> A predefined order in which to process information. 2.Selection -> The ability to make a choice. The "IF" statement. 3.Repetition -> The ability to repeat an action. The "WHILE" statement.

(3.2) Procedural Programming The procedural programming paradigm is based upon the concept of the “procedure call”: the ability to “send a message” to another section of a program. Procedural programming allows us to create sections of code that can be reused over and over. We can give a complex section of code a name and if we need that code in the future, we can simply use the name (instead of retyping the same code, over and over). Types of procedural calls: Function Calls Message Passing Event Handlers RPC Calls, REST, etc.

(3.3) Object-Oriented Programming Basic Concepts: 1.Visualize a program as a set of interacting objects (easy to do with games). 2.Identify the associated facts and functions of these objects. Properties: Where is it? Procedures: What can it do? 3.Create templates/patterns (classes) for these objects that can be reused. Game-Object -> Enemy ship, and player ship. Bullet Class -> Create LOTS of bullets

Review What language(s) are you working with in this class? How does that language(s) implement the following: Imperative Paradigm ("the smart list") 1.Sequence 2.Selection 3.Repetition Procedural Paradigm ("sending messages") o What message passing and/or function creating abilities exist. Object Oriented Paradigm ("interacting objects") o What templates (classes) for objects exist? o What are the properties & procedures or those classes?

Examples