CS 3110 Lecture 1 Course Overview

Similar documents
Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

Introduction to Nate Foster Spring 2018

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

CMSC 330: Organization of Programming Languages. Functional Programming with OCaml

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

COSE212: Programming Languages. Lecture 0 Course Overview

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims

15-411/ Compiler Design

CS 241 Data Organization using C

TA hours and labs start today. First lab is out and due next Wednesday, 1/31. Getting started lab is also out

Announcements. 1. Forms to return today after class:

CS 241 Data Organization. August 21, 2018

CS457/557 Functional Languages

Welcome to CS 135 (Winter 2018)

What Is Computer Science? The Scientific Study of Computation. Expressing or Describing

Advanced Programming Concepts. CIS 15 : Spring 2007

Introduction to Data Structures

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

To figure this out we need a more precise understanding of how ML works

CS 113: Introduction to

CMSC 132: Object-Oriented Programming II. Administrivia

Fundamentals of Computer Science CSCI 136 Syllabus Fall 2018

Compilers. Computer Science 431

To figure this out we need a more precise understanding of how ML works


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


CS Lecture 6: Map and Fold. Prof. Clarkson Fall Today s music: Selections from the soundtrack to 2001: A Space Odyssey

More Lambda Calculus and Intro to Type Systems

CS 520 Theory and Practice of Software Engineering Fall 2018

Languages and Compilers

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

Announcements. Course Staff. Course Staff. Lectures 10/19/11. CS/ENGRD 2110 Fall Instructor. Administrative Assistant

CS 4120 and 5120 are really the same course. CS 4121 (5121) is required! Outline CS 4120 / 4121 CS 5120/ = 5 & 0 = 1. Course Information

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

Welcome to CS 135 (Fall 2018) Themes of the course. Lectures. cs135/

Lecture 1: Course Introduction

Topic 1: Introduction

ECE Object-Oriented Programming using C++ and Java

AE Computer Programming for Aerospace Engineers

CS 6371: Advanced Programming Languages

Welcome to CS 241 Systems Programming at Illinois

CS 101 Computer Science I. CS1101 Computer Science I. Today 1/27/16. Spring Robert Muller Boston College. What this course is about.

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018

COMP 401 COURSE OVERVIEW

CS 432 Fall Mike Lam, Professor. Compilers. Advanced Systems Elective

CSci 4211: Data Communications and Computer Networks. Time: Monday and Wednesday 1 pm to 2:15 pm Location: Vincent Hall 16 Spring 2016, 3 Credits

CS111: Intro to Computer Science

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

1DL321: Kompilatorteknik I (Compiler Design 1)

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

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques

CSc 372. Comparative Programming Languages. 2 : Functional Programming. Department of Computer Science University of Arizona

Programming Languages and Techniques (CIS120)

COLLEGE OF DUPAGE CIS 2542 Advanced C++ with Data Structure Applications Course Syllabus

Programming Languages 2nd edition Tucker and Noonan"

Who are we? Andre Platzer Out of town the first week GHC TAs Alex Crichton, senior in CS and ECE Ian Gillis, senior in CS

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018

Welcome to CS 241 Systems Programming at Illinois

CSci 4211: Introduction to Computer Networks. Time: Monday and Wednesday 2:30 to 3:45 pm Location: Smith Hall 231 Fall 2018, 3 Credits

Introduction to Computer Systems

CIS*1500 Introduction to Programming

Programming Language Design and Implementation. Cunning Plan. Your Host For The Semester. Wes Weimer TR 9:30-10:45 MEC 214. Who Are We?

CoSci 440 SYLLABUS Programming in C++ INSTRUCTOR Mari Rettke cell SECTION : and 13345

CS 378 (Spring 2003) Linux Kernel Programming. Yongguang Zhang. Copyright 2003, Yongguang Zhang

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

Computer Science 210: Data Structures

Advanced Client-Side Web Programming CSCI 491/595 Syllabus Fall 2018

CS 4349 Lecture August 21st, 2017

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

What a lot of folks might call the class but as we ll see later, it s not entirely accurate.

CSE 336. Introduction to Programming. for Electronic Commerce. Why You Need CSE336

Course Syllabus. Programming Language Paradigms. Spring - DIS Copenhagen. Semester & Location: Elective Course - 3 credits.

CSC 172 Data Structures and Algorithms. Fall 2017 TuTh 3:25 pm 4:40 pm Aug 30- Dec 22 Hoyt Auditorium

CS383 PROGRAMMING LANGUAGES. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

Welcome to. Instructor Marc Pomplun CS 470/670. Introduction to Artificial Intelligence 1/26/2016. Spring Selectivity in Complex Scenes

CIS 3308 Web Application Programming Syllabus

Course and Contact Information. Course Description. Course Objectives

Database Concepts. CS 377: Database Systems

Lecture 1. Course Overview, Python Basics

ITT8060 Advanced Programming

Hi! My name is Sorin. Programming Languages. Why study PL? (discussion) Why study PL? Course Goals. CSE 130 : Fall 2013

Programming Languages

San José State University College of Science/Department of Computer Science CS 152, Programming Language Paradigms, Section 03/04, Fall, 2018

CSE341: Programming Languages Lecture 26 Course Victory Lap. Dan Grossman Spring 2016

CS 553: Algorithmic Language Compilers (PLDI) Graduate Students and Super Undergraduates... Logistics. Plan for Today

CS 3304 Comparative Languages. Lecture 1: Introduction

VE281 Data Structures and Algorithms. Introduction and Asymptotic Algorithm Analysis

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

CMPE/SE 135 Object-Oriented Analysis and Design

CSCI 528: OBJECT ORIENTED PROGRAMMING, Fall 2015

Data Structures and Algorithms

Haskell Review COMP360

CS 135 Lab Assignments Week 1

CSE : PARALLEL SOFTWARE TOOLS

CMSC433 - Programming Language Technologies and Paradigms. Introduction

Welcome to... CS113: Introduction to C

CS240: Programming in C

Functions. Nate Foster Spring 2018

Transcription:

CS 3110 Lecture 1 Course Overview Ramin Zabih Cornell University CS Fall 2010 www.cs.cornell.edu/courses/cs3110

Course staff Professor: Ramin Zabih Graduate TA s: Joyce Chen, Brian Liu, Dane Wallinga Undergraduate consultants: Ashir Amer, Jacob Bank, Boris Burkov, Steve Gutz, Oneek Iftikhar, Gautam Kamath, Nyk Lotocky, Katie Meusling, Lucas Waye, Greg Zecchini

Course meetings Lectures Tuesdays and Thursdays Recitation sections Mondays and Wednesdays, 2:30 and 3:35, HLS314 A third section will be added shortly, at a time that helps out the students Email to class, before Monday morning New material in lecture and section You are expected to attend both! Class participation counts

Course web site www.cs.cornell.edu/courses/cs3110 Links to lecture notes are not yet live Will appear after lecture One more reason to actually attend! Course material, homework, software, announcements

Course news group cornell.class.cs3110 This should be your default way to ask questions If you use email, no one else will benefit from the response Your classmates almost certainly want to know! But don t give out solutions Monitor the newsgroup regularly

Coursework 6 problem sets due Thursday 11:59PM PS1 will be out on Tuesday 8/31 Electronic submission via CMS Four single-person assignments, then two two-person assignments You ll have 3 weeks for the big assignments There will be checkpoints Two prelims plus a final 6 small in-lecture quizzes

Grading Roughly speaking we will follow the usual CS3110 curve (centered around a B/B+) Problem sets & exams count about the same, quizzes & participation count a little I m mostly interested in what you know at the end of the class I don t drop an assignment or exam, but I use your overall qualitative performance There is no strict numerical formula

Late policy You can hand it in until we start grading After that, no credit Be sure to save whatever you currently have done, and save frequently CMS is your friend Be certain you have submitted something, even if it isn t perfect and you are improving it If you have an emergency, talk to me or to Joyce Chen before the last second Qualitative grading algorithm!

Academic integrity Strictly enforced, and easier to check than you might think Automated tools, etc. Exams count a lot To avoid pressure, start early We try hard to encourage this Take advantage of the large veteran staff

What this course is about Programming isn t hard Programming well is very hard Huge difference among programmers (10x or more) We want you to write code that is: Reliable, efficient, readable, testable, provable, maintainable beautiful! Expand your problem-solving skills Recognize problems and map them onto the right abstractions and algorithms

Thinking versus typing The sooner you start writing code, the longer it will take you to get done A year at the lab bench will save you an hour at the library Fact: there are an infinite number of incorrect programs Corollary: the chances that small random tweaks to your code will result in the right answer are If you find yourself changing < to <= in the hopes that your code will start working, you re in trouble Lesson: think before you type!!

Rule #1 Good programmers are lazy Never write the same code twice (why?) Reuse libraries (why?) Keep interfaces small and simple (why?) Pick a language that makes it easy to write the code you need Early emphasis on speed is a disaster (why?) Rapid prototyping!

Key goal of CS3110 Master key linguistic abstractions: procedural abstraction control: iteration, recursion, pattern matching, laziness, exceptions, events encapsulation: closures, ADTs parameterization; higher-order procedures, modules Mostly in service to rule #1 Transcend individual programming languages

Other goals Exposure to software eng. techniques: modular design. unit tests, integration tests. critical code reviews. Exposure to abstract models: models for design & communication. models & techniques for proving correctness of code. models for space & time.

Choice of language This matters less than you suspect You need to be able to learn new languages This is relatively easy if you understand programming models and paradigms We will be using OCaml, a dialect of ML Why use yet another language? Not to mention an obscure one?? Main answer: OCaml programs are much easier to think about

Why OCaml? RDZ s favorite feature: OCaml makes certain common errors simply impossible More precisely, fail at compile time Early failure is very important (why?) OCaml is a functional language More on this in a second It is statically typed and type-safe Lots of bugs are caught at compile time

Imperative Programming Program uses commands (a.k.a statements) that do things to the state of the system: x = x + 1; p.next = p.next.next; Functions/methods can have side effects int wheels(vehicle v) { v.size++; return v.numw; }

Functional Style Idea: program without side effects Effect of a function is only to return a result value Program is an expression that evaluates to produce a value (e.g., 4) E.g., 2+2 Works like mathematical expressions Enables equational reasoning about programs: if x = y, replacing y with x has no effect: let x = f(0) in x+x same as f(0)+f(0)

Functional Style Binding variables to values, not changing values of existing variables No concept of x=x+1 or x++ These do nothing remotely like x++ let x = x+1 in x let rec x = x+1 in x Former assumes an existing binding for x and creates a new one (no modification of x), latter is invalid expression

Trends against imperative style Computer Program Memory Fantasy: program interacts with a single system state Interactions are reads from and writes to variables or fields. Reads and writes are very fast Side effects are instantly seen by all parts of a program Reality today: there is no single state Multicores have own caches with inconsistent copies of state Programs are spread across different cores and computers (PS5 & PS6) Side effects in one thread may not be immediately visible in another Imperative languages are a bad match to modern hardware 20

Imperative vs. functional ML: a functional programming language Encourages building code out of functions Like mathematical functions; f(x) always gives the same result No side effects: easier to reason about what happens Equational reasoning is easier A better fit to hardware, distributed and concurrent programming Functional style usable in Java, C, Becoming more important with fancy interactive UI s and with multiple cores A form of encapsulation hide the state and side effects inside a functional abstraction

Programming Languages Map Functional Imperative ML family Lisp Scheme Haskell SML OCaml C++ Object-Oriented Fortran C Perl Matlab JavaScript Java Pascal 22

Imperative vs. functional Functional languages: Higher level of abstraction Closer to specification Easier to develop robust software Imperative languages: Lower level of abstraction Often more efficient More difficult to maintain, debug More error-prone 23

Rough schedule Introduction to functional programming (6) Modular programming and functional data structures (4) Reasoning about correctness (4) Prelim 1 Imperative programming and concurrency (4) Data structures and analysis of algorithms (5) Prelim 2 Topics: memoization, streams, managed memory (5) Final exam 24