Decorated Wrappers – Design of Computer Programs

So here’s an idea. Let’s get rid of this line, and instead, let’s declare that n_ary is a decorator. We’ll write a definition of what it means to be a decorator in terms of updating wrappers. Then we’ll be done, and we’ve done it once and for all. We can apply it to n_ary, and […]

Calculating Costs – Design of Computer Programs

Now, we got rid of the times in the successor function, so we’ve got to put them back in someplace. I’m going to generalize a little bit, and instead of talking about times, I’m going to talk about costs for a path. I’m just thinking of maybe we might want to do some other problems […]

Lambda – Design of Computer Programs

Let’s consider a formula–I’m going to write a new one. Let’s say You equals Me-squared. We’re treating these formulas as strings. Now when we substitute numbers into this, we get something like 123 equals 45-squared. What happens when we call eval on this string? What eval has to do is it takes it’s input, which […]

Office Hours 2 – Design of Computer Programs

Hi. Welcome to the second office hours. Again we had a lot of really good questions in the forum, so let’s get started. The first question came from Matthew Atkinson. He has heard that you shouldn’t use functions like eval and exec, which we did use in unit 2. He wants to know why shouldn’t […]

Fill In Function – Design of Computer Programs

Now I want to talk about a strategy for defining the function fillin,which takes an unfilled formula and returns all the possible filled in formulas. What do we have to do? Well, let’s consider a formula, and I’m going to take one that’s simpler than one we’ve seen before. I’m going to take the formula […]

Using Max Solution – Design of Computer Programs

[Norvig] And the answer is simple. We take the maximum out of all the hands, with the key equal to the hand_rank. I like this definition because it’s so simple– the whole body is just 1 line– and also because it corresponds so closely to the problem specification. The specification says, return the highest ranking […]

Paths Actions States – Design of Computer Programs

Here’s a quick exercise. Why don’t we just define two functions– path_states, which takes a path and returns a list of the states, and path_actions, which takes a path and returns a list of the actions. The path is interleaved–it contains both–and we want to pull just the states or just the actions.

Introduction to Computer Programming – Next Steps to Becoming a Software Engineer

>>If you’ve reached this point in the class doing the readings and successfully doing the exercises, congratulations. You may now call yourself a computer programmer. Welcome to a very elite club. Up to this point we’ve worked on relatively small programs. We usually measure the length of programs by the number of lines of code […]

Refactoring – Georgia Tech – Software Development Process

A couple of minutes ago we talked about the fact that well, we might need to change our design a lot, so how we going to do that, that’s going to be expensive. Well it’s not very expensive, if we can do efficient refactoring. Which is another one of the important xp practices. And what […]

Putting It Together – Design of Computer Programs

Now we’ve got our new successor function. We know how to deal with costs. Now it’s time to put it all together. It’s a little bit tricky, so I’m not going to ask you to do this as a quiz. If you want to you can pause the video now and do it on your […]

Copyright © 2019 Geted Tabs Online. All rights reserved.