Resources

Edited Transcript

Hello, and welcome to the week for announcements video for CC 410 in Fall 2022. This week, you should be wrapping up the documentation and testing portion of the class as well as the portion that deals with UML. There’s an example all about documentation and testing in your code. And then the second restaurant milestone is all about adding a lot of unit tests and documentation directly to the code that you wrote for the first milestone.

This week, we’re going to shift gears a little bit and go deeper into object oriented programming principles specifically about inheritance and polymorphism. There’s a quick example that shows some inheritance. Hopefully, this is a lot of review for you. But it’s a really good way to look at inheritance in object oriented programming and see how useful it is. Another thing that we do in this class at this point is what I call a start, stop continue survey. It’s a really quick informal poll of the class just to see if there’s anything you’d like me to start doing through the class, anything that I’m currently doing, that you’d like me to stop doing, and anything that you see that I’m currently doing that you’d like me to continue doing. So it’s a really quick feedback. It’s totally anonymous. It’s optional, but it gives me a good idea of where things are going on this class. And if there’s anything I need to adjust about my approach. Hopefully this week, you’ve also got some time to thinking about the final project, especially after we get past the inheritance and polymorphism milestone, you’ll have a good idea of what this back end part of the project looks like. So be thinking about ways that you can use that in your final project in this course.

So coming up after that, then we have a module on debugging and logging. We also introduced one concept in programming called lambda expressions, which is really important for some of the unit tests that we’re going to use. Lambda expressions come from functional programming, they’re really neat little tool in programming that allow you to use functions as first class objects in your code. So we’ll do a quick example on debugging and logging. You’ll have a third restaurant milestone that introduces a lot of inheritance. And then you’ll have the second final project milestone where we’ll start talking more in depth about different project ideas and things that you can get started working on. So for this upcoming milestone, this is the first one, we’re going to enforce all general requirements. So make sure you read that requirements park at the top of the page, it talks about your code must be object oriented, it must have unit tests, everything must be documented, it must pass a type checker, it must pass a style checker, I will be enforcing all of those on milestone three. So make sure that your code passes that in Gradle, you shouldn’t have any output when you do Gradle build and Gradle check. In Python, you should be able to run talks and get no issues at the end, anything that comes out from any of those processes you should be working on so that by the end of milestone three, everything is fine. And then for the rest of the semester, we’re going to try and keep it that way, you’ll be adding some new unit tests, you’ll be updating the UML diagram to show the new inheritance.

This is really an exercise in refactoring some existing code to add some better structure to it. This one is a little bit smaller than the other milestones where it’s only about 1500 lines of code that are new or changed. But it is very complex code, especially because of the refactoring. A lot of you probably haven’t done much refactoring before. So this is a really good example to get into. And of course, as always, feedback is welcome on any of these milestones. If there’s something unclear, or something I can describe a little bit better, please let me know.

So some quick hints for milestone three. First and foremost, I really want you to think about working iteratively. And working in kind of a incremental process. So work in very small chunks, try and highlight one part of the project, get that part working before you start working on the next. What I see a lot of students doing, they try and refactor their code is they’ll pull everything apart, try and make all of the changes, and then they’ll wonder why it doesn’t work. And so it’s really useful to try and break it up into smaller chunks that you can test and work around with. And then add all the new functionality that way. Also, we are using Git and GitHub in this class. So don’t be afraid to commit early and commit. Often, anytime you make a change anytime you get something working, commit and push that. And then if you break something later on, you can always roll back to that commit, if you want to, you can also play around with branches. So if you want to create different branches, that way, you can jump back and forth between them.

That’s another feature you can use in GitHub and get, you can also maybe try test driven development in this project. There are a lot of tests that you can write early on, that helped test a lot of the structure of your code. And so you can write those unit tests first, and then build your code to actually implement those tests later on. One big advice I want to give on this milestone is there’s an Order Item class that you’re adding, you can inherit that either on the individual wraps and sides and drinks. But it makes much, much more sense. If you inherit that on the base wrap class, the base drink class on the base side class, and then those will carry downward in the inheritance chain.

So try and inherit the order item on the base classes for each type of item instead of each individual item itself. And then finally, if you have any questions on syntax, please let me know we’re using some more complex syntax in here, especially in ways that we deal with some of these milestones. So make sure you keep that in mind and ask me any questions if you have any. So looking ahead after this, this milestone will have on inheritance and we’ll do some stuff on debug debugging. Then we’ll get to milestone six about first of October, that’s where we’re going to shift over to start looking at some graphical user interfaces or GUIs. We’ll move into event driven programming. And then from there, we’ll shift into some web API’s and some other features toward the end of the semester. So hopefully everything’s not on fire this semester. I know especially when you get to refactoring. Everything can kind of get on fire in your code. So make sure you keep track of that. Keep your code working, try and make small changes and keep it up and running. As always, if you have any questions, let me know and I look forward to seeing you again next week.