Search for tag: "precondition"

Lesson 17.5 Divide and Conquer Design

Now that we understand divide-and-conquer, it is type to implement it in Python. In this video we show you a three-step sequence for writing a function definition using this technique.

From  Hannah Lee on October 19th, 2020 18 plays

Lesson 14.4 Try-Except and Testing

We have a new control structure, so it is time once again to talk about testing. In this video we revisit the concept of code coverage and show testing a try-except is very similar to testing a…

From  Hannah Lee on October 10th, 2020 13 plays

Lesson 13.6 Assert Helpers

Sometimes we absolutely need to enforce all of our preconditions, and we cannot live with the compromises of the previous video. In this video we show how to use top-down design to give us more…

From  Hannah Lee on October 10th, 2020 9 plays

Lesson 13.5 Assert Trade-Offs

Preconditions can get really complicated, and sometimes it is unclear how to enforce all of the preconditions. In this video we talk about why it is okay to break up a precondition and…

From  Hannah Lee on October 10th, 2020 9 plays

Lesson 13.4 Assert Messages

We now know how to do assert statements to create errors. But the error messages are a little cryptic. In this video we talk about how we can do a better job.

From  Hannah Lee on October 10th, 2020 9 plays

Lesson 13.3 Assert Statements

Determining responsibility can get really tedious. In this video, we show how we can responsibility explicit by creating errors on purpose. We introduce the assert statement, which will allow us to…

From  Hannah Lee on October 10th, 2020 10 plays

Lesson 13.2 Error Responsibility

When we introduced specifications, we talked about responsibility; if there is a problem with a function, it is either the fault of the definer or the caller. In this video, we show how we read an…

From  Hannah Lee on October 10th, 2020 8 plays

Zoom Sep. 29. Algorithm Design

In this session we do a deep dive in how we might design a series of functions to acomplish a single task.This class will be highly interactive. We will start with a specification – one more…

From  Hannah Lee on October 2nd, 2020 2 plays

Lesson 10.6 Top-Down Design

Top-down design is a widely–used design technique. Your instructor used it to design the first assignment, and you will use it yourself in later assignments. In this video we take a closer look…

From  Hannah Lee on October 2nd, 2020 3 plays

Zoom Sep. 22. Specifications and Testing

Both specifications and testing are critical for the first assignment. But many students struggle with them because they are so “fuzzy”.To help you improve your skills here, we have are…

From  Hannah Lee on September 24th, 2020 3 plays

Lesson 8.2 Test Cases

Many students in this course find that coming up with good test cases is far harder than writing code. That is because you have to design your test cases from the specification, before seeing any…

From  Hannah Lee on September 24th, 2020 6 plays

Lesson 7.5 Bad Specifications

Not all specifications are good. Some of them – including those written by your instructor – are quite bad. In this video we talk about how to read a specification critically so that you…

From  Hannah Lee on September 24th, 2020 3 plays

Lesson 7.4 Preconditions Categories

In this video, we break our preconditions up into categories. The primary reason for this is to help us analyze a specification. It will also become extremely imporant when we talk about enforcement…

From  Hannah Lee on September 24th, 2020 3 plays

Lesson 7.3 Preconditions

The one thing that we have not talked about yet are the preconditions in a specification. However, as this video shows, they are arguably the most important part of the specification. They are what…

From  Hannah Lee on September 24th, 2020 3 plays

Lesson 7.2 Specification Format

Now that you know why specifications are so important, it is time to write them. We have a very specific format that we want for our specifications, which is detailed in this video.

From  Hannah Lee on September 24th, 2020 4 plays