Search for tag: "specification"

Lesson 17.10 Recursion and Helper Functions

Divide-and-conquer is not the only example of recursion. It just happens to be one of the most interesting. But in this video we show that even some of the simplest of recursive definitions become…

From  Hannah Lee on October 19th, 2020 9 plays

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 13 plays

Lesson 16.7 For-Loops and Testing

Another control-structure means another video on testing. But if you have following the Rule of Numbers, you will discover that you have enough tests for your for-loop. Instead, as we show in this…

From  Hannah Lee on October 19th, 2020 12 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 14.2 Functions with Try-Except

Try-except statements will allow use to write functions that we could not write with conditional statements. In this video, we show how to use try-except as a general programming tool.

From  Hannah Lee on October 10th, 2020 11 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.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

Lesson 11.1 Objects and Classes

In this video we have to introduce some new terminology. We talk about classes, which are new types that are provided by modules (and therefore not built into Python). Objects are the values for…

From  Hannah Lee on October 2nd, 2020 7 plays

Lesson 10.5 Helper Functions

In the string videos we talked about the backwards approach to function design. Unforunately, this technique does not combine well with iterative testing. In this video we look at an alternative…

From  Hannah Lee on October 2nd, 2020 3 plays

Lesson 10.2 Function Stubs

Once we have an algorithm, it is time to get started writing code. In this video we talk about function stubs, which are how we get started. We like function stubs because they act as placeholders…

From  Hannah Lee on October 2nd, 2020 2 plays

Lesson 10.1 Algorithms

In this video we introduce the notion of an algorithm, which is an is a way of describing code (or any process) that is not limited to a specific programming language. You should always develop an…

From  Hannah Lee on October 2nd, 2020 4 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 9.8 Conditionals & Test Cases

Ideally, test cases should be designed from the specification and without reading the code. But once the code is written, we want to have proper code coverage, testing every single command in the…

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 8.1 Testing Plans

Before you start testing, you must have a testing plan. In this video we explain what these are, and how they fit into the software development process.

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