Eric Roberts and Jerry Cain

Slides:



Advertisements
Similar presentations
1 Note: Original slides provided by and modified for this specific classwww.apComputerScience.com.
Advertisements

1 of 3 Karel Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.
Copyright, Joseph Bergin
Programming Paradigms and languages
CMSC 132: Object-Oriented Programming II
CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
Introduction to CS 106A Eric Roberts CS 106A January 4, 2009.
CSC 171 – FALL 2004 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
Robot? What’s a Robot? Introducing Karel-the-Robot.
Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.
Karel J Robot An introduction to BlueJ and Object- Oriented Programming.
Karel the Robot A Gentle Introduction to the Art of Programming.
CSC 171 – FALL 2001 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
Thanks to Dr. Kris Schindler for this (and all Karel the Robot slides)
Karel J. Robot Tool for learning OOP (Lecture covers Ch. 1 and 2)
1 Karel J Robot OOP approach to learning computer science “Its study involves development of the ability to abstract the essential features of a problem.
15-100: Introduction to Programming w/ Java * Ananda Gunawardena -- Lecture – School of Computer Science – Phone : (x81559) – Office: Wean Hall.
Programming in Karel Eric Roberts CS 106A January 6, 2016.
Introduction to CS 106A Eric Roberts CS 106A January 4, 2016.
CS140 – Computer Programming 1 Course Overview First Semester – Fall /1438 – 2016/2017 CS140 - Computer Programming 11.
Introduction to CSCI 1311 Dr. Mark C. Lewis
Introduction to Programming Lecture 1 – Overview
Boğaziçi Ünv Koç Ünv Darüşşafaka Lisesi
Introduction to CS 106B Eric Roberts CS 106B January 5, 2015.
Course Overview - Database Systems
Computer Engineering Department Islamic University of Gaza
INTERMEDIATE PROGRAMMING WITH JAVA
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.
CSc 020: Programming Concepts and Methodology II
Learning to Program D is for Digital.
CS 106A, Lecture 1 Welcome to CS 106A!
Eric Roberts and Jerry Cain
March 27 – Course introductions; Adts; Stacks and Queues
CMSC104 Problem Solving and Computer Programming Fall 2010 Section 01
Copyright © 2008 by Helene G. Kershner
CS123 Engineering Computation Lab Lab 4
Copyright © 2008 by Helene G. Kershner
Karel J Robot.
Karel – Primitive Instructions
CS 106A, Lecture 2 Programming with Karel
Computer Science 102 Data Structures CSCI-UA
September 27 – Course introductions; Adts; Stacks and Queues
COSC051: Computer Science I
Course Information and Introductions
Karel J Robot OOP approach to learning computer science
CS 106A, Lecture 12 More Graphics
slides courtesy of Eric Roberts
Computer Networks CNT5106C
Course Overview - Database Systems
Stepwise Refinement Eric Roberts CS 106A January 8, 2010.
CS 1302 Programming Principles II
CMSC 104 Problem Solving and Computer Programming Fall 2010
Programming Languages
Topics Introduction Hardware and Software How Computers Store Data
slides courtesy of Eric Roberts
A Gentle Introduction to the Art of Object Oriented Programming
CMSC104 Problem Solving and Computer Programming Fall 2010
Karel J Robot OOP approach to learning computer science
Computer Programming 1 introduction to JAVA Lecture 1 Instructor: Ruba A. Salamah Islamic University of Gaza.
CS 1111 Introduction to Programming Fall 2018
CS 2530 Intermediate Computing Dr. Schafer
Programming Languages
Computer Engineering Department Islamic University of Gaza
slides courtesy of Eric Roberts
Introduction to Computer Science I.
Chapter 17 JavaScript Arrays
CMSC104 Problem Solving and Computer Programming Spring 2010
CS31 Discussion 1H Fall18: week 1
Karel – Primitive Instructions
Course overview Lecture : Juan Carlos Niebles and Ranjay Krishna
Presentation transcript:

Eric Roberts and Jerry Cain Introduction to CS 106J Eric Roberts and Jerry Cain CS 106J April 3, 2017

Course Description CS 106J: Programming Methodology in JavaScript Introduction to the engineering of computer applications emphasizing modern software engineering principles: object-oriented design, decomposition, encapsulation, abstraction, and testing. Emphasis is on good programming style. This course covers the same material as CS 106A but does so using JavaScript, the most common language for implementing interactive web pages, instead of Java. No prior programming experience required. Enrollment limited to 100. Terms: Spr | Units: 3-5 | UG Reqs: WAY-FR | Grading: Letter or CR/NC CS 106J covers the same material and meets the same WAYS requirements as any other CS 106A section.

Why JavaScript? When Stanford adopted Java a little over a decade ago, we expected—along with its designers—that it would become the “language of the web.” That didn’t happen. Today, the “language of the web” is JavaScript, which has become the most widely used language in industry. Along with JavaScript expert Douglas Crockford, we believe that, as long as you avoid some of its most commonly abused features, JavaScript is “a beautiful, elegant, highly expressive language” that is ideal for a first course in programming. It is considerably easier to learn than Java. There are far fewer confusing details to memorize. It offers much cleaner implementations of modern features. It is universally supported on the web.

JavaScript is the Most Popular Language

Why Study Computer Science? Sources: National Center for Education Statistics 2014; Bureau of Labor Statistics 2014-2024 projections. We are very happy with the students that we get from this university. . . . We just wish we could hire two to three times as many of them. Bill Gates at Stanford, February 19, 2008 —

Everyone Needs Some Programming Half of all jobs in the top income quartile value coding skills. Source: Burning Glass Technologies, “Beyond Point and Click: The Expanding Demand for Coding Skills,” June 2016.

CS 106J Course Staff Eric Roberts Office Hours (Gates 202): eroberts@cs.stanford.edu Office Hours (Gates 202): Tuesdays 9:30–11:00 Jerry Cain jerry@cs.stanford.edu Office Hours (Gates 192): Wednesdays: 3:30–5:00 Jason Chen cheson@stanford.edu Office Hours (TBA): TBA

Syllabus—Week 1 April 3 Administration Course overview Meet Karel the Robot 5 Simple Karel programs Control structures in Karel Read: Sections 1.1-1.3 7 Problem-solving in Karel Program decomposition The idea of an algorithm Read: Sections 1.4-1.5

Syllabus—Week 2 10 Programming by example Variables and values Arithmetic expressions Functions Read: Sections 2.1-2.4 12 Strings and concatenation Simple graphics Read: Sections 2.5-2.6 14 Control statements Boolean data Read: Sections 3,1-3.5

Syllabus—Week 3 17 Arguments and parameters Libraries Random numbers Read: Sections 4.1-4.2 Due: HW #1 (Karel) 19 The mechanics of functions Decomposition Read: Sections 4.3-4.4 Due: Karel contest 21 First-class functions Event-driven programming Responding to mouse events Read: Sections 5.1-5.4

Syllabus—Week 4 24 Simple animation Timers 26 The GArc class Read: Section 5.5 Due: HW #2 (Simple JS) 26 The GArc class The GPolygon class The GCompound class Read: Section 5.6 28 Binary representation Representing characters Read: Section 6.1

Syllabus—Week 5 May 1 JavaScript’s String class Common string patterns Read: Sections 6.2-6.3 3 Problem solving with strings String applications Read: Section 6.4 5 Cryptography The GLabel class Read: Section 6.5 Due: HW #3 (Breakout)

Syllabus—Week 6 8 Debugging strategies 10 Simple arrays and files 12 Due: Graphics contest 10 Simple arrays and files Read: Sections 7.1-7.2 12 Using arrays for tabulation Read: Section 7.3 Midterm Exam Tuesday, May 9 3:30 P.M. or 7:00 P.M.

Syllabus—Week 7 15 Multidimensional arrays Pixel arrays The GImage class Read: Sections 7.4-7.5 Due: HW #4 (HangKarel) 17 Objects as aggregates Read: Sections 8.1-8.2 19 JavaScript and OOP Libraries and interfaces Defining classes and methods Read: Sections 8.3-8.5

Large-scale data structures Syllabus—Week 8 22 Objects as maps Read: Section 8.6 24 Large-scale data structures Data-driven programs Read: Section 8.7 26 Overview of Adventure! Read: Adventure handout Due: HW #5 (Yahtzee)

Syllabus—Week 9 29 Memorial Day (no class) 31 JavaScript and the web Read: (handouts for the day) June 2 Using web interactors Read: (handouts for the day)

Frontiers of computing Dead Week and Beyond 5 Looking ahead Read: (handouts for the day) 7 Frontiers of computing (optional) Due: HW #6 (Adventure) Due: Adventure contest Review session: Monday, June 12 7:00-9:00 P.M. Final exam: Wednesday, June 14 8:30-11:30 A.M.

Assignments in CS 106J Assignments in CS 106J are due at 5:00P.M. Assignments that come in after 5:00 will be considered late. Everyone in CS 106J starts the quarter with two “late days” that you can use at any time you need some extra time. In my courses, late days correspond to class meetings, so that, if an assignment is due on Wednesday and you turn it in on Friday, that counts as one late day. Extensions can be approved only by the TA, Jason Chen. Assignments are graded by your section leader, who discusses your work in an interactive, one-on-one grading session. Each assignment is given two grades: one on functionality and one on programming style. Style matters. Companies in Silicon Valley expect Stanford graduates to understand how to write code that other programmers can maintain.

The CS 106J Grading Scale Functionality and style grades for the assignments use the following scale: A submission so good it “makes you weep.” Exceeds requirements. Satisfies all requirements of the assignment. Meets most requirements, but with some problems. Some more serious problems. Even worse than that. Why did you turn this in?

Contests CS 106J will have three contests as follows: The Karel Contest associated with Assignment #1 The Graphics Contest associated with Assignment #3 The Adventure Contest associated with Assignment #6 First prize in the contest is a score of 100% on one of the graded components of the course, typically the final exam. As an additional incentive, entering any of the contests gives you a virtual ticket to win an additional grand prize in a random drawing at the end of the quarter. So does receiving a runner-up or honorable mention on a contest and finding errors in the text and tools. Entering a contest also earns “house points” for your class in the style of the Hogwarts School from Harry Potter.

Honor Code Rules Rule 1: You must not look at solutions or program code that is not your own. Rule 2: You must not share your solution code with other students. Rule 3: You must indicate on your submission any assistance you received.

Meet Karel the Robot Initially, Karel understands only four primitive commands: Karel’s world is surrounded by a solid wall through which it cannot move. Depending on the problem, there may also be walls in the interior of the world that block Karel’s passage. The only other objects that exist in Karel’s world are beepers, which are small plastic cones that emit a quiet beeping noise. In this world, for example, I’ve added a beeper to the corner of 1st Street and 2nd Avenue. Karel’s world is composed of streets and avenues numbered from the southwest corner. (As in Manhattan, streets run east-west and avenues run north-south.) In this world, Karel is facing east at the corner of 1st Street and 1st Avenue. Karel the Robot was developed here at Stanford by Richard Pattis over 30 years ago. Since then Karel has given many generations of CS 106J students a “gentle introduction” to programming and problem solving. move() Move forward one square turnLeft() Turn 90 degrees to the left pickBeeper() Pick up a beeper from the current square putBeeper() Put down a beeper on the current square + 1 2 3 4 5

Your First Challenge How would you program Karel to pick up the beeper and transport it to the top of the ledge? Karel should drop the beeper at the corner of 2nd Street and 4th Avenue and then continue one more corner to the east, ending up on 5th Avenue. + 1 2 3 4 5

The End