COS 333: Advanced Programming Techniques Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University 1
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 2
Introductions Lead Instructor Bob Dondero Bob 3
Introductions Teaching Assistant Jerry Yu-Chieh Wei 4
Introductions Teaching Assistant Akash Kapoor 5
Introductions Students Please sign attendance sheet Please complete survey during class 6
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 7
Course Description Course Description Advanced Programming Techniques: The practice of programming. Emphasis is on the development of real programs, writing code but also assessing tradeoffs, choosing among design alternatives, debugging and testing, and improving performance. Issues include compatibility, robustness, and reliability, while meeting specifications. Students will have the opportunity to develop skills in these areas by working on their own code and in group projects. Two 90-minute lectures. 8
Course Goal 1 Course goal 1: Three-tier programming Help you to become a (better) three-tier programmer Help you learn how to (better) develop networked apps that consist of: (1) A data management tier (2) A presentation tier (3) Application processing tier 9
Course Goal 2 Course goal 2: Software engineering Help you to become a (better) software engineer Become (more) proficient at requirements analysis, design, programming, debugging, testing, evaluation, maintenance, methodologies 10
Course Benefits Course benefits Help you to bridge the gap between the academic world of programming and the real world of software engineering Help you to get a job! 11
Course Strategy How? Lectures Assignments 4 of them ~2 weeks per assignment Project All semester Inevitably, work will intensify near end of course 12
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 13
Course Website Course website Browse to www.cs.princeton.edu Click on Academics Click on Course Schedule Click on COS333 General Information, Topics, Assignments, Project, Schedule, Policies pages 14
Lectures Lectures Slides & code available through Topics web page Suggestion: Bring hard copy of slides Hard copy of code will be distributed Lecture etiquette Please don t use electronic devices during lectures 15
Piazza Piazza http://piazza.com/class#fall2017/cos333 Use for: Issues on assignments that are of general interest and that do not reveal your work Issues on your project that are of general interest 16
Piazza Piazza etiquette Study provided material before posting question Read all (recent) Piazza threads before posting question See course Policies page for details 17
Email Email to cos333instructors@lists.cs.princeton.edu Received by all 3 instructors (only) Use for: Issues on assignments that are not of general interest Issues on assignments that involve revealing your work Issues on your project that are not of general interest 18
Email Email to an individual instructor See General Information web page for email addresses Use for: Issues that are more personal in nature 19
Office Hours Instructor office hours See General Information web page for office hours and locations Lead instructor: office hours throughout entire semester TAs: office hours in first half, team meetings in second half 20
Books Required The Practice of Programming (Kernighan & Pike) In bookstore On reserve in Eng Library 21
Books Recommended Core Java Volumes I and II (10 th edition) (Horstmann) Available as e-books through Princeton library 22
Books Recommended Python in a Nutshell (3 rd Edition) (Martelli, Ravenscroft, and Holden) Available as e-book through Princeton library 23
Books Recommended Learning PHP, MySQL & JavaScript (4 th Edition) (Nixon) Available as e-book through Princeton library 24
Books Recommended Beginning Software Engineering (Stephens) Available as e-book through Princeton library 25
Other Resources See links on Topics web page StackOverflow website will be particularly helpful 26
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 27
Topics See Topics web page Subject to change... 28
Topics Pgmming languages A course on pgmming must cover pgmming languages! Java and Python And later PHP, JavaScript, and a little C and C++ Lectures will hit highlights, show examples, compare and contrast Most learning on your own [Take poll] 29
Topics Database programming Relational DBs and DBMSs Relational DB design The SQLite DBMS Database programming Impl 1: Java Impl 2: Python [Take poll] 30
Topics Version control systems [Take poll] 31
Topics Graphical user interface pgmming Components Layout managers Event handling Impl 1: Java Swing Impl 2: Python Tkinter [Take poll] 32
Topics Network programming Network fundamentals Network programming at the socket-level Object serialization Impl 1: Java Impl 2: Python [Take poll] 33
Topics Web programming HTML HTTP (Missing: CSS) Impl 1: Java Impl 2: Python 34
Topics Server-side web pgmming in Python Common Gateway Interface (CGI) programming Fast CGI programming WSGI programming The Bottle web app framework Impl: Python + Bottle [Take poll] 35
Topics Server-side web pgmming in Java The Spark web app framework The Apache Velocity template engine Impl: Java + Spark + Velocity [Take poll] 36
Topics Server-side web pgmming in PHP Impl: PHP [Take poll] 37
Topics Client-side web pgmming Client-side impl: JavaScript + AJAX Server-side impl 1: Python + Bottle Server-side impl 2: Java + Spark + Velocity Server-side impl 3: PHP [Take poll] 38
Topics Security issues in web pgmming Authentication Form-based, basic, CAS Secure storage of passwords Secure data transmission Impl 1: Python + Bottle Impl 2: Java + Spark + Velocity Impl 3: PHP 39
Topics Concurrent programming Concurrent processes Communication between processes Impl: C Concurrent threads Thread synchronization Communication between threads Impl 1: Java Impl 2: Python [Take poll] 40
Topics (If time) XML and JSON pgmming XML programming DOM programming SAX programming JSON programming Impl 1: Java Impl 2: Python [Take poll] 41
Topics (If time) Smartphone pgmming Client-side impl: Java + Android Server-side impl: Python + Bottle + Git + Heroku [Take poll] 42
Topics Programming paradigms Structured programming Object-based programming Programming with ADTs Object-oriented programming Functional programming Logic programming Impl: C++ 43
Topics Software engineering Requirements analysis Design (UML, design patterns) Programming Debugging Testing Evaluation Maintenance (refactoring) Methodologies 44
Topics Note: I am not an expert on all those topics! Nobody could be an expert on all those topics!!! Please feel free to contribute when you can 45
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 46
Assignments See Assignments web page Goal: Give you hands-on experience with baseline/ simple technologies Teams of two strongly preferred 47
Assignments Assignment 1 Registrar s office app (database version) Database programming Modularity Option 1: Java Option 2: Python 48
Assignments Assignment 2 Registrar s office app (GUI and networked version) Enhancement/redesign of previous Graphical user interface programming Multithreaded programming Network programming Option 1: Java + Swing Option 2: Python + Tkinter 49
Assignments Assignment 3 Registrar s office app (web version) Enhancement/redesign of previous Server-side web programming Option 1: Python + Bottle Option 2: Java + Spark + Velocity Option 3: PHP 50
Assignments Assignment 4 Registrar s office app (AJAX version) Enhancement/redesign of previous Client-side web programming Option 1: JavaScript + AJAX + Python + Bottle Option 2: JavaScript + AJAX + Java + Spark + Velocity Option 3: JavaScript + AJAX + PHP 51
Assignment Suggestions Suggestion: Invest time in Assignment 1; make it modular Modularity => ease of enhancement Observation: Assignments get easier as work on project ramps up Iff you use proper modularity 52
Assignment Suggestions Suggestion: When deciding which langs to use, consider: Which better supports your project? Which might you use in the future? Which do you like? 53
Assignment Suggestions Suggestion: When deciding which langs to use, if your goal is to increase: Depth of knowledge, then maybe: Assignment 1, 2, 3, 4: Java Breadth of knowledge, then maybe: Assignment 1, 2: Python Assignment 3, 4: PHP 54
Assignment Suggestions Suggestion: Difficult to switch/merge/split partners between assignments So, choose your Assignment 1 partner wisely Assignment 1 is available now 55
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 56
Project See Project web page Teams of 3-5 Three-tier application Deliverables throughout the semester Start now More details in lecture soon 57
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 58
Schedule See Schedule web page; generally... First half: Assignments 1, 2, 3; related lectures Start project Second half: Assignment 4; related lectures Lectures on more unconstrained topics Finish project 59
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 60
Policies See Policies web page Lecture policies Project policies Assignment policies Grading: Assignments (40%) Project (50%) Class participation (10%) 61
Agenda Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 62
Computing Env: General Action: Subscribe to the cos333 Fall 2017 Piazza account Browse to this page: http://www.piazza.com/class#fall2017/cos333 Follow the instructions to subscribe Please subscribe using your Princeton netid and your full first and last names 63
Computing Env: General Action: Create a GitHub account Browse to https://github.com/ Follow the instructions to create an account If possible, choose your GitHub username to be the same as your Princeton netid Action: Send email to rdondero@cs.princeton.edu to tell me your GitHub username 64
Computing Env: Project Action: Create a Google account Browse to http:google.com Follow the instructions to create an account 65
Computing Env: Project For software development Use whatever computing env makes sense Subject to approval of your TA advisor Must provide a way for us to use your system 66
Computing Env: Assignments Option 1: Use CourseLab cluster courselab.cs.princeton.edu courselab01.cs.princeton.edu courselab02.cs.princeton.edu Option 2: Use your own computer Mac, MS Windows, or Linux But, eventually must port to CourseLab Run submit command Make sure your programs work for grader 67
Computing Env: Assignments Action: Perform the instructions on the A Computing Environment for COS 333 Assignments document 68
Summary Introductions Course Overview Resources Topics Assignments Project (briefly) Schedule (briefly) Policies (briefly) The Computing Environment 69