Fall '22 Week 8
YouTube VideoResources
Edited Transcript
Hello, and welcome to the week eight announcements video for CC 410 in fall 2022. This week, we’re going to be starting on what I think is one of the most important chapters in this class where we learn both about design patterns, which are really useful ways that you can solve common problems in your code in a very structured way that other developers will recognize. But we’ll also going to look at test doubles, where we can actually create fake objects and use those in our unit tests, making our unit tests a lot simpler, and actually focusing in on the idea of testing an individual unit of code, and not requiring the whole application to work. Because this is a very large module of content, we’ve actually moved the restaurant milestone so that it is a week later. So instead of being due next Monday, it is due the Monday after that. So you’ve got two weeks to work on this module. There’s also a final project milestone that’s due about that time as well. So keep that in mind that we’re going to have this for a couple of weeks.
And then the next milestone will also be a two week milestone. These are the two larger milestones in the class, and I give you an a little bit extra time to work on them. So hopefully that works out. But I encourage you to really start early on this milestone because it does take a significant amount of time to get there. So the sixth milestone is all about adding both orders and combos to our application. To do that, we’re going to use a lot of different design patterns, such as the factory method pattern, the builder pattern, the singleton pattern and the iterator pattern. And so we’re going to be adding a lot of more complex code to our program, it’s also going to require some GUI changes. And you’re also going to be writing some unit tests to test the orders and the combos and make sure that they work correctly. This is a lot of very complex code. But it gets us to the point where our program is nearly functional, with the only things we have to add are some more unit testing and checkout at the very end.
So some tips for milestone six. Because there are so many things to do in this milestone, I really encourage you to start working on the orders object first, that’s going to be the singleton pattern. So you’ll have your order object that you can keep track of. It also uses an order number Singleton, so that you can keep track the order numbers in in the theory where you would actually have this deployed on multiple systems that helps you keep track of that. Once you get the orders working, then you should work on combos. Combos require a builder, they also require some updates to the menu. But they’re pretty simple once you get going in there, especially if you already have orders working, because adding combos to a working order system is not that terrible. Once you get that done, then you’ll work on the factory method pattern and make the panel factories. Those really don’t change functionality. Those just clean up your code and deduplicate a lot of code. And as you go, I really encourage you to make unit tests so that you can check your orders class, your combos class, your factory class, make sure that it’s working the way it should. The other thing that you should be doing is documenting your code. Any new code classes in the actual source code need to have full documentation comments. And they also need to pass a style checker and a type checker. I know a lot of you had a lot of outstanding style issues in the last milestone. So make sure you’re going through and fixing those, because I’m going to continue to count off for style errors if they’re not resolved. So take advantage of those tools and make sure that your code you’re submitting to me is very clean and easy to read.
So just like last time, there’s still some continuing testing issues with more of these advanced unit tests. So make sure you check out that example video where I talk about this. Remember, in Java, you can use Gradle, stop and then restart the box and refresh the browser to re reset a lot of that memory. And remember, in Python, we’re going to develop and run these unit tests in batches. So there’s a new tox file out there. Another option is you can develop some of this stuff outside of Codio. There’s some videos to give the basic idea around that the only thing that it really doesn’t include is how to do a graphical user interface in Windows subsystem for Linux. So if you get to that point need help setting that up, let me know and I’d be happy to help with that. Looking ahead after this milestone, the next couple of milestones are the last little bits on the GUI modules, where we’ll talk about both external libraries and building a release. And then you’ll work with an external library to create a checkout system for the milestone that’s going to be the last big milestone on the GUI side. And then we’ll switch over to web API starting in early November, and that those milestones are a little bit smaller, so you’ll have more time to work on the final project.
So we’re finally at the halfway mark of the semester. This is week, eight of 16 weeks, including finals week. That is so we’re really halfway done with the class. Hopefully things are going well. But as always, if you have any questions, let me know and I look forward to seeing you next week.