The Point of This Course

Slides:



Advertisements
Similar presentations
Contracts, Purpose Statements, Examples and Tests CS 5010 Program Design Paradigms “Bootcamp” Lesson 1.6 TexPoint fonts used in EMF. Read the TexPoint.
Advertisements

Reviewing your Program CS 5010 Program Design Paradigms “Bootcamp” Lesson 2.4 © Mitchell Wand, This work is licensed under a Creative Commons.
The Function Design Recipe CS 5010 Program Design Paradigms “Bootcamp” Lesson 1.1 TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
Midterm Review CS 5010 Program Design Paradigms “Bootcamp” Lesson 9.4 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
Classes, Objects, and Methods CS 5010 Program Design Paradigms "Bootcamp" Lesson 10.1 © Mitchell Wand, This work is licensed under a Creative.
Language Issues for Inheritance CS 5010 Program Design Paradigms "Bootcamp" Lesson 12.3 © Mitchell Wand, This work is licensed under a Creative.
Function Composition CS 5010 Program Design Paradigms “Bootcamp” Lesson © Mitchell Wand, This work is licensed under a Creative Commons.
Structural Decomposition CS 5010 Program Design Paradigms “Bootcamp” Lesson 2.1 © Mitchell Wand, This work is licensed under a Creative Commons.
Introducing General Recursion CS 5010 Program Design Paradigms “Bootcamp” Lesson 8.2 TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
Solving Your Problem by Generalization CS 5010 Program Design Paradigms “Bootcamp” Lesson 7.1 © Mitchell Wand, This work is licensed under a.
The Last Lecture CS 5010 Program Design Paradigms "Bootcamp" Lesson 12.4 © Mitchell Wand, This work is licensed under a Creative Commons Attribution-NonCommercial.
How to Learn in This Course CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.1 © Mitchell Wand, This work is licensed under a Creative Commons.
The Function Design Recipe CS 5010 Program Design Paradigms “Bootcamp” Lesson 1.1 TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
Examining Two Pieces of Data CS 5010 Program Design Paradigms “Bootcamp” Lesson © Mitchell Wand, This work is licensed under a Creative.
Classes, Objects, and Methods CS 5010 Program Design Paradigms "Bootcamp" Lesson 10.1 © Mitchell Wand, This work is licensed under a Creative.
The Design Recipe using Classes CS 5010 Program Design Paradigms "Bootcamp" Lesson 10.5 © Mitchell Wand, This work is licensed under a Creative.
Design Strategies 1: Combine Simpler Functions CS 5010 Program Design Paradigms “Bootcamp” Lesson © Mitchell Wand, This work is licensed.
The Point of This Course CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.1 © Mitchell Wand, This work is licensed under a Creative Commons.
How to Learn in This Course CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.1 © Mitchell Wand, This work is licensed under a Creative Commons.
Design Strategies 2: Using a template CS 5010 Program Design Paradigms “Bootcamp” Lesson 2.1 © Mitchell Wand, This work is licensed under a Creative.
A Simple Introduction to Git: a distributed version-control system CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.5 © Mitchell Wand, This.
More examples of invariants CS 5010 Program Design Paradigms “Bootcamp” Lesson © Mitchell Wand, This work is licensed under a Creative.
Testing Objects CS 5010 Program Design Paradigms "Bootcamp" Lesson © Mitchell Wand, This work is licensed under a Creative Commons Attribution-NonCommercial.
Solving Your Problem by Generalization CS 5010 Program Design Paradigms “Bootcamp” Lesson 7.1 © Mitchell Wand, This work is licensed under a.
The Design Recipe using Classes CS 5010 Program Design Paradigms "Bootcamp" Lesson © Mitchell Wand, This work is licensed under a Creative.
Organization of This Course CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.2 © Mitchell Wand, This work is licensed under a Creative Commons.
Non-Empty Lists CS 5010 Program Design Paradigms “Bootcamp” Lesson TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
The Last Lecture CS 5010 Program Design Paradigms "Bootcamp" Lesson © Mitchell Wand, This work is licensed under a Creative Commons Attribution-NonCommercial.
Midterm Review CS 5010 Program Design Paradigms “Bootcamp” Lesson TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
Solving Your Problem by Generalization CS 5010 Program Design Paradigms “Bootcamp” Lesson © Mitchell Wand, This work is licensed under.
Classes, Objects, and Interfaces CS 5010 Program Design Paradigms "Bootcamp" Lesson © Mitchell Wand, This work is licensed under a Creative.
How to use an Observer Template
How to Learn in This Course
Contracts, Purpose Statements, Examples and Tests
CS 5010 Program Design Paradigms “Bootcamp” Lesson 2.2
Generalizing Similar Functions
CS 5010 Program Design Paradigms “Bootcamp” Lesson 5.2
CS 5010 Program Design Paradigms “Bootcamp” Lesson 5.4
More About Recursive Data Types
CS 5010 Program Design Paradigms “Bootcamp” Lesson 3.1
CS 5010 Program Design Paradigms "Bootcamp" Lesson 9.4
Introduction to Invariants
Reviewing your Program
More Recursive Data Types
CS 5010 Program Design Paradigms “Bootcamp” Lesson 8.7
Halting Functions for Tree-Like Structures
CS 5010 Program Design Paradigms “Bootcamp” Lesson 4.1
Generalizing this Design
CS 5010 Program Design Paradigms "Bootcamp" Lesson 12.1
CS 5010 Program Design Paradigms “Bootcamp” Lesson 5.1
From Templates to Folds
The Different Kinds of Data
CS 5010 Program Design Paradigms “Bootcamp” Lesson 3.2
CS 5010 Program Design Paradigms "Bootcamp" Lesson 9.3
Case Study: Undefined Variables
Solving Your Problem by Generalization
Testing Mutable Objects
Contracts, Purpose Statements, Examples and Tests
CS 5010 Program Design Paradigms “Bootcamp” Lesson 6.5
More examples of invariants
ormap, andmap, and filter
Generalizing Similar Functions
CS 5010 Program Design Paradigms "Bootcamp" Lesson 12.1
Examining Two Pieces of Data
CS 5010 Program Design Paradigms “Bootcamp” Lesson 4.1
When do I need an invariant?
Design Strategies 3: Divide into cases
Presentation transcript:

The Point of This Course CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.1 Welcome to CS 5010, Program Design Paradigms, also known as “Bootcamp” I’m Professor Wand, and I will be your instructor in this online course. In this lesson, we will learn about the goals of this course and about some of the educational philosophy behind it. © Mitchell Wand, 2012-2015 This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Learning Objectives By the time you complete this lesson, you should be able to : Explain the point of the course list the 7 principles for writing beautiful programs list the 6 steps of the design recipe recite some of the slogans that we will use throughout the course.

The Point 1. It’s not calculus. Getting the right answer is not enough. 2. The goal is to write beautiful programs. 3. A beautiful program is one that is readable, understandable, and modifiable by people.

Your programs should look like this: source

Not like this source

Your programs should look like this source

Not like this source

And never, ever like this source

Seven Key Practices for Writing Beautiful Programs 1. Write programs that people can read, understand, and modify. 2. Represent information as data; interpret data as information. 3. Use contracts and purpose statements to specify the intended behavior of your functions and methods. 4. Use invariants to limit your functions’ responsibility. 5. Use functions and methods that communicate by passing arguments and returning values 6. Use global side-effects only to share information between distant parts of the program. 7. Use interfaces to limit dependencies between different parts of your program.

The Key Practices in Action Everything we do can be traced back to one or more of these key practices. We will expand on each of them as we go along. Write these down, in your own handwriting. Writing things down will help you remember them.

The Function Design Recipe This recipe tells you the order in which to attack a programming problem. You need to do these steps in order: If you haven’t specified your data, you won’t know what your data looks like or what it means. You can’t write a function that does its job unless you know what its job is.

The Function Design Recipe 1. Data Design 2. Contract and Purpose Statement 3. Examples and Tests 4. Design Strategy 5. Function Definition 6. Program Review Here is the function design recipe. This is important. Write it down, in your own handwriting. Keep it with you at all times. Put it on your mirror. Put it under your pillow. I’m not kidding!

A Few of Our Slogans We are also big on slogans. We think they help focus your mind. Here are our first few slogans. You should write them down, too, in your own handwriting. In fact, whenever you see one of these blue tables, you should assume that this is something important, and you should probably write it down in your own handwriting so you can memorize it.

Some Slogans 1. Follow the recipe! 2. You don't understand it until you can give an example. 3. One function, one task. 4. The Shape of the Data Determines the Shape of the Program. 5. Practice makes perfect.

The Course Map The course is divided into 3 main units: Basic Principles Tools and Techniques Object-Oriented Programming The first unit is taught in Racket; the second in a mixture of Racket and Java; and the third in Java. The map on the next slide, which we will show at the beginning of every module, will help you see where you are in the course content.

Course Map Basic Principles Tools and Techniques Designing Data Designing Functions Designing Systems Tools and Techniques Computing with Lists Computing with Trees and Graphs Computing with Higher-Order Functions Designing with Invariants Thinking about Efficiency Object-Oriented Programming Interfaces and Classes Inheritance Objects with Mutable State Efficiency, Part 2

Course Map Basic Principles Designing Data Designing Functions Designing Systems Tools and Techniques Computing with Lists Computing with Trees and Graphs Designing with Invariants Thinking about Efficiency Object-Oriented Programming Interfaces and Classes Inheritance Objects with Mutable State Efficiency, Part 2

Next Steps If you have questions about this lesson, ask them on Piazza Go on to the next lesson