Programming 1. Lecture 1 COP 3014 Fall August 28, 2018

Similar documents
Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

Programming 1 - Honors

Introduction to Java Programming

Chapter 1: Introduction to Computers and Programming

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

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

CHAPTER 1 Introduction to Computers and Java

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

Week 0: Intro to Computers and Programming. 1.1 Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components

Chapter 1 Introduction to Computers and Programming

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

Introduction. Arizona State University 1

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

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

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

Engineering Computing M1H Together Towards A Green Environment

Computer Principles and Components 1

Computer Programming-1 CSC 111. Chapter 1 : Introduction

Welcome to Computer Organization and Design Logic

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

Administration Computers Software Algorithms Programming Languages

Topic 1: Programming concepts

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

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

Computer Science & Engineering 150A Problem Solving Using Computers

From High Level to Machine Code. Compilation Overview. Computer Programs

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher

CS 536. Class Meets. Introduction to Programming Languages and Compilers. Instructor. Key Dates. Teaching Assistant. Charles N. Fischer.

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

CS240: Programming in C

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

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

Compiling and Interpreting Programming. Overview of Compilers and Interpreters

Computing and compilers

Introduction to Basis and Practice in Programming

Chris Riesbeck, Fall Introduction to Computer Systems

0 Introduction: Computer systems and program development

Welcome to Solving Problems with Computers I

Introduction to Computer Systems

Introduction to Computer Programming for Non-Majors CSC 2301, Fall The Department of Computer Science

SCSP Programming Technique C

Fundamentals of Programming. Lecture 1: Introduction to C Programming

C++ Programming Language Lecture 1 Introduction

An Introduc+on to Computers and Java CSC 121 Spring 2017 Howard Rosenthal

Welcome to Computer Organization and Design Logic CS 64: Computer Organization and Design Logic Lecture #1 Winter 2018

Computer Fundamentals

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen

ECE 3574: Applied Software Design

CSI31 Introduction to Computer Programming I. Dr. Sharon Persinger Fall

Introduction to Computer Systems

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

Basic Concepts COE 205. Computer Organization and Assembly Language Dr. Aiman El-Maleh

Fundamentals of Programming (Python) Basic Concepts. Ali Taheri Sharif University of Technology Spring 2018

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine

The Programming Process Summer 2010 Margaret Reid-Miller

CS 241 Data Organization. August 21, 2018

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

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Computer Architecture 2/26/01 Lecture #

Data Structures and Algorithms

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

The Computer System. Hardware = Physical Computer. Software = Computer Programs. People = End Users & Programmers. people

An Introduction to Python (TEJ3M & TEJ4M)

CompSci 125 Lecture 02

Lecture 1: Preliminaries

CS 3030 Scripting Languages Syllabus

CS150 Introduction to Computer Science 1. What is CS150? Who Are We? CS150 is a programming course You will learn

COMP163. Introduction to Computer Programming. Introduction and Overview of the Hardware

Chapter 1 Introduction to Computers and C++ Programming

CSC116: Introduction to Computing - Java

INTRODUCTION TO THE COURSE

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

CMPE 152 Compiler Design

Programming: detailed instructions which tell the computer hardware what to do aka software Computer Science: the study NOT of computers, but of what

CSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers

CS415 Compilers Overview of the Course. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Why Study Assembly Language?

CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I

CSC116: Introduction to Computing - Java

Chapter 1 - An Introduction to Computers and Problem Solving

Computers and programming languages introduction

CS187 - Science Gateway Seminar for CS and Math

Programming II (CS300)

2/15/2008. Announcements. Programming. Instruction Execution Engines. Following Instructions. Instruction Execution Engines. Anatomy of a Computer

CSC116: Introduction to Computing - Java

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007

Introduction to Computer Programming for Non-Majors

Java and Software Design

Terminology & Basic Concepts

General Course Information. Catalogue Description. Objectives

EECE 321: Computer Organization

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Transcription:

Programming 1 Lecture 1 COP 3014 Fall 2018 August 28, 2018

Programming I - Course Information Instructor: Sharanya Jayaraman PhD Candidate in Computer Science Research Interests: High Performance Computing, Numerical Methods, Computer Architecture Other Interests: Movies, Food, Spongebob

Programming I - Course Information Teaching Assistant: Arthur Karapateas Graduate Student, ACM President Research Interests: Machine/Deep Learning, Computer Architecture, Game Design Other Interests: Orchaestral/Symphonic Music, Videogames, and Movies. Also World Domination.

Programming I - Course Information Teaching Assistant: Greg Kondyukov Graduate Student, All round genius Research Interests: Machine/Deep Learning, Computer Architecture Other Interests: Baking, Memes, Irony, null, null, null, 500 Internal Server Error

Programming I - Course Information Teaching Assistant: Andrew Florial CS major, Bloomberg Intern Interests: Machine learning applied to drug discovery and nanoparticle carriers.

Programming I - Course Information Teaching Assistant: Bowen Li Graduate Student Interests: Data Mining, Generic Programming

Course Expectations This is a hard class While this class is required for several majors as a capstone, it is also an introductory class for CS majors. You have signed up to learn programming in C++. At the end of the course, you should be a competent entry-level C++ programmer. However, this involves a lot of

Course Expectations Effort! Programming is a skill. Almost anyone can be trained to do it well. You need to devote time outside class to practice. Practice is the only way to better yourself as a programmer.

Course Expectations Reading Please read through the entire write-up a couple of times to understand the requirements before asking questions. Most of the assignments/ problem statements will be long. Jumping the gun without reading the whole thing could be detrimental.

Course Expectations Basic Arithmetic I You will not be allowed calculators for the test. However, you will be expected to do some very basic math operations on your tests. I You are being forewarned. Math is not scary.

Course Expectations Start Early! You will be given a week to 10 days for homeworks. Please start early. You need that amount of time to complete them.

Course Expectations Attendance The class is very incremental. So, skipping a few classes will get you into trouble. You are expected to attend class. While we understand that sometimes, circumstances result in missing a couple of classes, missing quite a few classes is not condoned.

Course Expectations Retention I The class is very incremental. Material introduced in one class will be applied through the rest of the course. Retaining material is important. There is no modularization of material. I Please make sure you understand a concept before we move on to the next. We are ok with repeating material.

Course Expectations Ask for help! The instructor and the TA s are available to help. Please do not hesitate to ask for help. We are willing to work with you to ensure you are learning the material. However, this requires that you start the assignments early.

Academic Honor Code Of late, we have been having a lot of issues with violations of the Academic Honor Code. Since this is your first programming class, the rules might be a bit ambiguous. We will try to clear up any confusion here. What is allowed: Asking the instructor of TA for help Discussing concepts in general, discussing the concepts used in an assignment. Getting a tutor to help you with concepts and ideas. If you have a question about what counts as a violation to the honor code, please ask the instructor or the TA s.

Academic Honor Code This is a list (inexhaustive) of things that violate the Academic Honor Code Copying another person s solution (changing variable names won t help). Giving another person your solution. Telling another person how to solve the problem. Hiring a tutor to solve the problem for you. Asking friends/family to solve the problem for you. Copying solutions from the internet. Hiring people on the Internet (including websites like chegg) to solve the problem for you. Turning in older solutions if you re repeating the class. Working with another student (collaboration).

We have technology!

Main Components of a computer CPU - Central Processing Unit: The brain of the computer. ISA - Instruction Set Architecture: the specific set of low-level instructions available to a CPU. Differs for various CPU types (Intel Pentium, Mac G4, etc). ALU - Arithmetic & Logic Unit responsible for performing arithmetic calculations, as well as logical operations (comparisons for equality, inequality, for instance). Main Memory (RAM - Random Access Memory). storage close to CPU Faster to access than hard disk stores executing programs and data being currently worked on Secondary Memory SSD, hard disk, DVD, etc.

Main Components of a computer Input devices mouse, keyboard, scanner, network card, etc. Output devices screen/console, printer, network card, etc. Operating System Examples: Mac OS, Windows 10, Linux Controls computer operations Manages allocation of resources for currently running applications

Memory Concepts bit: a binary digit Stores the value 0 or 1 Smallest unit of storage in a computer byte: 8 bits Smallest addressable unit of storage in a computer Storage units (variables) in a program are 1 or more bytes Each byte in memory has an address (a number that identifies the location)

Programming, and Programming Languages Program - a set of instructions for a computer to execute Evolution of Programming languages Machine Language Based on machine s core instruction set Needed by computer, hard for humans to read (1 s and 0 s) Example: 1110110101010110001101010

Programming, and Programming Languages Assembly Language translation of machine instructions to symbols, slightly easier for humans to read Example: ADD $R1, $R2, $R3

Programming, and Programming Languages High-level procedural languages Abstraction of concepts into more human-readable terms Closer to natural language (i.e. what we speak) Easy to write and design, but must be translated for computer Examples include C, Pascal, Fortran Object-oriented languages Abstraction taken farther than procedural languages Objects model real-world objects, not only storing data (attributes), but having inherent behaviors (operations, functions) Easier to design and write good, portable, maintainable code Examples include Smalltalk, C++, Java

Code Translation Bridging the gap between high-level code and machine code Interpreted languages source code is directly run on an interpreter, a program that runs the code statements Compiled Languages A compiler program translates source code (what the programmer writes) to machine language (object code) A linker program puts various object code files together into an executable program (or other target type, like a DLL) C and C++ are compiled languages

Software Development Involves more than just writing code

Software Development Analysis and problem definition Design - includes design of program or system structure, algorithms, user-interfaces, and more Implementation (coding) Testing - can be done during design, during implementation, and after implementation Maintenance - usually the major cost of a software system. Not part of development, but definitely part of the software life cycle

Programming is about Problem Solving

Programming is about Problem Solving Algorithm - a finite sequence of steps to perform a specific task To solve a problem, you have to come up with the necessary step-by-step process before you can code it This is often the trickiest part of programming Some useful tools and techniques for formulating an algorithm Top-down Refinement: Decomposing a task into smaller and simpler steps, then breaking down each step into smaller steps, etc Pseudocode: Writing algorithms informally in a mixture of natural language and general types of code statements Flowcharting: If you can visualize it, it s often easier to follow and understand!

Programming is about Problem Solving Testing - algorithms must also be tested! Does it do what is required? Does it handle all possible situations? Syntax vs. Semantics Syntax the grammar of a language. A syntax error: I is a programmer. Semantics the meaning of language constructs Correct syntax, but a semantic error: The headphones ate the tree.

Basic Creation and Execution of a C++ program Create source code with a text editor, store to disk. Source code is just a plain text file, usually given a filename extension to identify the programming language (like.c for C, or.cpp for C++) Preprocessor Part of compiler process, performs any pre-processing tasks on source code. Compilation syntax checking, creation of object code. Object code is the machine code translation of the source code. Linking Final stage of the creation of an executable program. Linking of object code files together with any necessary libraries (also already compiled). Execution of program Program loaded into memory, usually RAM CPU executes code instructions

Software Required for the Class The recommended software is JetBrains CLiom You can find it at https://www.jetbrains.com/clion/buy. Under the Discounted and Complementary Licenses tab, choose For Students and Teachers and apply for a free license for and All Products Pack. You will get an email from JetBrains. Follow along with the instructions and you will be asked to create a JetBrains account. Upon doing that, you will get a key. You can then Download and Install CLion. Please follow the HowToCLion document on the Software page of the course website for instructions on installing and using the software. You can also use XCode, Visual Studio, etc. However, if you do so, please keep in mind that the TA s will use CLion to grade. You can also create an account on the CS department programming servers, and use a text editor and the g++ compiler to run your code.