Previous Semesters
Previous Semesters
- Spring 2021
- Fall 2021
- Spring 2022
- Fall 2022
- Spring 2023
- Fall 2023
- Spring 2024
Previous Semesters
Hello, and welcome to CC 410. My name is Russell Feldhausen. I’m going to be your instructor for this semester. And this is the first of the weekly announcements videos that I’m going to do in this class. My goal is throughout the semester, if I have anything interesting to talk about each week, I will try and record a video and post it sometime around Monday morning. I’m a little bit behind because it’s the first day of the semester, and I’ve had a few other things to work on. But in these videos, I’m going to briefly talk about what’s going on this week, address any questions we had during the previous week and give you a general overview of where you should be going in this course, my contact information is here, it’s also on the syllabus. It’s also in the intro video, you’ve probably seen it a few times. But if you have any questions feel free to reach out to me either directly or via the cc410-help email address that’s described in the syllabus and then the introductory material.
So CC 410 is a brand new course this semester. It’s developed based on the CIS 400 course that Nathan Bean teaches for computer science majors. And so a lot of the content is similar at the beginning. He teaches that class in C#, we’re learning in Java and Python. So a lot of the content has been adapted a little bit. But I’m still in the process of developing new content. So things may change as I figure things out for this course, or as I realize things that Nathan does don’t work as well for the course I want to teach. So please bear with me as we change things. And as always, your feedback is really welcome. If there’s something in particular you want to learn or something you think I could improve or do better in the next semester, I really welcome that feedback from you, as this is a brand new course for everybody.
So big picture in this course, what we’re going to focus on in this semester is object oriented programming. Also OOP is how the abbreviation looks. So we’re going to do a lot of class libraries and building really big projects, we’re going to focus a little time on graphical user interfaces or GUIs. And then toward the end of the semester, we’re going to look at some API’s how you can integrate either external code or write your own API with your code. So we’re going to look at a lot of those different things. throughout the semester, we’re going to do several hands on examples, you’ll get to see those where basically I set a project and then I record a video walking through that project, so you can follow along. And then you’ll take what you learn on those examples. And you’ll use them to complete this restaurant project that we’re going to do throughout the semester. It has about 10, or 12 milestones that we’ll do. And it’s directly built upon those examples. So once you do the example, you’ll have all the tools you need to do the restaurant project. And then in the background, you’ll also be working on a final project that we’ll talk about here in a second. And that’s going to be really your capstone from the computational core programs. So if you’re in the computer science certificate, or the integrated computer science curriculum, this is one of the big capstone projects that you’ll get to complete.
So in this course, we’re going to use some new technologies that you may not have worked with before. First and foremost is git, which is a source control system so that we can keep track of versions of our source. We’re also going to use GitHub classroom as one of the tools that I use to help manage everything. So you’ll get to learn how to use that in the Hello real world project that you’ll do first. for Java developers, we’re going to introduce Gradle, which is a compilation tool for Java, that helps make things a lot simpler. For Python, we’re going to use a tool called tox, which does a lot of the same things, just automating some of the things that we need to do in Python, Python, especially regarding introduced type checking the semester, which is something that Java developers have been dealing with since day one. For Python users, this is going to teach you a little bit more about how object oriented programming works and some ways that you can write better code in Python. We’re also going to cover unit testing. so we can write tests that make sure our programs work correctly, we’re going to focus on style checking, making sure that our code fits a particular professional style, which is really important. And we’re going to look at how we can write documentation in our code so that not only us, but other developers can help understand what our code does and how it works.
So as I mentioned, in this course, there will be a final project, the final project is self directed, you get to choose the topic for your final project. Hopefully, you’re able to find a project that aligns with your interests. So if you’re outside of the computer science major, if you’re in biology, or chemistry or statistics, there might be some interesting projects that align with that interest area. But the whole idea is to allow you to use the skills that you’re developing in this course and all the previous programming courses you’ve taken to build something of your own design. So as you come up with your topic, you’ll meet with me individually, we’ll kind of discuss the scope and some ideas for how you can implement that project. And then throughout the semester, there’ll be four different milestones where you’ll check in with me and see where you’re going on the final project. And then finally, at the end of the class on finals week, you’re going to create a presentation that will be shared with the class so they can see what you did with your final project. So I hope that’s a really good experience. It’s something very new in this course. So we’ll see how that goes.
So really quickly, a quick overview of the next few weeks and this course week one this week, which ends on the 31st. This week is a lot of administrivia, just going through the basic structure of the course. And then you’re going to do the first example, which is the Hello real world example. And this is a recreation of the HelloWorld project you’re familiar with. But using all of the new technologies we’re going to use in this course. So we’re going to write hello world that has unit testing and style checking, and is committed to Git and has documentation, comments, and a lot of things that you haven’t done yet. But it’s all really important stuff that you need to learn to become a professional programmer. I’m also going to have our first final project meeting. So sometime in the next two weeks, you’re going to schedule a time to meet with me via zoom, and we’re going to discuss ideas for your final project, we really need to get off the ground running with that. And then when we meet, I’ve got a couple of questions for you. I’m curious to see if you’re interested in live office hours via zoom or Discord. And I’m also interested if you’d be interested in communication platforms such as discord, we have a Discord server for the computer science department and I can create a channel for CC 410. It’s a great place where you can come and chat with other students and you can chat with me. But I don’t want to do that unless I’m sure that people are interested in having such a platform available. So we’ll discuss that when we meet for the first final project meeting here in the next couple weeks.
Week two, which ends on February the seventh, we’re going to build an open an object oriented programming class library for our restaurant project, we’re going to build a library that represents the menu of items at this restaurant that corresponds with the first milestone of the restaurant project. I spent this past weekend writing the model solutions for the first couple of restaurant milestones. And in my model solution, this one was around 2000 to 2500 lines of code, which for a lot of you, that’s going to be very daunting, because most of your projects in earlier CC courses were maybe a few 100 lines of code, some of the larger data structures might have gotten close to 1000 lines of code. Here we’re talking about a single week where we’re going to develop 2000 to 2500 lines of code so much, much bigger project. The nice thing is it’s mostly boilerplate, boilerplate code. So once you get one version written, you’re probably okay, you can copy paste a lot of that. However, I do warn you to be very mindful which as you copy paste, there’s a lot of chance to introduce errors into your code. And so you can actually make things worse if you’re not careful as you copy paste and make changes between all your files. So week two, it should take anywhere from I think three to eight hours to complete the week to milestone, it really depends on how familiar you are and how comfortable you are copy pasting and modifying code very quickly.
Week Three, which ends on Valentine’s day of February 14, we’re going to cover unit testing and documentation. And so for the second restaurant milestone, we’re going to add unit tests to our code. The unit tests are quite large. For my model solution, it took anywhere from 3500 to 4000 lines of code in the unit test files, which is a good rule of thumb, generally you think you’re going to have anywhere from two to five times as much code in your unit tests as you do in your code itself. And so all told, you end up writing at least 423 individual unit tests. However, a lot of those are repeats, you can reuse the same unit tests between files, maybe with small changes, and it’s a good chance to catch errors. I actually caught about a half dozen errors in my model solution for milestone one, by writing unit tests for milestone two, which shows that it’s really important to write these unit tests and how easily they can catch errors.
And then week four, and week five, which is the end of February, we’re going to cover inheritance and polymorphism. Again, this time, we’re going to go really deep into that and build interfaces and abstract classes for our restaurants. I have not finished writing that milestone yet. But hopefully by next week’s announcements video, I’ll have a little bit better idea of the scope of that milestone, I’m estimating that it’s going to be about 1000 lines of new code, but you’ll have to go through and change a lot of your existing code. So you may end up touching several 1000 lines of code, but you’re probably only writing about 1000 lines of new code. That one there, the actual project needs are the actual tutorials and examples are going to be due on February 21. But I’m giving you an extra week to work on the project part for that. So the restaurant milestone will be due the end of February. And that’s also when you’ll have your second final project milestone. And that second final project milestone is building the class library for your final project. So you’ll be doing a lot of the same stuff in your final project as you did in the first three restaurant milestones. And that all hits the end of February. And that’s really where I’m at in terms of the solid course development. I’ve got outlines for a lot of the rest, and I will be sending that out as I get that developed over the next few weeks. But at least for the first month or so we’ve got a pretty solid idea of where we’re going in this course.
So after that we’re going to discuss the big topic we’re going to cover is graphical user interfaces or GUIs. So we can actually build interactive programs. For this, we’re going to build a point of sale system like an ordering menu system for the restaurant, we’re going to look at how to integrate external libraries in our code, how to work with web API’s both pull data from a web API, and maybe even write our own web API to accept online orders from another service. We’re going to look at serialization how do we save the data in our program in between program runs and things like that. So that’s where we’re really going for the rest of the semester.
Some advice, this is a four credit hour course, if you’re in computational core, the last four credit hour course you would have taken would be CC 210, or CIS 200. And so this is a larger scope than the 310 and 315 courses. And so because it’s four credit hours, you can expect to spend at least eight hours each week working on this course. So that’s more than an hour a day, and probably several stints of a couple hours each working on these projects. So I really encourage you upfront to schedule your time wisely and make sure you have enough time to work on these projects. The milestones come really, really fast. You know, it took me most of this weekend to get through the first two milestones in both Java and Python. And so I expect for students, it’s going to take several hours to work through those milestones the first time. With your homework. Start early, make sure you start as soon as you can, so you have enough time to ask questions. Because this is an online course you’re not going to see me live in person all the time, which means that questions may take anywhere from a couple hours to up to 24 hours to get a response from me, depending on how quickly I can get to those questions. So leave yourself enough time to ask questions. Take advantage of Office Hours, take advantage of the ability to send emails to me, we’ll see if we set up a discord channel. But really make sure you give yourself a lot of time to work on these as your copy pasting code between your different source files, make sure you do so very carefully. It’s very easy to introduce difficult to solve errors by copy pasting code without paying attention. So copy paste a little bit at a time, like individual methods, tweak that method, and then continue on until you get comfortable with that. And likewise, once you learn how to use Git, don’t be afraid to commit your code to get very often. That way, if you do break anything, it’s really easy to roll back to your previous git commit and you can start over again. So you don’t have to completely unroll any problems you’ve made. Finally, I encourage you to use your online resources wisely. Especially in this class. We reference a lot of the Java API standards, a lot of the Python API standards as well as the documentation for a lot of tools that we’re using. Feel free to reference those just make sure if you pull any code from those that you cite that code. And you should only be pulling little bits of code like how to perform a particular action in a unit test or how to perform a particular structure in your code. Make sure you cite those with a comment. So I know where you found that resource. And that way, there’s no question about plagiarism. So keep that in mind.
Other than that, that’s all I’ve got to share with this first week. If you have any questions, email me via the cc410-help email address. You can also schedule a time with me by finding my calendly link. It’s on the syllabus. It’s on the webpage. It’s also in every email you’ve ever received from me, it’s in the signature at the bottom, but I’m really rooting for you. I hope that you do well this semester, and I look forward to working with each of you as we go forward. So good luck.
Hello, and welcome to the week two announcements video for CC 410 in Spring 2021. So this week, you should be wrapping up module one and hello real world, the first example projects in this class, they were actually both due Sunday night. But if you haven’t gotten them completed, you can still turn them in right now, check the late policy in the syllabus for the exact details of the late policy. But you can still turn things in late for most of the points as long as you’re only there so late. Also, if you ran into any trouble doing the hello real world project, please email me and let me know so that we can work through that. As you’re aware, this is a brand new class. And so things may go wrong. And we’re still learning the best way to do some of these things. So don’t be afraid to reach out if you have trouble. And let me know so that we can get past that. Oh, and also the other big thing going on in Module One Don’t forget is each of you should be scheduling a meeting with me to discuss your final projects, you need to have that meeting done no later than February 7, which is next Sunday. Although bear in mind, I don’t usually meet with students on Saturday and Sunday. So you probably need to do that this week. But the whole point of this meeting is for me to briefly talk to you about ideas for your final project and just get a feel for where you’re at in the class. So far, since we don’t meet in person. Otherwise, this is a great way for me to at least meet one on one with you a few times throughout the semester and see how things are going.
So for this week, everything is due on February 7, you have the meeting again, for final project, part one, you’re going to be working on module two, where we talk a lot about object oriented programming, something that you’ve seen and worked with for several classes at this point. But we’re really going to dive deep into the theory and why it is the way it is. And so we’ll do an example project for that where you’ll actually build some open some object oriented programming classes. And then based on that example, you’re going to work on milestone one of the big restaurant project. And that is something you should probably start ASAP because that is not a small milestone, and we’ll talk about that here in just a minute.
So some updates this week, I sent out an email earlier to see if folks were interested in a discord channel, there were enough responses that I’m going to go ahead and set that up. So if you’d like to join the K state computer science Discord server, you are more than welcome. The easiest way to get there is to go to this website, discord bot.cs ksu.edu. It will have you sign in with your case ad ID. And with your discord user account. If you don’t have a discord user account, you’ll need to create one first. And then it will invite your discord user to the server. And once that’s done, you can go to discord open up your discord account, and you should now see the computer science server in your list of servers, it’s a great way for us to keep track of it. So feel free to go there. If you look over on the left side under classes, there is a class channel for CC 410. If you type in there, you can ask me and I will usually respond pretty quickly if I’m at my computer. But of course bear in mind, this is not the official support channel for this class. So if you have a question, and it’s not answered on discord quick enough, make sure you email it to cc410-help, I guarantee that those will be responded within one business day. So make sure you do that. for grading in this class, something to be aware of there are rubrics on canvas. There’s also rubrics and all the assignments. And so you kind of know how much each of each part of the assignment is worth. Generally when I grade, I will put the points in Canvas. And I may put small comments in Canvas. But when we’re grading code assignments, I’m probably going to also leave code comments in GitHub on that feedback pull request that you’ll get an email about whenever you set up a Git repo. So keep an eye out for that. If you’re not sure how to find those, let me know and I’d be happy to walk through that with you. Other than that, I think things are going so far so good. I haven’t heard too many issues in this class. Although we are a very small group. I think there’s only four students actively working on this class right now. So if you have any comments or feedback or things that are going well, or things that aren’t going well, please let me know. It’s it’s something that’s really hard as an instructor, teaching an online class that’s brand new is getting that instant feedback from students, it’s really up to you to reach out to me, and let me know what’s going well and what’s not. So feel free to provide any feedback.
For this week, you’ll be working on the first milestone of the restaurant project. Throughout this semester, we’re going to build on a single project the restaurant project, we’re building a point of sale for a fictional restaurant. And so the first milestone is a lot of the baseline packages and classes we need for the menu. The restaurant I think has seven entrees, four sides and five drinks. So you’re going to have quite a few menu items that you’re you’ll have to keep track of. The first milestone is a lot of boilerplate code. It’s creating a class for each one of those creating the attributes creating the getters and setters and some of the other methods. And so the best thing I can say for the first milestone is work on the most complex item, which I think is the sandwich called the Riker. And then once you have that figured out a lot of that code, you can copy Paste carefully into other files and adapt slightly and make those work. For this first milestone, the only thing we’re grading you on is your class structure itself. We’re not looking at style and documentation. However, you can make things a lot easier on yourself. Now by thinking about style and documentation, maybe including some documentation, comments, maybe running the style checker a few times to make sure you’re not completely out of it. You know, if you get your style right on a file before you copy paste the code, it’s a lot easier than having to go back and fix it later. I estimate for most students, this milestone will take anywhere from three to eight hours depending on how comfortable you are with the tools. And with the coding process we’re going through, I was able to do it in a couple hours myself, it wasn’t too bad, but it is a lot of copy, paste. So make sure you keep an eye out for that. And this project is going to feel significantly larger than any project you’ve done up to this point, most likely, I estimate that this project requires anywhere from 1500 to 2500 lines of code, depending on how you write your code and how much documentation you include. Thinking back to CC 310, and 315. Most of those projects were 1000 lines or less maybe. So this one’s going to feel quite a bit larger. You have a whole week to work on this. It’s due Sunday night at midnight. Feedback is very welcome. I’m trying to get a feel for the scope of this course. I’m very confident that I think each of you can achieve this milestone in a week. But it’s something that you’ll want to do a little bit of time. It’s not something you can start on Sunday and expect to get done on Sunday, that’s going to be pushing it. It’s not to say it can’t be done. But I don’t recommend it, I would much prefer you start on this and work maybe an hour a day or something on it just to prevent you from getting burnt out as you get toward the end. So that’s something keep in mind. But please let me know if you have any comments or feedback on this milestone, I’m really curious to see how how well this goes and whether I need to adjust either due dates or expectations or things like that to fit with the class.
So looking ahead after module two, the week after that will be Module Three, we’ll talk more about documentation and unit testing. And then your milestone for that week will be to add unit tests to your project which again is a really, really big milestone. module four, we’ll discuss inheritance and polymorphism. And then for that project, we will go back in and refactor our code to add some inheritance and polymorphism to it. And in module five, we’ll talk about debugging. We’ll also talk about the second final project milestone. And as a quick heads up module four, module five are going to blend into each other. I think what we’re going to do for module four and five is do a lot of the introductory stuff on week four, and then the actual inheritance milestone and some example projects and the final project meaning we’ll all be on week five. So modules four and five will kind of blend out. But that gets us all the way through the end of February. And then starting in the March and April we will work on GUIs, Web API’s etc. I spent most of this weekend writing some demo projects for the GUIs that I think we’re going to create in this class. So I will know more about that project here in the next week or so. But that’s what I’m iterating on right now. That’s really all I’ve got for today. If you have any questions, comments, concerns, anything like that, feel free to reach out to me at the c410-help email address. You can also find me on discord if you join the discord server. I’m always here to help just let me know what I can do otherwise Good luck this week and I hope to hear from you all soon.
Good morning, and welcome to the week three announcements video for CC 410 in spring 2021, this has been a busy second week of the class. But hopefully at this point you should be, you should have already met with me for your final project milestone one where we discuss some ideas for your final project. I believe I’ve covered almost everybody in this class at this point. But if you have any questions about final project anytime, feel free to schedule a meeting with me or shoot me an email or catch me on Discord. And I’d be happy to chat with you about that. You should have also completed the second module in this class, which is a deep dive into object oriented programming. We did a short example on object oriented programming. And then you should have started working on the first milestone of the restaurant project. And so in that milestone, you’ll create a whole bunch of object oriented classes. It’s about 1500 to 2500 lines of code. And hopefully you’ve got that done in submitted but if not, keep working on it and make sure you get it submitted earlier early this week. Remember that the late penalty in this class is 10% off per day that it’s late. So you can still keep on working on it and get a lot of the credit if you submit it either today or tomorrow. So make sure you keep working on that.
Coming up this week, we’re going to have three different little modules on documentation, unit testing and UML diagrams. And so there’s three little example modules that you work on. There’s three little tutorial modules that you work through. And then there’s one example project on mostly testing, but it covers a little bit of documentation as well. Specifically, you’ll make a UML class diagram as part of that example. And then you’ll work on the second milestone of the restaurant project. This one is where we add unit tests and code documentation to our restaurant project. And so it can be very substantial. At the end of that project, I estimate that you’ll have anywhere from 3500 to 4000 lines of code in your project. So it is a significantly large chunk. But the nice thing is you can repeat a lot of that code. So some quick updates, I did create a channel on discord for this class. So feel free to go check it out. I’ve seen most of the students there at least once so make sure if you have any questions, you can post there and you might be able to get a response from me pretty quickly. If you don’t hear back from me or you want to make sure you get a response, you can always also email your question to the cc410-help email address, I guarantee that I will respond to those within one business day. for grading, don’t forget that the rubric itself will be found on canvas. And so you’ll find your point values on canvas. But a lot of the code itself, I will review via GitHub. And so you might find code comments in that feedback, pull requests that every GitHub repo has for GitHub classrooms. So feel free to look at that. If you don’t find that or you’re not sure where that is, let me know. And I’d be happy to help you find that inside of GitHub. Otherwise, I think so far, so good. I haven’t heard any major issues in the class yet. I’m very curious to see how my milestone one on the restaurant project went. I’ll be looking at those later today and getting those gradients. So hopefully, you’ll get some good feedback for me in the next couple of days on that.
So talking a little bit about milestone two, in milestone two, you’ll be writing unit tests. My sample solution for this has around 423 individual unit tests that I wrote, which is a very staggering number of unit tests, I will admit, you also need to write documentation comments for everything to the point where it passes either the Java check style or the Python flake style checker. Your documentation comments for your actual source code in the source directory should be pretty complete. In the test directory, they can be a little bit more incomplete. mainly just talking about what the unit test does, they don’t have to be too descriptive. But that way, you have a little bit of a note of what each unit test and each unit test class does. Also, don’t forget, it’s kind of buried in the requirements. But you do need to create a UML class diagram for this milestone. So make sure you create that and store that in the root of your Git directory somewhere. Next, your README file where I can find it. Again, like I said, this is going to be 3500 to 4000 lines of code. In any feedback you have is welcome. Let me know if this feels a little bit too big or too redundant or if there are other things that I can do to help clarify or simplify this project a little bit.
One thing I want to talk about, though, real quickly is hints for milestone two. These are all in the milestone document itself, but I wanted to cover them really quickly in this video. First and foremost, when you’re writing your unit tests, do not look at the source code that you wrote for milestone one, go back and look at the requirements from milestone one and make sure that your unit tests actually test those requirements. Basically, you want to test what you should have written not what you actually wrote. In fact, in in practice, you might actually do this backwards where you write the unit tests first following test driven development, and then you write the source code. But it’s really important that you don’t look at your source code while you’re writing these unit tests. For example, in my first model solution for milestone one, I went through and wrote unit tests for milestone two and I found no less than six errors in my own model solution for milestone one. So It is very important that you catch and find those errors using your unit tests. The second thing I will say is use global attributes in your unit test classes to help make copy pasting a little bit easier. I’ll show you an example of what that looks like on the next slide here. Also, don’t be afraid to try and generalize things. For example, if you need to check all the condiments, you can, in your global attributes have a list of what the condiments should be. And then in your unit test, you basically have an if statement that says if the condiment is in the list of condiments that should be there, you check to see if it’s there, or else you check to see if it’s not there. And so that way, in one unit test, you can cover all eight condiments. However, the ingredients do become tricky, it is possible to generalize the ingredients like ham and cheese and sausage and bacon. But you have to do that using either Java reflection or meta programming in Python, it gets very, very complicated, I didn’t even try and do this for my model solutions. It can be done, but I really don’t recommend it. Instead, I would just explicitly write the unit tests for all the different ingredients like ham and cheese and sausage, it gets a little repetitive. But it’s much simpler than trying to do the meta programming or the reflection tricks needed to actually look up an attribute by name instead of one that’s stored in a list or a dictionary. And finally, don’t forget to look at parameterize tests, you can parameterize your tests based on enums. In the document, I gave a link for how to find that for each language. So make sure you do that. But anytime you’re writing a test across all of the different enums, like bread types, or sizes or condiments, there’s usually a way that you can parameterize that down to a single test. So keep that in mind.
So when I’m talking about generalized tests, this is what I’m talking about. These are snippets of code actually taken from my model solution. So congratulations, I’m giving you a couple of freebies here. But basically what I’ve done in my test class, at the very top of the class, I define a whole bunch of global attributes things for like the price and the calories. And the you could do this for the different sizes for sides and drinks, you could list all of the condiments that are expected on an item, things like that, the default bread type, the default size. And so I have all these lists at the top, and then toward the bottom. In my unit tests, I just refer to those attributes when I’m testing. So if I test that the price is correct, instead of having the price typed in in that unit test, I just assert that the price I get from the item is the price value that I have the top of my class. And so in that way, I can copy paste large chunks of this class. And the only thing I have to change are the items at the top, I go back to the menu, I change the price, the calories, the condiments, whatever. And then I can use the same test code in multiple places. So this is a really smart way to make this project a little bit simpler. So be thinking about ways that you can quickly generalize your tests and make it a little easier to copy paste code between the different objects.
So looking ahead real quick. This is module three, covering unit testing and documentation. Next week, we’ll cover module four, which has a lot of inheritance. Then we’ll have module five, which covers debugging and it also is the second final project milestone. So you’ve got about three weeks to work on your final project and be thinking about classes and inheritance and things like that. module four will be due next week, module five, and the final project two will be due all the way at the end of February. So keep that in mind. And then we’re going to move into graphical user interfaces or GUIs. And so I’m hoping to post module six later this week, and possibly also module seven, which will cover GUI design basics and Event Driven Programming. And then as we go further in the class, we’ll do some more work with GUIs. We’ll also look at Web API as possibly serialization, all sorts of different ways that we can reuse our project code.
So that’s all I’ve got for this week. You’ll be basically feeling like a test printer writing all these unit tests this week. So I hope that you enjoyed this project. As always, if you have any questions, feel free to let me know via cc410-help or on Discord. Otherwise I look forward to hearing from you and good luck this week.
Hello, and welcome to the week 4 announcements video for CC 410 in spring 2021. So you should be wrapping up at this point all of the stuff for module three, which is the documentation, testing and UML module. It’s one of the larger modules in terms of tutorial content. And also in terms of the actual final project, or the restaurant project content, writing unit tests is a lot of code. And so hopefully at this point, you should be turning that in, I just checked this morning, and it looks like most everybody has turned that in. So that’s really great. So keep up the good work there. This week, we’re going into kind of a weird two week period where we don’t exactly have a restaurant project due this week. But we have a lot of stuff due next week. So make sure you pay close attention to both module four, and five, because they kind of mix together.
So this week with module four, we’ve got a tutorial on inheritance and polymorphism. It’s a topic we’ve covered a couple of times before in this curriculum. But this time, we’re going to go really deeply into why it works and the way it works and things like that. And then we’ll do a small example project. That example project is the example you’ll need for the third restaurant milestone. So as soon as you’ve completed that example, you can start working on the third restaurant milestone, which is actually listed as part of module five, which we’ll get to in just a second. The other two things in module four, there is a start stop continue survey, that’s just a quick chance for you to tell me if there’s anything I’m doing this class that you’d like me to stop doing, if there’s something you’d like me to start doing with this class, or if there’s something I do that you’d like, and you want to make sure I continue doing that. This survey will be open throughout the semester, so you can fill it out any time. It is anonymous. So unless you put something identifiable in Qualtrics, I won’t know who you are. But it does send me an email as soon as somebody fills that out. And I will do the best I can to take all of that feedback into consideration as we continue to work on this course throughout the class. Some other things that you can do this week, you can start spending some time on the final project. Basically, we only have these two weeks, we only have one milestone due. So it gives you some extra time to work on your final project.
Because when we get to next week, module five, and I really encourage you to finish module four very quickly this week. So you can get on to module five, because there’s a lot of things going on in module five. In module five, we have two tutorials, we have one on debugging and logging, and one on lambda expressions that are both pretty short, they shouldn’t be too bad. We do an example project on debugging and logging. But it doesn’t actually impact your ability to work on the restaurant project, you’re not required to do any logging in the restaurant project. However debugging might be helpful depending on what you’re working on. And so the end of next week, February the 28th. About two weeks from today, you’ve got the third restaurant milestone, which is adding inheritance and polymorphism and refactoring some of your code. And this is the final milestone for the class library part of the project. And then also, we’re going to have our second final project meeting sometime next week, just to see where you’re at on the final project. So hopefully between these next two weeks, you can spend some time on the third restaurant milestone, which is not as big as the second one. And then you can also spend some time working on the final project. So you’ve got some stuff to report for the final project meeting. Like this vision for the final project is that by this by end of next week, you’ll have some classes built. But depending on what your final project is, you might be setting up the framework you’re building, you might be working in a game engine. And so as long as you’ve got something reasonably interesting to show for your second final project meeting, that’s really what I’m shooting for, I just want to make sure that you’re continuing to work on that project throughout the semester, instead of just saving until the end of April, like a lot of classes.
So for milestone three, like I talked about, this is the first milestone that requires all of the general requirements we learned in the Hello World project. So this is the first one we’re we’re enforcing the style requirements. So make sure all of your code passes a style check. In this milestone, you’re going to be adding inheritance to the modules, you’re going to be adding some base classes and interfaces, things like that. And so once you add that inheritance, you’re going to have to go through and refactor all of your existing classes. To take advantage of that. You’ll also need to update and add some new unit tests. I believe after this milestone, you should have 526 unit tests. So there’s about 100 new unit tests that get added. You’ll also need to update the UML diagram. So make sure you don’t forget to do that. In this milestone, my code was about 1000 new lines of code and about 500 lines of code that were removed because they were redundant. So it’s actually not that big of a project when you get down to it. But it is kind of complex to get all of this inheritance working correctly and get all of the code refactor. And as always, Your feedback is welcome.
So some hints for milestone three. The biggest hint I can give you is work in small chunks, try and do one little part get it to work. And then use Git to commit early and commit often make sure you’re constantly committing as you get stuff working. That way, as you work on the next chunk. If something else doesn’t work, you can roll back to that previous commit. There’s lots of good instructions online for how to do that. But try and work in small parts. This milestone is also a great chance to try test driven development. If you want, you could go into the unit tests and add the unit tests that are needed first, and then work on writing your code to pass those unit tests. That would be something that’s really interesting that you could work on in this project. It’s not explicitly required in the requirements. But I do really recommend once you write the order item interface, that you go ahead and inherit order item on your base on tray side and drink classes. Instead of inherit. Instead of inheriting that interface directly on each of the entrees, drinks and sides. It does make your code a little bit more complex in the base classes. But it does make the rest of the code a lot simpler. And I’ve got a little blurb in green on the milestone itself that discusses this. But if you have questions on it, let me know. One of the big things for this milestone is going to be syntax there are especially in Python, there are a few instances where syntax gets a little crazy working with interfaces. And as best I could, I tried to model all of that in the example project for inheritance. But if you get to a situation where you’re like, I think this looks right, but the syntax it keeps complaining on it. Feel free to post in discord or let me know via email at the cc410-help email address, and I would be happy to try and help you figure that out.
So looking ahead as before, these next two weeks, we’re working on module four and module five, like I said, they’re kind of mixed together. So don’t wait till the end of this week to do module four, because then you’ll feel a little bit behind when you get to module five. module four, and five are all together, you’ll have a restaurant milestone and a final project milestone at the end of that two week sprint. And then once we get into March, we’ll start working on our graphical user interfaces or GUIs. And so module six is GUI basics. Module seven is Event Driven Programming, making your GUIs actually interactive. And then from there, we’ll work on some other GUI topics. We’ll work on web API’s, etc. As we go toward the end of the class.
So that’s all I got. I hope you enjoyed your Presidents Day weekend. Unfortunately, we don’t get Presidents Day itself off. Hopefully you’re staying warm out there. You can see today I’m wearing my hoodie because it’s cold everywhere. But as always if you have any questions please feel free to contact me on discord or via the cc410-help email address. I’m always happy to help and good luck this week.
Hello, and welcome to the week five announcements video for CC 410 in spring 2021. So this week we’re wrapping up the second week working on modules four, and five. So hopefully by now you’ve turned in the stuff on inheritance and polymorphism along with the example that gives you a good idea of what you’re doing in milestone three. There’s also some other things you can do right now, the start-stop-continue survey, which is really good chance to give me feedback, if there’s anything you’d like me to start doing in this class or make sure I continue doing or if there’s anything that I’m doing that you’d prefer that I stopped doing. These are all examples of things that you can tell me about. That just helps me build this class in a way that’s really useful for students. And I’m hoping that you can spend some time this week and next week working on your final project. And then hopefully each of you meet with me sometime this coming week. So that we can talk about your final project and see how things are going so far.
For this week, there are a couple more tutorials on debugging and logging and lambda expressions. These are things that we’re not necessarily going to build into our projects at all. But it’s really cool stuff that you’ll see a little bit and it might be very useful for you. But the big thing we’ll be doing this week is spending a lot of time working on your restaurant milestones. So milestone three is due at the end of this week. And again, hopefully, we’ll be doing some time working on the final project, thinking about it doing some design work, and then scheduling a meeting to meet with me and discuss the final project.
So quick reminders about milestone three, this is the first one where we are enforcing all of the general requirements. So all the style documentation unit testing requirements. So far, it seems like everybody has been doing a good job taking care of the style requirement in the background anyway. So I don’t think that will be too difficult. The biggest thing you’ll be doing is adding some inheritance to this project refactoring some of your classes, updating some unit tests and then updating the UML diagram to match. This one is about 1500 lines of code. I think it was about 1000 new and maybe 500 lines of code that I actually removed from my model solution when I did this. And as always, feedback is welcome. So if you have any questions or comments about the milestone, please let me know.
Some quick hints for working with milestone three. work in small chunks, this is probably one of the biggest project milestones were working in small chunks is important. Try and make one little change committed, see if it works, make another little change committed, see if it works. So commit early commit often that way, if you do have any problems, you can roll back in get, and you can get back to a previously working state. This is also a good chance to try test driven development, you can actually go in and write the unit tests first, and see which ones fail and then go through and modify your code until they all pass again. In the instructions, I’m not very clear, you can actually inherit the order item interface either on each individual class or I recommend inheriting it on the base classes, the entree drink inside base classes, which will then be carried forward on those classes that are inherited by all of your entrees, drinks and sides. The other big thing is make sure if you have any questions on syntax in here, there are some strange things, especially in Python for how you do abstract classes that are also using properties. So if you have any questions on the particular syntax of that, let me know I do have a working model solution that I can refer to. So I can help you get past those if you run into that.
Looking ahead, like I’ve said for a couple weeks now, once we get past this week, the next module will be on GUIs. So we’ll be building a graphical user interface for our program. So module six is all about just scaffolding the GUI making it look like you want getting the interaction between the screens. And then module seven, which is the project I’ve been working on this week is Event Driven Programming, actually building the button handlers and things for your GUI so that you can create orders and populate a list of items in an order. Then module eight, which is the model solution, part I’m going to work on this week is going to be on design patterns and combos, we want to actually be able to create a combo meal in our interface. And it actually turns out that that is an interesting structural change to look at. So that’s something I’m going to be working on. And you’ll be doing that in module eight, about three or four weeks from now. Module nine, the plan is to work on an external library, I’m going to try and get or build a library that references a cash drawer. So we can see what working with external libraries looks like. Those four modules will probably be the next big chunk of the class. And then like this week, we’ll have a week after that, where we will take some time working on the final project. And then going forward as we get to Module 10. and beyond. We’ll start talking about web API’s and some other ways we can expand our project out.
So that’s all I got for this week. It’s a pretty short week because there’s not a whole lot that’s new going on. Hopefully you all survived the cold weather that was the this past week. I know it was really rough here in Kansas City. Thankfully, we didn’t lose power but a lot of my family I have some family down in Texas who did lose power. So I hope you’re all doing well. I hope you’re all staying safe. staying warm. If you have any questions or concerns please feel free to contact me any time either via either via the cc410-help email address or via Discord. I’m always here to help. Otherwise Good luck this week and I will see you next week.
It appears that I missed an interesting error when developing Example 5 for Python. It is a bit complex, so I’m relying on the advanced formatting of this webpage to help explain it better than I can via email or in a short post to the class. I’ll start with a short version, and then include a longer discussion of the problem and how I came to a solution that I feel is very helpful reading for anyone learning to program and solve these issues in their own work.
Currently pytest has a bug that causes errors when logging to sys.stderr
when running code inside of pytest
.
As best I can tell, pytest
tries to capture all output being printed to sys.stderr
by redirecting it to a buffer (a virtual file) when running the tests. Once it is done, it will close the buffer and redirect output back to sys.stderr
. Unfortunately, our logger does not realize this, and it may continue to try and write data to the buffer that is now closed, resulting in the ValueError: I/O operation on closed file
error message seen in the output.
There are several methods to determine if code is running under pytest
and disable logging in that case.
I recommend this method:
import sys
# get the root logger
logger = logging.getLogger()
# disable if pytest is running
if "pytest" in sys.modules:
logger.disabled = True
You will need to add this code to any file that you add logging to, in order to prevent errors from pytest
. Alternatively, you can disable the handler that prints to sys.stderr
and instead just use a file handler.
Since this is an advanced programming course, I figure that it is worth a bit of a “deep dive” into this situation so you can understand what I found, the efforts I went through to solve it, and how things are really working behind the scenes.
This is a bit of cognitive apprenticeship, where I attempt to show you my thought processes and how I go about solving a problem like this. My hope is that you’ll be able to learn from this process and possibly use this knowledge to help you solve your own problems in the future.
Unfortunately, in the world of higher education, we spend way too much time focusing on narrowly-scoped, previously-solved problems, to allow you to learn in an environment where we know a solution is possible in a set amount of time. In the real world, however, you’ll be constantly presented with broadly-scoped, open-ended problems like this one, where you’ll have to do some exploration to find possible causes and solutions, and then use your own background and knowledge to determine what solutions, if any, are available.
So, here goes.
When you run pytest
in Example 5 after adding some logging code as directed in the video, you will see many pages of errors printed to the terminal. In my testing, the terminal in Codio printed errors for several minutes before finally stopping. A screenshot of a small portion of those errors is below.
When this happens, you may be able to use CTRL + C to stop the output, but in many cases I simply had to close the terminal tab in Codio.
When I developed this example, I focused on the debugging portion first, and then later added the logging code. However, I neglected to run pytest
after adding the logging code to my model solution, and did not encounter this error in my initial testing. That was an oversight on my part.
As you work on this project, you may end up adding the logging code first while still working on debugging the errors in the project. In that case, you will most likely run tox
or pytest
to run the unit tests contained in the project with the logging code in place. That will cause the error to appear. As soon as I ran tox
in my existing model solution, my code presented this error.
The process of finding a solution for this problem went in three phases.
First, I attempted to Google some of the error message and a few things that I suspected were at play. I already had a hunch that the error itself was coming from the logging code, since I had added that to my model solution last. After reproducing the bug in my solution, I set out to solve it. Some Google search phrases I used:
pytest logging stderr write to closed file
- Including keywords pytest
and logging
as well as the stderr
stream and a bit of the error message.pytest stream.write(msg) I/O operation on closed file
- adding more details such as the line of code causing the error and the exact error messages."pytest" stream.write(msg) I/O operation on closed file
- putting "pytest"
in quotes will find results that always include that keywordThere were others, but this was the most fruitful.
In several of those searches, I came across a few bug reports on GitHub, specifically within the pytest
project’s repository. Bug reports and discussions on GitHub are usually very fruitful when looking for technical errors that include code and error messages, so I looked into a few of them.
sys.stderr
as part of the test. It was also much more recent, and some of the error messages they were running into were similar to what I was seeing.sys.stderr
or sys.stdout
, then most likely pytest
would interfere with that and cause this error. Thankfully, the last two issues both referenced this issue…pytest
developers posted a message that included this text:What I believe is happening is:
- pytest changes
sys.stdout
andsys.stderr
to a buffer while importing test modules.- If there’s user code setting up logging and/or creating a
logging.StreamHandler
at the import level, it will attach itself to pytest’s buffer.- When pytest is about to finish the test session, it will restore
sys.stdout
andsys.stderr
to the original values, and close the “capture” buffer.- Here the problem happens: if any message is emitted at this point, the
StreamHandler
will try to attach itself to the buffer, hence the error.
So, we’ve now found what we suspect is the error. All we have to do is figure out how to resolve it.
Unfortunately, issue #5502 is still open as of this writing, so we needed a way to get around this error. With some quick testing, I was able to confirm the error went away if I removed the StreamHandler
from the existing logging code. So, I decided that the best way to deal with this was to find some way to disable logging while the code is running as part of a unit test. This is a somewhat common, though discouraged, trick in programming. Ideally you don’t want to hide any code from the unit tests, but in some instances you want to make sure that the unit tests don’t actually change live data, such as the actual database used by this program. So, you can “protect” the code that connects to the database and make sure it cannot run as part of a unit test.
A quick Google search for determine if code is running under pytest python
quickly lead me to a StackOverflow post discussing this very issue. Great! I had quickly found a pretty good resource that might lead me to a solution.
Within the discussion, there are a few solutions suggested, and helpfully ranked by the upvotes from other users.
if "pytest" in sys.modules:
since the pytest
application will always be loaded when running a test. This solution seemed pretty simple and didn’t have many obvious side effects, provided your application didn’t load pytest
as part of its normal execution.conftest.py
file, which is only executed as part of a unit test, to update a value in our code, and then check that value where needed. This looks promising, and is probably the correct answer that would work in all cases, but also requires significantly more code and adds a structural dependency between our code and the conftest.py
file.PYTEST_CURRENT_TEST
environment variable, which is set when pytest is running. This may also work, but has the side effect of being outside of our control - any other application on our system could also set that variable, including another instance of pytest
, so it may not work as reliably as the other two.In the end, I chose Solution 1, and updated the code at the top of my main()
method in TicTacToe.py
to the following:
import sys
# get the root logger
logger = logging.getLogger()
# disable if pytest is running
if "pytest" in sys.modules:
logger.disabled = True
That code will simply load the logger, and immediately check if the "pytest"
module is loaded. If so, it will disable the logger globally in my program.
An alternative solution would be to just disable the StreamHandler
and allow the FileHandler
to remain enabled, but I felt that logging from unit tests is not helpful and chose to disable it entirely.
I hope this discussion is helpful - I’ve found that sometimes the best opportunities for cognitive apprenticeship happen directly as a result of the class, so I wanted to take this chance and share a bit of my own problem solving process here.
If you have any follow up questions about this, please let me know!
Hello, and welcome to the week six enhancements video for CC 410 in Spring 2021. We’re over a third of the way through the semester at this point. So hopefully should be wrapping up the stuff from last week, which was on debugging and logging and lambda expressions. There was also a restaurant milestone, this is the last of the data part of the restaurant milestone before we move into the GUI part. And also, I think each of you should have met with me for the final project. So looks like everyone’s final projects are going really well. But feel free to meet with me throughout the semester if you have questions. Otherwise, we’ll have our next final project milestone toward the end of March.
So this week, we have a pretty light week where we will basically be going over the basics of building a GUI or graphical user interface for our program. And so all you’re really going to be doing is exploring that example. And then working on your next restaurant milestone, which is building a GUI outline or a basic GUI for your restaurant. And so in this milestone, basically all you’re going to be doing is creating the overall GUI structure of your restaurant project. So all of the different panels, the buttons, the things that you’re going to need, the only thing we’re really going to build that actually works is the ability to click buttons and switch between panels. That just makes it easy. So you can build all the different panels that you need. And then next week, we’ll actually do Event Driven Programming, where we will wire up the rest of the GUI and make it all functional. In my example, I’m going to build on the Starfleet treats that we did way back earlier this semester. And one of the examples, we’re going to build upon that and build a simple GUI structure. The one thing I want to make very clear is I give one possible structure for the GUI. That doesn’t mean that you have to follow my example, this is just the one that I found to be the easiest to build and the one that made the most sense to me. But feel free to use your own design. If you want to customize your UI, make the buttons look different, make the layout different anything like that, it’s totally up to you, I’m going to show you the parts that you need to build the functionality. And then you’ll be able to work on the design and layout yourself. So feel free to get creative and do whatever you want on your UI as long as it kind of meets the basic requirements that we’re going for. Also, on the milestone at the bottom, I give some helpful hints for how you can automate some of the UI building process. for better for worse, building GUIs by hand is very repetitive. And it’s very, it’s a lot of repeated code. And so I’ll give you some quick shortcuts on how you can bypass some of that repeated code and simplify that a little bit. So I hope you find that very helpful for this milestone.
So looking ahead, like I said, after this week, the next week, we’re going to do on Event Driven Programming, where we will actually wire up the buttons and different things in our GUI, we’ll also add some unit tests to be able to verify that our graphical user interface is working correctly. Module eight is going to be on design patterns and combos. And in that module, we’ll also bring introduce unit test mocks, which allow us to fake some things in our unit test, which makes our unit tests a little bit easier for that part. And in module nine, we’ll work on bringing in an external library to handle our cash drawer and how we would actually do the checkout process. So those are really the next three modules. These four modules six through nine are going to be all GUI based modules. And then from there, we’ll have modules 10 through 12 or so that actually cover some other stuff like web API’s. So that’s where we’re going so far.
Otherwise, I think things are going well in this class we were through over a month at this point. The feedback seems pretty positive. But if you have any questions, concerns or anything I can do to change please let me know. Otherwise, keep rocking it out there and good luck this week and I will catch you next week.
Hello, and welcome to the announcements video for CC 410 in spring 2021, for week seven. So some quick updates for this week I posted last week. But hopefully you all saw this I have moved all the course deadlines from Sundays to Mondays. Part of that is to give you a little bit more time to work on the projects. But also a lot of that is to give you the chance to work on the weekends, and then give me a chance to catch up with questions on Mondays. Unfortunately, the next few weekends are not going to be as available as I had planned. And so I wanted to make sure I give you ample time to ask questions and get a response for me before the projects are due. That said, it’s a really good idea if you can start on the projects before the weekend. That way, if you do run into any early questions, I can help solve those really quick. Hopefully the example videos do a pretty good job of getting you set up for the projects. But if not, feel free to ask questions, let me know things that I can clarify. So as far as content, I just released module seven on Canvas, I’ve got module eight on deck, I’m just waiting for the example videos for module eight, and then it will be released. And then I’ve got modules nine and 10 written I’m just waiting on finishing the examples and getting all the videos recorded in modules nine and 10 will be kind of the last modules of this chunk of the class, they’ll be very similar to what we did for weeks four and five, where there’ll be two weeks together. Also, I do realize I’m a week behind on grading. So I’m going to be doing a lot of grading probably today to get caught up on grading. So you should be a lot of see a lot of grades post to Canvas pretty quickly so I can get caught back up.
So this week, we’ve got two topics that we’re covering, we’re covering parallel programming, which describes a little bit about how we use threads and processes in our computers, I have to cover this topic because it leads into what we do next time, which is Event Driven Programming. With Event Driven Programming, we’re actually writing the events that work within our GUIs. And our GUI requires multiple threads. So I had to spend a little bit of time talking about parallel programming. The parallel programming example is not very complex, it should take half an hour or so. And then you’ll be able to do the example for Event Driven Programming after that.
For the milestone this week, milestone five, this is where we start doing events in our GUIs. And so this milestone you’re going to take the GUI that you developed last week where you have all the buttons, and you’re actually going to add a lot of the button click handlers to those buttons. We’re also going to refine the GUI structure a little bit. In my original example, I was intending to use a list in the sidebar, I realized as I was working on this milestone that that’s not going to work very well. So we’re going to go through and refine that to use a tree structure. Instead, I show you all the code how to do this in the example video for that project. So check out the example follow that code, you should be able to change it pretty quickly. Once you get done with this milestone, you should have a mostly functional GUI you can create orders you can customize items, you should be able to populate that sidebar with any order. And then in the next couple of milestones, we’ll look at actually building an order object, we’ll build a combo objects, and then the milestone after that we’ll actually integrate that into our GUI and finalize the project using checkouts. Do make sure you read the hints for this project. There are some hints at the bottom of the milestone of unit tests you might want to include and some different methods that will help you jump back and forth between different parts of your GUI. This is one of the milestones where it starts to get a little bit more complex where I give you a little bit less structure. And you have to figure out the structure yourself. For example, in one of your GUI panels, when you click the Save button, how do you actually get the item from that GUI panel into your sidebar panel, there are some things that you can do to make that happen. So this one starts to be a little bit more open ended. So if you’re not sure how to do something, feel free to ask and let me know. As with all of these I have written a full model solution. So I at least know that it does work and there is at least one way to do it. So if you get stuck, let me know.
One thing that we are running into with these projects as they get larger is testing issues. Especially if you’re taking the Java version of this class, you’ve probably seen me in some of the example videos get frustrated with Gradle. This is mainly due to the fact that the Codio boxes we’re using only have 512 megabytes of RAM and Gradle tries to use a lot more than that. So there are some things you can do to get around that. In Java, if you’re having trouble with Gradle if you do Gradle space dash dash stop from within your project directory that will stop all the running Gradle daemons. If you get any messages about stopped or hung daemons or anything like that you can stop those. You can also go through and restart the Codio box that is running your project. If you click the project menu and click Restart box, it will come up sometimes it takes 30 seconds or so to do that. And then after you do that refresh your web browser and everything should work a little bit better. But sometimes with Gradle if you see messages where the Gradle process crashes, just try it again and eventually it will go through in Python however We did discover that the pytest method that we’re using is very memory inefficient. And so the easiest way to get around that in Python is to run the tests in batches instead of running them all in one talk all at one time. So I show a new tox.ini file that you can use for Python that allows you to create batches for your tests. And actually, in the later milestones, we refine that even further because I continued to have this problem. But either way, you should be able to get around that absolute worst case, if you’re interested, it is possible to do these projects outside of Codio. The biggest benefit to that would be, you’d be able to work on your own machine and you’d have a lot more horsepower. The biggest downside is I wouldn’t be able to directly see your project in Codio so you’d have to commit your code to git and I can walk through it there. So if you’re interested in that, let me know, my eventual plan for CC 410 is to include a video toward the beginning of the semester explaining how to do that. I didn’t get to that this semester, but it’s something that I’d like to add in the future.
So looking ahead, as we’ve talked about module eight is going to be on design patterns and combos, I’m super excited about module eight, I’ve always wanted to teach design patterns. And so I think this is going to be a really interesting opportunity to see how that works. As part of that, we’re also going to look at test doubles. So test mocks and stubs and how we can make our unit tests a lot more efficient. Modules nine and 10, we’re going to deal with external libraries and how to create a release of our project. So by the end of module 10, you’ll know how to make a JAR file or a Python wheel file and how to actually make your project available as an external project for somebody else to use. So week 9 and 10 is going to be very similar to weeks four and five, where we have two things going on at the same time. So that’s something to keep in mind. And then of course after week 10 will go into things like web API’s and some external stuff. Mostly those restaurant milestones will start to be a little bit smaller, and it will start giving you a little bit more time to work toward your final project as we get toward the end of the class.
So other than that we’re very close to halfway through the class so I hope you’re enjoying things so far. If you have any questions, comments or concerns you can always contact me via via the cc410-help email address or on Discord I’m always happy to help. Otherwise, I look forward to seeing your GUIs when I start grading them today, and if you have any questions just let me know. Good luck.
Hello, and welcome to the CC 410 video for week eight in spring 2021. So this point you should be wrapping up restaurant milestone five, which is where you add a lot of event based programming into your GUIs. And so hopefully it’s been going well, I realize I’m a little bit behind on grading, but I will be getting caught up this week, as we’ll talk about here in just a second because I have something to do this week.
This coming week, week eight, we’re going to be focusing on two really interesting topics. These are two of the topics I was really excited to teach in CC 410. Because a lot of students don’t see them this early in their curriculum. The first one we’re going to cover is design patterns. These are ways that we can structure programs in a way that is familiar to other developers. And I think it will really open your eyes to some of the ways that we can improve the code structure of our programs a little bit and make things a little bit easier to work with. I know for me, it was really enlightening when I really learned how to use design patterns correctly. So I hope you get the same result there. We’re also going to look at test doubles. Sometimes these are referred to as mocks or stubs or fakes. But there are ways that we can build unit tests that use fake objects instead of the real one so that we can control what we’re actually testing in our unit tests. And so to go along with that, we’re going to create a couple of classes in our restaurant called order and combo that we can use test doubles to actually mock the rest of the functionality and test just those two classes themselves. So we’ll have a short example where you’ll do some design patterns and work with some test mocks in a really quick little example projects. And then for restaurant milestone six, as we’ll talk about the second you’ll implement those orders and combos. One thing for me this week this week is the computer science educators conference is a virtual conference, but it’s every day from like noon to 8pm. And so because of that, I’m going to have some limited availability this week, mainly because I’m focused on keeping up on the conference. The nice thing is I can usually get grading done behind the scenes while I’m listening to the different conference presentations and interacting there. So I will be getting caught up on grading, but I won’t be doing a whole lot else this week. But I will do my best to keep up with email. So if you email me, you might get responses at weird hours as I try and catch up with email. But otherwise, I may have kind of limited availability this week.
So for milestone six, you’re going to be doing a couple of different things, the big thing you’re going to be doing is adding orders and combos into your restaurant projects. So those two classes allow us to exercise some design patterns, we’re going to go back into the data package a little bit and add some more features there. Specifically, we’re going to focus on a few of the design patterns that you’ll learn about this week, which are the factory method pattern, the builder pattern, the singleton pattern and the iterator pattern. And so you’ll build those two new classes, you’ll also build some quick adaptations so we can use them. And the main focus is on building those orders and combos and building all the unit tests to make sure that they work properly. This milestone has few changes to the UI, there’s just a couple of things I’ll have you add to set up for the next milestone, which is milestone seven. Milestone seven is a pretty large milestone, there’s two major parts to it. But it will be spread across two weeks, just like we did milestones, I think it was four, three and four. Early on, we spread one milestone over weeks three and four.
So we’re continuing to have some testing issues and Codio. If you’re using Java, you’re probably having Gradle die every once in a while, as I talked about before you can get it to work, you just have to restart the box, refresh the browser and try again several times, but it will eventually work. For Python, we found that the best method is to run these tests in batches. And so at the bottom of milestone six, I provided an updated tox.ini file that you can use for Python. If you really run into issues, I have started the work of taking these projects outside of Codio. I do have them set up on my desktop, I have my restaurant model solution set up in Windows subsystem for Linux, it seems to work really well. I think you could also do it without windows subsystem for Linux. If you have a Mac or if you run Linux, it should be really easy to install tools like Python and Gradle and Java, and do these tests outside of Codio. So if you’re interested in that, it’s something that I’ve intended to do and CC 410. But I do like the features of Codio, especially when I have to help with different questions that you have, I can go look through your code. But if you do run into big issues, let me know and I can help you pull these outside of Codio to run some of those tests.
So looking ahead, this is week eight. Next week, we’ll have week nine and week 10. We’re going to do those as combined. So there will be one milestone across week nine and week 10. But there will be two different lab modules that you’ll go through. Module nine will cover external libraries for you’ll add a library to represent a cash register for your projects that will be a lot of fun and that will be the major milestone is incorporating that cash register into your project and also incorporating the orders and combos that we built in the previous month. milestone module 10 is kind of a quick milestone where we’ll look at what it takes to actually actually package your project and make it available as a release. This is something we won’t actually do. But you’ll do it as part of an example just to see what that looks like. And then, of course, because this is one of those combined weeks, sometime before week 10, you’ll need to schedule a time to meet with me for your final project. Again, hopefully, by this time, your final project is starting to take shape, or at least you have a pretty solid idea of where you’re going. As we move into April, the milestones for the restaurant project should get a little bit smaller. And that’s supposed to give you more time to work on the final project as we go forward in April. So that by early May, you’ve got a pretty good final project that you’re ready to present. And then of course, as we go through April, like always, we’re going to talk about web API’s probably look at some serialization, things like that.
So as I said, we’re at week eight, we’re finally at the halfway mark of the semester, it’s going to be a very long semester, because we don’t have spring break this week. If we do reach a point where we feel like everybody’s getting a little overwhelmed, we can kind of back things off a little bit, but so far, I think everybody’s keeping up there’s just a small group, but if things are getting a little overwhelming, let me know and we can adjust things as needed. But otherwise, keep up the good work. Keep pushing at it, and we will see you next week.
Hello, and welcome to the week nine announcements video for CC 410 in spring 2021. So this week, I’m a little bit behind getting stuff post to the Canvas, but it will be posted shortly. I’m waiting on the last couple of videos to get rendered from our videographers. But this week, we’ll be starting on working with external libraries. And so we’ll learn about those external libraries we’ve been installing in our programs, how to use them. And then we’ll actually do an example working with an external library that I created. And so you’ll actually use that you’ll explore that a little bit and then we’ll take that into our project. This week is like week four, and five we did earlier where we will have weeks nine and 10, kind of combined together. And so this week is going to be pretty short. But hopefully, you’ll be able to start in on the content in week 10, because you have both a restaurant milestone and a file final project milestone due next week, we’ll also give you a chance to do the start-stop-continue survey again. So if there’s any feedback you have for me on things you’d like me to start doing in this class, the things you’d like to make sure I continue doing in this class or anything that I’m doing that you’d like me to stop doing, because it’s not useful to you. That survey is where you can let me know.
So next week will also be published very shortly. Hopefully it should be out later this afternoon. Next week is all about creating releases, we’re going to briefly talk about how to take the software you’ve written so far and package it up as a release, so that you can make it available to other people. This we won’t directly use in our software project. But it’s a really cool thing to have. But the big thing we’re working on next week would be the seventh milestone for the restaurant project. And then also the third final project milestone covering GUIs.
So for milestone seven in the restaurant project, there are really two parts to this milestone. The first part is to finish building the combos that you created in milestone six by actually building the GUI for that. And as part of the example, you’ll learn a little bit about how to build that in one of the example projects. So hopefully, you can adapt that into this project as well. So part one is mainly just getting the combos working, getting all the buttons out into the GUI, updating the sidebar panel, so it can handle combos, things like that. And then part two of milestone seven is checkout where you will use the external library I wrote to mimic a cash register. And so you’ll have users click the Checkout button, they’ll get to choose either cash or credit card. And then based on what they choose with credit cards, it’s pretty simple with cash, you have to accept an amount of cash from them and then calculate the correct amount of change. But in either case, you have to interface with the register library properly. Make sure you read the documentation for the register library very closely. I’ve also made the source code available to you. So you can look at that I’m not sure if I’m going to do that in future semesters or not. But this semester, you get to look at the source code. It has a lot of exceptions that it will throw so you have to do things in the right order in the right way. So make sure you read the documentation that I provide you for that register library to make sure you understand how it works. And then at the end, you’ll print a receipt. And you’ll write some unit tests that verify some of your functionality works correctly here. To go along with that for the final project milestone three. Hopefully by this point, you started doing some coding on your final project, you should have kind of an idea of what your class library might look like, you might have some sketches of your UI, or maybe even a framework for your GUI. But keep in mind, we’re now over halfway through the semester and things are gonna start getting really fast really quick. Once you get done with milestone seven, you’re going to have basically five weeks left to really work on your final project. It’s a 16 week semester, but you really have about five weeks to get to week 15. And then the 16th week is finals week, where you’ll be presenting and working on other stuff, you know the classes, so it speeds up really quickly once you get past this halfway point. So keep that in mind.
Looking ahead, I’m going to start working on module 11. This week, the next few modules are going to cover a web interface for our program, I don’t think we’re going to get as far as actually accepting orders via the web interface. But I will work with the menu and we’ll work on some web topics. Mainly this is to give you some of the skills you might need to take a project like this and actually make a web based interface for it instead of a traditional GUI interface for it. Because that’s really where a lot of the industry is going. So I think this is a really useful skill to have here in CC 410. The next few milestones for the restaurant project I’m thinking will be a little bit smaller. I’m trying to reduce the size of those milestones for this last chunk so that you’ll have a little bit more time to work on your final projects each week. So we’ll see how that balance comes out as I work on that module.
Other than that, we’ll be working on getting our applications onto the world wide web. So hopefully that’s exciting to you. As always, if you have any questions or concerns, feel free to let me know either via discord or via the cc410-help email address and I’d be happy to help you out. Otherwise, good luck with this double week working on milestone seven, the last big gooey milestone in the restaurant project. And hopefully we’ll get to the Web Project very shortly.
Hello and welcome to the CC 410 week 10 video for spring 2021. You’re working on a double week this week so this week is basically continuing the stuff that you’ve been doing for week nine and week 10. So this week you’re going to focus on releases where we actually take our software and package it into a release package that you could then share online you could upload to some of the package managers that we’ve seen. So you can do lots of cool stuff with that we’re not actually going to use it in our project but it’s a really cool tool to have in your back pocket.
But the big thing you’re working on this week is milestone seven for the restaurant where you’re building the checkout system and actually integrating the orders and combos that you built in milestone six. This is one of the larger milestones, but it’s one of the last big milestones for this project. Also this week you should be scheduling a final project meeting with me. Hopefully this time you’ve got some ideas for your final project you maybe got some code written down and you have an idea of where your path is going forward. We’re just about getting into April which means you’ve got one month and a little bit more than that to work on your final project over the next few weeks. We’ll still have a few more restaurant milestones, I’m shooting for probably either 10 or 11 milestones in total so there will be four, three or four more but you’ll have more time to work on your final project. These will be slightly smaller milestones than the ones you’re used to just to give you a little bit more time to work on your final project.
So we talked about milestone seven last time, so i’m not going to talk too much more on that. Big thing is getting the GUI for the combo created and then integrating the checkout portions using the external library that i gave. So hopefully this works really well. It’s very much an open ended milestone; there’s a lot of different ways you could accomplish this so if you have any questions on style or usage or anything like that feel free to ask me via the cc410-help email address or via Discord and I would be happy to help you out with those.
Looking ahead, I’m working on the next modules right now, probably later today I’m going to record the example for the module 11 which is going to be on web interfaces, and so the next milestone in the restaurant project will be building a simple web interface for the menu but it really starts to open your eyes to what you can do with web technologies in this project. But, like I said we’re going to have more few more milestones; there’ll be smaller than the previous ones for the restaurant project and the hope is to give you more time to work on your final project toward the first of May.
So that’s all I’ve got this week. If you have any questions you can always reach me via the cc410-help email address or on Discord. Otherwise, good luck on your milestones, I look forward to meeting you all this week for your final project and keep up the good work!
Hello, and welcome to the week 11 announcements video for CC 410 in spring 2021. We’re on week 11, which is starting the next set of restaurant milestones. And so this week, we’re transferring our focus from actual desktop GUIs to data driven websites. So this chapter, we’re going to introduce the World Wide Web, we’re going to talk about all sorts of different web technologies. And then you’re actually going to learn the basics of building your own website using the application that we’ve already been working on. And then for the milestone, we’re going to actually build a menu that is driven based on the data in our existing application. However, I want you to keep in mind this week is the start of the weeks leading up to your final project presentation. And so these milestones are meant to be a little bit smaller and give you a little bit more time to work on your final project. So set yourself a goal to work on your final project a few hours each week, so you can keep iterating on it and keep improving it as we go along.
So for milestone eight, we’re going to learn about how to build a data driven website. To do that, we’re going to install a web framework into our existing restaurant application. And then in that framework, we’ll set up some routes will set up a controller will set up a Master Layout template. And I’ll actually show you in the example how to load a template from bootstrap, which is a great place to get a lot of template and CSS content. And then you’ll set up the templates for those routes. And at the end, you’ll actually be able to build a data driven menu, a menu that is built entirely on the fly based on the classes that we built in our restaurant application.
Looking ahead the next module after this, we’re going to spend a little bit of time on getting data from the web browser. So we’ll talk about web forms. And we’ll use that to actually create a filter for our menu. We’re also going to look a little bit at serialization. And I’m still taking a look at web API’s. I haven’t come up with a great way to include that into this yet. But my goal is one of the last milestones will at least cover some of the basic information or web API’s, probably linked into the restful stuff that we’re going to do in the next milestone. As a reminder, like I said, these are meant to be smaller milestones, I’m hoping that they don’t take quite as much time as last few restaurant milestones have. However, if you’re not familiar with web programming, or HTML and CSS, it might be a little bit of a transition for you. Don’t worry too much about how your website looks. We’re mainly focused on the functionality. But if you want to spend time working on the looks just like you did with the GUI project, you’re welcome to do that. My goal for this class is for the last restaurant milestone, either milestone 10, or 11. Depending on how big I make the last couple. I have that due on May 3, which is the first day of dead week. And that basically gives you all of dead we can all finals week to wrap up your final project, have a couple of project meetings with me and then schedule and present your final project presentation as the wrap up in this course.
So that’s all I’ve got for this week. We’re getting into the world wide web. I hope this is exciting and interesting to you especially because a lot of applications today, you really see more and more applications being used directly on the web. And so I think it’s a really cool skill for anybody in programming to have. I hope these next few modules are really useful to you and interesting. As always, if you have any questions you can contact me on discord or via email at the cc410-help email address. Otherwise, I look forward to seeing your websites and good luck this week.
Hello, and welcome to the CC 410 announcements video for week 12 in spring 2021, so we’ve made it to week 12. And this week we’re working on HTML forms and the REST architecture. Most of them are going to focus on HTML forms in the example and in the project. But we’re going to talk a little bit about REST and some other things that will set the stage for what we’re going to do in the next milestone. And as always, during these last few milestones, I’d like you to remember to keep working on your final project, I’m trying to make these milestones a little bit smaller and a little bit easier to work with. So you’ll be able to have some time left over to work on your final project.
So for milestone nine in the restaurant project, what we’re going to do is add an HTML form to the site, we’re actually going to do two forms, we’re going to do a simple search form based on keywords that will allow users to search for a particular word or phrase in the menu and then pull up the menu item that matches that will also build a more advanced search and filtering mechanism where they can filter based on type of dish, they can also filter on calories and price. This will be very similar to what we’ll do in the example project where we’re going to build a simple filtering mechanism for the movies. So hopefully, you can take a lot of that information from the example and bring it directly into your restaurant project. To finish this milestone, you’ll also write some static search functions in the menu itself. And so those search functions, I’d like you to write unit tests. For those unit tests, I highly encourage you to try and use test doubles, that will make your tests a lot easier to work with as you’re doing this.
So looking ahead, I’m planning on there being two more restaurant milestones after this. So we’ll get to 11 milestones in total, we’re going to try and cover the rest architecture and serialization for sure. And then we’ll also try and hit some external web API’s. If we have a little space in those two milestones, I’m still working on building out those last couple of milestones and making sure that they’re the right scope for this project. But like I said, they’re going to be smaller milestones to give you more final project time, the final milestone will be due on May 3. So that will give you effectively all of dead week and most of finals week to work on your final project. And then a little bit later, we’ll talk about final project presentations and how that will work. So stay tuned for that they’ll probably be a video coming out for that here within the next couple of weeks.
So one thing I wanted to make you aware of is at K-State this Friday, April 16 is the well being day on campus. I’ve put the full reasoning behind it from the Provost in this slide, you can take a look at this, you’ll probably see a posted in K-State today. Basically, the idea is because of the pandemic, we don’t have a spring break this year. But we do recognize that having 16 weeks straight of class is very brutal for students as well as faculty. And so they’re giving us a well being day this Friday that is meant to be non instructional, no homework, no meetings, no classes, no nothing. It’s a time for us and for you to take a break and spend the day on your mental health. And so what I’d like you to do on Friday is don’t think about this class. Hopefully don’t think about any of your classes. Hopefully the entire university follows this policy like they should. Instead, try and take Friday to relax and have fun. Don’t treat it as a catch up day. Don’t treat it as an extra day to do some other work if you can. But really see if you can find some time on Friday to relax and have fun, do something that is fun for you, whether it’s read a book, have a really good meal, go out and walk in nature, take a nap call family or friends. Whatever that means for you. I really encourage you to take Friday and do that. Your mental health is really, really important. And especially as we’re getting toward the end of the semester, things are going to get more stressful, you’re going to be very busy. And so don’t be afraid to take those times to recharge your mental health and your physical health before you attack those problems.
So that’s all I got for this week. I hope you get to take a page from Garfield’s book and find some time to relax on Friday. I know I am. My wife and I were actually planning on going camping this weekend. So hopefully the weather stays warm and dry and we can do that. As always, if you have any questions about CC 410 feel free to email me via the cc410-help email address or you can find me on Discord. But hopefully you can get through these next few milestones and you’ve got some good ideas for your final project and I look forward to seeing what you do. Good luck.
Hello, and welcome to the week 13 announcements video for CC 410 in Spring 2021. So we’re at almost at the end of the semester and this week, we’re going to be covering restful architecture and how to build a RESTful API in our web applications. This week, the textbook chapter on web API’s is not quite finished as of Monday when I record this, so I’ll be posting that probably later this week. But you can go ahead and get started on the example and the restaurant milestone for this week. The textbook content is not really required to understand what’s going on since we actually introduced RESTful architecture last week anyway. So keep your eyes open for that. I’ll send out emails as soon as we get that done. But this week, the major goal is to take our web applications and build a RESTful architecture inside of it to in this case, we’ll actually be managing custom restaurant items, which should be really fun. And then of course, don’t forget to keep working on your final project, you basically have three weeks left at this point. So hopefully, you’re getting some good work done in your final project. And you’re starting to see the end result coming together.
So for this milestone in the restaurant project, like I said, we’re going to be building a RESTful web application, specifically one that allows you to add and edit custom menu items for your restaurant. So in addition to building the rest of a web app, we’ll also be reinforcing a couple of design patterns in how we handle those custom items, specifically the iterator pattern and the singleton pattern. And then also, as part of this milestone, I’d like you to update your UML diagrams to include the new classes for the web application, it really shouldn’t be that hard. There’s just a few new classes you’ll need to add and some linkages you’ll need to put in there. But it’s something we need to do every few milestones to make sure we’re up to date.
So next week is week 14. It’s the last actual week of the semester before we hit dead week and finals week. So week 14 is going to be the last major restaurant milestone. And we’re going to cover things like serialization and form validation next week. And so we’ll have a textbook section and example and restaurant milestone, like always. This is not going to be one of those double weeks, I plan on having everything due on the 3rd. But it’s going to be a small milestone like these last couple, so it should be manageable. And then also sometime next week, you’ll be scheduling your fourth final project milestone with me to catch up and see where you’re at on the schedule. This one’s supposed to be talking about external libraries and API’s. But we’re we’re really just talking about wherever you’re at on the final project. And then of course, keep working on your final project as well.
So once we get past next week on May 3 is when everything’s due there, the only things you’ve got left during dead week and finals week, if you’re all caught up is I’ll probably have a textbook section for dead week that’s just extras. Mainly these are things that I wanted to talk about this semester, but didn’t get time or things that are important, but maybe don’t deserve their own chapter. So it’ll be a lot of just little tidbits. All there will be is a couple of quizzes in that textbook section. And that’s it. For some of those, I may do an example as well that you can work through, it should be a really simple example, kind of like the parallel programming one where it’s going to be really small, but give you a chance to play around with some of those. And then the big thing is your final project is due the end of finals week, which is Friday, May 14, that’s when you need to have everything into me by 11:59, Friday, Friday evening on the 14th. That is the absolute last time that I can accept anything for this semester. So on your final project, I encourage you to take a look at the final project requirements page and make sure you’re keeping up with all of that. For the final project, remember, we’re doing kind of a criterion grading, where as long as your final project has all of the parts that are required, and that they make sense. you’ll most likely get 70% on the project just from that. And then the rest is how well you implemented it, how well your presentation goes, things like that.
So I’ve had a few questions about what exactly do you need to turn in on the final project, the big things you need to turn in is you need to have a release tag made on GitHub, just like everything else we’ve done this semester. And you’ll submit that URL to Canvas. So make sure you read the requirements page, make sure your code meets all of those requirements. It’s pretty clear. But if you have any questions, let me know. Your code should also have full code documentation. So all of the documentation comments in your code, so that we can generate the docs using either javadoc or pdoc. So make sure you’ve got that done. It’s not explicitly required, but I really encourage you to either write a README or some user documentation on exactly how to use your app. You can write it from the view of someone that has access to your GitHub, what would they do after downloading your code and being able to run your code? What commands do they need to use what things they need to install, and maybe a quick tutorial about how they can use the application to do whatever it does. So some user documentation or README documentation would be very helpful for your final project. And then of course, the last big part of your final project is the presentation. So, for the presentation itself, I’d like your presentation to last around 30 minutes, you’re welcome to either pre-record your presentation, and I’d be happy to help you with some software for that. I currently use OBS to record these videos. But you can also record directly in Zoom if you’d like. So you can pre record your presentation if you’d like, or you can present it live to me to present it live. I’ll send out some details a little bit later. But you’ll just schedule a time via calendly. And we’ll meet up there. I’ll also when you present, I’ll ask you if you are okay with sharing your presentation and your project with the class. Normally, in a in class scenario, we would do this as part of the final. But since this is online, a synchronous it’s kind of hard to do. But I will ask if you’d be willing to share it with the class. The other thing I will send out real quick is a poll seeing if there’s any interest in actually doing a live presentation session for the folks that are presenting their final projects. So if there is enough interest in that I will set up a live session we can all get together, check out each other’s project, chat about whatever’s going on in computer science, things like that, sometime during finals week. So I’ll send out some of that information via canvas here in the next couple of weeks.
The other question I usually get on these is what exactly should my presentation include. And so here’s a really quick suggested outline of what I’d like to see in your presentation. It doesn’t mean you have to do all of this, it doesn’t mean you can’t do something different. But if you’re not sure where to start, here’s a good background. This is very similar to what you’d see for a standard research paper template. So you have an introduction section, obviously talking about your project. background is really looking at why you chose to develop this project, maybe in other related projects are inspired by projects, things like that, but kind of explain to me why you chose to do this particular project and what you’re hoping to get out of it. implementation is the big part talk about how you built your project, what tools you use, to how the code works, all sorts of things like that fall under implementation, that’s probably the biggest section. Evaluation is your look at how well your project came together. Typically, for a lot of programming projects, you’d look at performance, or you’d look at usability, things like that. Since we’re not doing any formal evaluation. This is basically your how happy Were you with the project? How well do you think it works? future work is pretty obvious. It’s anything you’d like to do in the future to continue to improve this project. And then you’ll have a quick conclusion. And then at the end, you’ll have time to actually open up your project and do a demo. Of course, you can do some demos, or some quick things as part of the implementation and evaluation sections as well. It’s kind of up to you. But I kind of like to do the demo at the end. So you don’t break the flow from the presentation having to jump into your application. But if you pre-recorded or you’ve got it set up pretty slick, you can jump back and forth pretty easily. That’s not too bad.
So that’s where we’re at for week 13. Week 13 is usually the scariest week of the semester because you’re getting close to the end but you’re not on that downhill slide of dead week and finals week. So hopefully you can stay courageous and you can keep working on stuff. As always if you have any questions in this course you can contact me via the cc410-help email address or on Discord. I’d be happy to chat with you anytime. And if you have any questions, let me know otherwise, good luck this week and I will see you next week.
Hello, and welcome to the week 14 announcements video for CC 410 in spring 2021. Well, we’re on week 14, we’re almost at the end of the semester. And so this week is really the last week of new content that we will be working with. So this week, we’re going to cover serialization in the textbook, which is the process of saving your program state to a file and then restoring that state from the file later on. We’re also going to cover form validation, which we talked about in a previous chapter, but we’re going to see an example of how that actually works. And then for the restaurant projects, you’re going to implement both form validation and serialization with your custom items, so that you can create those custom items, save them and restore them when your program reloads. And also, this week, you’ll be working on your final project. And so this week, we’ll have milestone four, where I’d like to schedule a meeting time to meet with me and discuss your final project and see where you’re going from there.
So this week, like I said, for the restaurant milestone, there’s two things you’re going to work on. The first one is form validation so that as you submit your custom menu items, it validates to make sure that they fit within the range. So it helps ensure that your form data is correct, and it will display some help layers to the user If it isn’t, and then really all, you’ll also work on serialization. So the ability to store your custom items to a file, and then when your program reloads, it will load those custom items from the file and display those to the user. You’ll also be able to choose whichever text or binary format you want to use. So you can explore different types of serialization formats. It’s entirely up to you which one you want to use, but the textbook includes examples for all of them.
For the rest of the semester, after this coming week, there are two weeks which is dead week and finals week. So the only things that you’ll be working on in this class after May 3, when this milestone is due, is there will be an extra section in the textbook, I’ll try and get that posted sometime in the next week or so. All that is going to be is some pages of things that we didn’t cover this class. But I feel like you’re important to at least mention, there may be a couple of short quizzes to go along with those, but it’s not going to be too difficult. I had in the plan and a plan to do an example project for the extras I’m not sure if that will come together or not. So if I’m going to do it, I’ll post it soon. If not, I will let you know that you don’t have to worry about it. But my goal is by middle of that week, any of the extra stuff will be posted and you can take a look at that. But really the big thing you should be working on after May 3 is your final project. And your final project presentation needs to be scheduled and performed either via video or via zoom with me no later than the end of finals week, which I believe is may 14 this year. So make sure you’re keeping that in mind.
We went through this last week, but I’ll quickly go through this again for your final project. The major deliverables are creating a release tag on GitHub with all of your source code, your source code should have code documentation inside of it explaining how it works, I highly recommend creating either a readme file or a user documentation or something that explains how your project works and how to use it. And then also in your Git repository, make sure you add your presentation materials, so any slides or notes or anything you use for your presentation. Also make sure you submit those along with your code. And then you’ll actually give a presentation to me, you can either record it and send me the video file or you can do it live via zoom, it’s up to you which you prefer, your presentation should be around 30 minutes in length, you can either pre record it, like I said presented live. If you pre recorded I do probably I probably will email you some questions and have you respond to those just to get that q&a part. If you do a live we’ll do the q&a part directly during the zoom. And then I will be sending out a quick survey to see if you’re interested in sharing your presentation with the class. And we’ll figure out how to do that. For several of you that are available, we might try and do a live session. So keep an eye on your email. And I will send out more details about that within the next couple of weeks.
For your presentation, the outline is the suggested outline is here. It’s entirely up to you whether you want to follow this or adapt it. But I have a lot of students see asked me what I expect in the presentation. And this kind of goes over it. I added this also to the final project page that gives a little bit more description on these sections. The big thing is you’ll have an introduction, introducing your project you’ll talk about background, which is where your project came from any inspirations anything related to your project there. The bulk of your presentation will be the implementation part which describes how you wrote the project, the code, the architecture, the structure, things like that. Your evaluation is basically how well you feel like the project you created met the goal that you set for yourself and how well it compares to any similar projects. If there are any. You’ll briefly discuss future work. If you could keep working on this project. What would you do next? Then you give a quick conclusion and then at the end, you can give a demo where you share your screen, bring up your project and actually show us how it works and what it does.
So we’re getting toward the end of the semester. I always like to use this GIF about this time of the year. The end is near home Hopefully it doesn’t feel too onerous onerous on you. But if you have any questions as always, you can let me know via the cc410-help email address or you can get in touch with me via Discord. I’m always happy to help. But hopefully this is your last big week of work in this project before you work on your final project. And as always, good luck and let me know if you have questions.
Hello, and welcome to the week 15 announcements video for CC 410 in spring 2021. We are on week 15, which means it’s dead week, there’s just this week and next week left in the semester. So there’s really not a whole lot left to this class. If you’ve been keeping up and you just turned in the last milestone and the last big chapter in the textbook, you’re pretty much almost done. So the only things that are left this semester, by the end of the finals week, there will be a extras section in the textbook, you will just have a textbook quiz ended, it won’t have anything else attached to it. I’m going to try and get that posted sometime this week. And then you’ll have through the end of finals week to go through those pages. Take that quiz. And then you’ll be done with that. You also have your final project milestone five, which is your final project presentation, you should schedule that sometime either this week or next week so that it is done by the end of finals week. And I’ll talk a little bit more about that later. And then also, you should be getting an email from the teaching evaluation system. In the next week or so I would really like you to take the time to fill out the TEVAL for this class. It’s very important to me because it helps me understand your views of the class what you learned how you experienced the class. And it gives me a lot of information that I can take and use to improve the class. And it also helps me improve my teaching style. So any comments that you have on the TEVAL are always welcome. Please feel free to be honest and open about anything you thought about this class things you liked things you didn’t like, because that will help make it better for future students to take this class from the next semester and beyond.
So really, the only thing you should be working on at this point is your final project. So don’t forget to the final project deliverables, you need to create a release tag on GitHub. And that is what you’ll submit on canvas as your final project. Make sure you read the requirements page for the final project to know that your final project meets all those requirements. It does use a form of requirements grading or specifications grading. So I’m really just looking for a final project that meets those requirements and does so in a fun, unique, useful, interesting way. Your code should have documentation in it. So you can generate the documentation using either javadoc or pdoc, you should also probably consider including either a README or some user documentation to help both me and any future users understand what your project is how it works, things like that. And then of course, you will give a presentation. And so for your presentation materials, any slides or anything, please make sure those are inside of your code repository on GitHub, you can just make a folder for that. But then you’ll need to schedule a time with me to give the presentation either live or you can record a presentation video, and submit that to me. But I’ll still want to meet with you live for the milestone, so I can do some q&a with you. Even if you submit the video. For your presentation time or your q&a time, go ahead and schedule with me using the Calendly link just like we do for all the other milestones. And it should be easy to do.
So like I said, your presentation should be around 30 minutes in length, you can either pre record your presentation, or you can present it to me live via zoom. If you would like I’ll ask you, when you get done, I will share it with the class if you’re okay with me posting it. And then it’s up to you. But we’d like to do some sort of a live session as part of your milestone just like for all the others. So go ahead, even if you’re going to pre record your presentation, go ahead and schedule a meeting with me via Calendly, if you pre record your video or watch it beforehand. And then we’ll use that as a q&a time instead of a time for you to present live. And it’s a good chance for me to wrap up with you see how things went ask if you have any last minute questions, things like that.
The presentation again, this is the suggested outline for the presentation. I’ve gone through this a couple of times. And I’ve also updated the information on the final project page with this. This is of course just a suggestion. A lot of students like to know what I’m looking for in a presentation. And this gives you an idea of what I’m looking for. You don’t have to follow this outline. You can rearrange it however you want. But this is my suggestion of the types of content that you should have in your final project presentation.
So that’s really it. We’re close to the end of the semester, you can see the checkered flag and the distance. So I hope everything is going well with you I will work on getting a lot of grading caught up today. So if you submitted stuff on time yesterday, I should be getting that graded today and you’ll get that back and you’ll have a pretty good idea of where you’re at in the class. If you have any questions, concerns, anything comes up please let me know via the cc410-help email address. Also please bear in mind that unless you have talked with me and have made some other plans with me, everything in this class is due Friday of finals week, which is May 14 at 11:59pm. I cannot accept any late work after that I cannot accept any projects after that. That is the absolute last deadline that I have in this class. So unless you’ve made other arrangements with me, make sure you have everything turned in by that deadline so that it gets it in time for me to get it graded and get it posted as part of grades early that next week. So I wish you the best of luck as the semester wraps up, you’ll see one more of these announcements videos next week. That’ll be pretty short and sweet. But I wish you the best of luck and if you have any questions please let me know.
Greetings to students in CC 310 and CC 315. My name is Russell Feldhausen. And I’ll be covering for Emily this week while she is out of the office. My contact information is here Feel free to get in touch with me if you have any questions. Basically, everything should be pretty much the same this week as normal. If you need any help, please email the course email help address that is cc310-help or cc315-help. That goes to me It also goes to your instructor and any other TAs that we have anytime we teach these courses. So please continue to use those email addresses if you have any questions. Just like your normal instructor, Emily, I will try and respond within one business day. Hopefully it should be a lot faster. But I usually guarantee a response within one business day. If you get really stuck and you need more help than I can do via email. I can work with you to schedule some time for us to meet with via Zoom. And then of course once Emily gets back, I will collaborate with her to make sure she is filled in on all of the stuff that we have done while she’s been gone. Probably the one thing I won’t do is answer any grading questions on previous stuff. I will leave that for her to answer. The questions on any projects that you’re currently working on. I’d be happy to help you out. So that’s all I’ve got. I just wanted to introduce myself real quick so you know who you’re talking to this week. If you have any questions please email and let me know otherwise I’m rooting for you, best of luck and I will look forward to working with you this week.
Hello, and welcome to the week one announcements video for CC 410 in Fall 2021. My name is Russell Feldhausen. And I’ll be your instructor this semester. My contact information is here on the screen, you can also find it on the syllabus, I’m email is by far my preferred communication method. In this course, there is a special course communication email that’s listed on the syllabus. I prefer that you use that when you contact me. But you can also contact me directly if you have any questions outside of the course. If you email me, I will guarantee a response within one working day. You can also reach me on Discord, I have a Calendly link that allows you to set up one on one office hours with me. So there’s lots of ways that we can get in contact.
So this is a relatively new course this is actually the third semester that we’ve taught it. This semester, I’m going through and doing a lot of work to clean up the content in the course. So the assignments are getting updated, we’re working on moving the textbook out of Codio and into a web platform that’s a little bit easier for us to maintain. I may also rework some of the examples. So the big takeaway from this is things may change, I will try and let you know as changes come. And I really, really welcome your feedback. If you have any thoughts on how I can make the course better or more accessible or more interesting, please let me know I’m always looking for ways to improve all of my courses. And where this is a new course, I’m especially looking for any information you have whatsoever.
So this course the big picture, we’re going to do a lot of advanced programming. This is meant to be a course to give you time to practice your programming skills, and really build from being a beginner programmer knowing some data structures to actually being able to build large useful programs. So in this course, we’re going to spend a lot of time learning about object oriented programming concepts, we’re going to work on building graphical user interfaces. And we’ll spend a little bit of time at the end looking at web interfaces as well. We’ll do lots of interactive examples. The examples all come with hour-long explainer videos where I walk through every step of the code and really talk through how I build it. Hopefully, that’s really useful for you. And then throughout the semester, you’ll do a large restaurant project, we’re going to build a point of sale system for a fictional restaurant. And then you’ll also be able to work on an independent final project to demonstrate your skills and do something of interest to you.
In this class, we’re going to explore a lot of new technologies that you haven’t seen before, we’re going to start off learning Git and using GitHub classroom to manage a lot of our code. We’ll use automation tools such as Gradle, and Tox to handle compilation and running a lot of the tests and things that we want to do in our code. For Python users, we’re going to add in type checking. So if you haven’t done any typing before, in Python, this will be really new to you. For Java users, we’ve been doing this already, so you don’t have to learn anything new here. But for Python, this will be kind of new. We’re also going to do some unit testing so that we can actually write tests to make sure our code is working correctly, we’ll learn how to check for style to make sure that our code is formatted and structured in a proper way. And we’ll learn how to write documentation comments in our code. So a lot of new technologies and ideas that we’re going to cover very, very quickly in this class.
In addition, like I said, there will be a final project, you get to choose the topic, I want you to align it with things you’re interested in. If you’re in the ICS program, you might want to align it with your major. Likewise, if you’re doing the CS certificate, you might want to align it with your outside major as well. I really want you to use your new skills in this class to build this project. But you’ll get to work with me interactively to discuss the scope and get some ideas and get some feedback on where to go. There are four milestones that you work on. And then the fifth milestone is presenting it to the class itself.
So right now we’re on week one week one is pretty simple. There’s just a lot of administrative stuff to go through. And then you’ll start working on the first example project, which is called Hello Real World. It’s a rework of the traditional Hello World project, but done in the style of this class using Git and GitHub, using unit tests and style checking, and all of the things that you really need to write professional code. Outside of that you can learn a lot on the syllabus about my office hours about communication platforms. The one thing I’d like to point out if you’ve gotten started in this class already, I forgot to publish the last assignment I added over the weekend, which is to introduce yourself on Discord. This class has a Discord channel that I’d like you to use. So is one of the assignments just to make sure you’re on Discord, I’ll have you introduce yourself on Discord and ask me a question. Since this is an online class case, the Global Campus really likes us to have communication platforms available. So that’s why we’re kind of making sure this is available for everyone as well.
So once you get past week one, week two, we’ll start working on object oriented programming. This will be the first restaurant milestone in my sample project. When I demoed all of this, it was about 2000 to 2500 lines of code in total. A lot of it is boilerplate. So once you get one of the entrees, or pizzas or sides or whatever taken care of, it’s going to be mostly copy pasting and changing it. But be really thoughtful about your naming and your style, because there’s a lot of things you can do in week two, now, based on what you learn in the Hello real world project to make week three, and week four, a lot simpler.
Week Three, we’re going to go through that unit testing and documentation to your code. This one is probably one of the largest milestones we’ll do in the class, I think I added about 3500 to 4000 lines of code. My last semester, it was about 423 unit tests, I think this semester, you’ll be somewhere in the range of four to 500. But a lot of them are very, very similar code. But this is a great way to catch errors. In my model solution, I found about a half dozen errors just by going through and doing all this unit testing. So it’s a very useful technique.
Then we’re getting to week four, and five, where we will go through and refactor a lot of the code in our object oriented libraries to use inheritance and polymorphism. This one is not as much lines of code, it’s about 1000 lines of code. But it’s a lot of changing, refactoring, simplifying structure. So there’s a lot of code changes, but not a lot of new code added. And then you’ll also be working on the milestones. I forgot to change the dates in here, but there’ll be about toward the end of September. And then beyond that, we’ll start working on graphical user interfaces, external libraries, web library, serialization, libraries, all sorts of stuff like that.
So my big advice for this class, this is a four credit hour course, which means I expect eight or more hours of work each week. I think, for most students that have completed this class, it runs around 12 to 15 hours a week, which is about what you’d expect from a four credit hour course. So I really encourage you to schedule your time very wisely. Start early on these assignments, watch the example videos, work through them and leave time for questions. The one thing it’s really hard to do is work on these projects over a weekend. And then they’re immediately due early that next week. And you may not have a whole lot of time to get questions and feedback before it’s actually due. So start early, leave plenty of time for questions. There is a lot of boilerplate code in here. So as you copy paste code, make sure you do so carefully. Really bad copy paste can mean a lot more work for you, then being careful about what you copy paste and editing it very carefully, a little bit at a time. And then of course, in this class, we’re using Git, so use Git to your advantage - commit to Git frequently. The nice thing about Git is if you commit, and then you do something and it screws things up, it’s very easy to roll back to that previous commit and undo what you did. And then start again. So commit frequently commit early and often. And then of course, in this class, we’re going to be doing a lot of large code. So if you have any online resources that you use to learn particular things, make sure you cite them in your documentation. There are some times where you’ll be pulling code from external libraries or templates or documentation. And I want you to make sure you go through and cite that so that we know where you’re doing that. This is especially important for your final project, but it might also come up on the restaurant project as well.
Beyond that, feel free to keep in touch with me. We’ll have good discussion on Discord throughout the semester. I also host tee time office hours, myself and several faculty. So we’ll be online Tuesdays at 330 and Fridays at 1030. So you can always get a hold of us there. And then I have one on one office hours that you can schedule anytime via Calendly. So make sure you do that if you have any questions. Other than that, good luck this semester. And good luck on this course. I’m looking forward to working with you and hopefully we see each other again soon.
Hello, and welcome to the week two announcements video for CC 410 in Fall 2021, so this week today should be wrapping up module one and the Hello real world project. Those are both due today, make sure the Hello real world project that you get your submission posted on GitHub, and then send me the link for the release tag that you make in GitHub. It’s all explained in that project. So that should be pretty easy to do. Also, this week, I’d like to meet with each of you regarding your final project. So just jump online on my calendly link and schedule a time with me sometime this week. I will warn you that I’m out of the office on Thursday, I’m out doing some stuff around town in Kansas City that day. So I’m not available on Thursday. But I do still have a lot of openings on Friday, so I can meet with you then. I’ve also got times today, Tuesday and Wednesday afternoon.
So this week, you’re going to be starting into module two, which is the object oriented programming module. Here, we’re going to actually start building our long term restaurant project throughout the semester. And we’re going to start by building a lot of objects that make up the items of the menu in that project. So hopefully, this is a really good introduction to object oriented programming, especially if you’ve been doing work in Python, we’re really going to dig deeply into object orientation. It’s also a lot of stuff that’s useful for Java developers.
Some other updates. Don’t forget, we have a discord channel for this class. So you’re more than welcome to chat with me there. You can also send me emails to the cc410-help email address, and I’d be happy to answer those there. As you’re getting your projects graded, you’ll notice for the Hello real world project when I graded over the next couple of days, that there will be some comments left in the rubric on Canvas. But then I’ll also leave a bunch of code comments on GitHub in the feedback pull requests. So I believe when I leave those comments, you’ll get an email to your GitHub account. But if you go to the pull requests and look for the feedback pull request, you should see a whole thread of me going through and leaving code comments on your code. That’s one of the big things I will do throughout the semester. Otherwise, it seems like everything is going really well. I haven’t heard a lot from any of you. So hopefully that means so far, so good. But as always, if you have any questions, let me know.
And then don’t forget this week, you’re going to start working on the first milestone for this class. Each of these project milestones can be kind of lengthy. I’ve seen in previous semesters, students spend anywhere from three to eight hours or more on each of these milestones. So make sure that you’re allocating enough time for them. This first milestone is a lot of boilerplate code, setting up your packages, your classes, methods, attributes, things like that. You can also make things on you easier later by doing some style and documentation. Now, although we’ll spend more time in the next few chapters, talking about specifically how to do good documentation and style, but you can do some things right now to make it easier. In my model solution for last semesters project that was very similar to this one, it was around 1500 to 2500 lines of code depending on how you write your code. So it is a pretty large project. This already is bigger than most of the projects you’ve done up to this point in this program. So make sure you leave yourself enough time to work on this project. And as always, if you have any feedback about this project, or the instructions that you follow to build this project, please let me know it’s a brand new class, I’m always looking for ways to improve it.
But other than that, looking ahead, we’ve got the next few modules already lined out. Module three, we’ll be talking about documentation and unit testing. module four, we’ll talk all about inheritance and how we can refactor our existing code to take better advantage of object oriented programming paradigm. And then module five, we’ll talk about debugging and logging and some other topics. And then module five, you also do the final project second meeting, and that takes us through the end of September and into early October. So that’s where we’re at in this class. As always, if you have any questions, let me know. Otherwise, I wish you good luck this week and I look forward to meeting with you all about your final projects.
Hello, and welcome to the week three announcements video for CC 410 in Fall 2021, so you should be wrapping up at this point, the second module. So we have object oriented programming and the example. And then you also should be submitting the first milestone for the restaurant project. So hopefully that went well, it was a lot of building classes and objects in your code. I’ll be going through over the next day or so and doing a deep dive into all of your code, giving you some feedback on GitHub, as well as feedback in Canvas on ways that you can improve the code and get better. Also, please refer to the syllabus it does talk a little bit about the grading in this class. The big thing is once I grade it and give you feedback, you won’t be able to resubmit it for more points on that project. But you should try and improve any of those things that I point out for your next milestones. Although generally, I don’t hold you under double jeopardy, where if I take off in one milestone, I won’t take off again in a future milestone for the same problem unless it impacts what you’re doing in that milestone as well. So kind of keep that in mind. But hopefully, you should be able to take this feedback and use it to improve your code, your style and your structure as you go forward.
So this week, we’re working on Module Three, talking all about documentation, testing, and UML diagrams. We’ll have an example around documentation and unit testing. And then the second restaurant milestone is all about adding unit tests to your project. So for updates in this class, don’t forget, you can join our discord channel, there’s a great chance to have discussions there. Hopefully you’re on that channel. But if not, feel free to join. Also on grading, don’t forget that I’ll leave both comments on Canvas with the rubric. But also leave comments in GitHub. And if you have trouble finding the GitHub comments there in the feedback pull request. So in your GitHub repo, you click the pull requests at the top, and then go to the feedback pull request, and it will tell you all about my code comments. Otherwise, hopefully, things are going well. If you have any questions on finding any of these comments, please let me know.
For the second milestone, you’re going to be working on unit tests. Last semester, in the previous milestone, it was around 423 unit tests, I think this one’s going to be similar. So you should be in the range of about 400 to 500 unit tests in total. You’ll also be adding documentation comments to your code. So you can generate the documentation using javadoc or pdoc. You’ll also create a UML class diagram for your project. So a lot of this is not necessarily changing the code, but adding tests and documentation to the code. This one can take anywhere from three to eight hours to complete or maybe even longer, depending on your comfort level. And it’s rather large. When I did this last semester for the project, it was around 3500 to 4000 lines of new code, a lot of that is going to be either in unit tests or documentation comments that can be copy pasted, so it seems like a lot, but if you work your way through it, it makes a lot of sense. As with the previous milestone, I highly recommend going through and doing one of the large restaurant items first. For example, I think the He Man is the pizza that has almost everything on it. So do that one first, get the unit tests for it working. And then you should be able to use a lot of those unit tests to fill out the rest of the pizzas, and so on. Also, please feel free to give me any feedback on these milestones. I try and make the milestone assignments pretty clear what I’m trying to get to without giving you a lot of hints of how to get there. So if anything is unclear, please feel free to send me feedback. I’m always working on ways that I can improve these milestones to make them easier for you to work with and understand.
Some other hints for milestone two, the biggest hint that I will give you is do not look at the source code for your original classes when you’re writing unit tests. I know that that may sound a little counterproductive on the surface. But here’s what I mean. For example, if a pizza is supposed to be $10.95, don’t get that number from your source code, go back to the original menu in milestone one and get the number there and write your unit test using that number. Likewise, if a pizza is supposed to have certain ingredients and toppings, make sure you get that list from the original assignment not from your source code. Otherwise, you’re simply testing that your source code says what it says instead of saying what it should say, I think I’m a pretty decent programmer. But I had over a half dozen errors in my source code for this project the first time I did this. So it’s really worth your effort now to make sure your unit tests are checking and fixing a lot of those errors. Another thing you can do is use global attributes in your code and generalize some of your projects. So I’ll take a look at that. And also, don’t be afraid to generalize some of your unit tests you should be able to parameterize your unit tests across the crusts and sizes. But you won’t be able to do the individual ingredient toppings on the pizza itself. You can do the vegetable toppings, but not some of the meat toppings. So you can look at the enum parameterized tests as ways that you can do that.
When I talk about generalized tests, here’s a quick, kind of a piece of the solution from last semester. For example, if you want to test the price and the calories in a particular item, instead of hard coding those into the test itself, you could create some private variables at the top of your test class and fill in that data there. And so that way, you can actually just copy paste the test methods and change little bits like you can do a global Find and Replace for the Riker to be whatever class. But then when you duplicate this class, all you have to do is change the variables at the top to match the actual price and calories. This can make it a little bit easier to copy paste code between all the different classes. Hopefully, this makes sense if it doesn’t start working on your unit tests, and then come back to this. And I think it will start to make a lot more sense what I’m talking about here.
So looking ahead from this point, the next few modules will talk about inheritance and object oriented programming, which is really big topic. We’ll spend some time in module five talking about debugging. And we’ll also do a quick final project update. Module six, we’ll switch over to do graphical user interfaces, and we’ll talk about Event Driven Programming and etc. And we’ll kind of go from there.
So that’s all we’ve got for this module. It’s a lot of testing your code. Hopefully this is really useful. One of the things I hear a lot from people in industry that have come out of our department is they wish they would have learned more unit testing. And so that’s one of the big reasons we’re focusing a lot on unit testing now in this class and its companion CIS 400 is because it is something really important that you’ll see out in industry. So I wish you the best of luck on this mod– on this milestone. If you have any questions, let me know and otherwise, I will see you next week.
Hello, and welcome to the week 4 announcements for CC 410 in Fall 2021. So this week, you should be wrapping up the second restaurant milestone, which is all about documentation, unit testing and using UML diagrams to show us the structure of your program. Hopefully, that’s all going well, it’s all due tonight. So make sure you get that submitted online. As always, I’ll try and go through and grade it sometime tomorrow and give you really good feedback on canvas and GitHub. And hopefully you can use that to work towards your next restaurant milestone.
So this week, we’re going to be discussing inheritance and polymorphism. It’s one of the most important topics in object oriented programming. And we’re going to look at how we can use use inheritance to improve the structure of our programs by taking advantage of shared attributes and methods between classes that are related. Also, this week, I’d like you to fill out a quick survey called a start, stop continue survey. It’s completely anonymous, it doesn’t track anything about you. It’s in Qualtrics. Basically just asks you if there’s something you’d like me to start doing as your instructor, something you’d like me to consider stopping doing, or something that you see that I do that you’d like me to make sure I continue to do, I try and use this as kind of an informal tea Val at about a third of the way through the semester just to see if there’s anything I should change or do differently in my projects. And this week, you also get some time to start thinking about and working on your final project. And also the next restaurant milestone, which is actually due not next Monday, but the Monday after that.
So the following week, you’ll be working on debugging and logging, and lambda expressions, and all of those different things. And that’s when your third restaurant milestone will be due on September the 27th. So you’ve got two weeks to work on the upcoming milestone, where we’re going to do a lot of refactoring of your code. Also, that week, I’d like you to schedule your final project presentation. The second final project meeting with me. So it’s really important that you take some time over these next couple of weeks to think not only about your restaurant project, but your final project. So for the third restaurant milestone, this is where we will enforce all of the general requirements. So your code needs to have documentation it needs to have unit testing, it needs to have passed the style checker. For Python developers, it also needs to pass all of the type checking as well. So make sure you get that all in there. You’re going to be adding inheritance to your classes, we’re going to add a couple of new classes and refactor a lot of our existing classes to take advantage of those inheritance… relationships, you’ll also add some new unit tests, you’ll update your diagram. The nice thing is this is really only about a 1500 new lines of code. But there’s a lot of code that’s going to be changed and updated. And so this one is much more thinking about the structure of your program than actually writing tons of code. And then of course, as always, the feedback is always welcome on these restaurant milestones. If you have any questions or anything that’s unclear in the restaurant design itself.
So some hints for this milestone, big thing is to work in small chunks, try not to make all of the changes at once. But make a small change, like change one class, get all of the classes that should inherit that class changed, and then see if that works. You’re using Git, so make sure you keep that in mind. You can commit early, you can commit often. And if you make a mistake, you can always roll back to an earlier commit. There’s some really good guides online for how to do that. This time, you could also try test driven development. Now that you know how to use unit tests, you can write some unit tests of things that your code should do, and then refactor your code and see if you can pass those unit tests. The other big hint I give is, in this milestone, we’ll create an order item class. I really encourage you to inherit that on your base classes, not the individual entree and side and drink item classes. It’ll make sense when you get into it. But I really encourage you to do it that way. And then don’t be afraid to ask questions on syntax, especially when we start working on inheritance and polymorphism. There are some strange syntax that you might run into.
In the next module you’ll also learn about lambda expressions which have some strange syntax, so don’t be afraid to ask questions if you’re unsure. Looking ahead from here, module four, we’ll start we’re talking about inheritance this time. The next module Next week, we’ll talk about debugging lambda expressions. And you’ll also have a final project milestone due. Then we’ll get into the graphical user interfaces, we’ll spend a couple of modules talking about GUIs and Event Driven Programming, and how we can build a graphical user interface for our program. And then towards the end of the end of the semester, we’ll talk a little bit about web and web API’s and how we can build a web interface for our program as well.
One quick announcement I want to give you that’s important to this class. I will be going on vacation the first week of October so I leave on Friday, October the first and I’ll get back Saturday October the ninth. During that time, I may have some times where I have limited email and discord access, especially during the day as we’re traveling. So because of that if you have questions, please use the cc410-help email address that goes to me and it can also be forwarded to any of our other faculty that might be helping me out especially while I’m out on the road. I will be watching email and discord, I will try and respond, it will probably be very late in the evenings most days when I get to respond to you, but I will do my best to keep up. And so because I’m going to be out of the office, your responses may be delayed a little bit, I may not reach my 24 hour, or my one business day response time. And because of that, if there are a lot of questions on these projects, I may shift some due dates around to give you enough time and give me enough time to make sure that we’ve got everything covered. I don’t think this will be a big problem. That’s the week we’re introducing GUIs. And that project is generally pretty easy to follow based on the example project I give you. So I’m not anticipating a bunch of questions that week, but we’ll see how things go.
So other than that, hopefully your code is not on fire at this point. And hopefully it doesn’t get any worse as you’re trying to do all this refactoring with inheritance and polymorphism. But as always, good luck on this restaurant milestone. If you have any questions, let me know and otherwise you’ll hear from me again next week.
Hello, and welcome to the week five video for CC 410 in Fall 2021. So this week, you should be wrapping up the third module, which is all on inheritance and polymorphism. And starting to work on refactoring your code to take advantage of some of that. So right now, the chapter on inheritance and polymorphism is due. And the example is due. The next milestone, which is milestone three is not due until next week, so you’ve got an extra week to work on that. But things I’d like you to work on is, make sure you fill out the start, stop, continue survey, and also start thinking about your final project a little bit, it might be still too early to start working on the code. But hopefully, you can start thinking about ideas and looking at the class structure we built for the restaurant project, and thinking about how that class structure might adapt to whatever final project you’re interested in doing.
This week, you should be working on debugging and logging, which is a really important concept. We’re also going to talk a little bit about lambda expressions, which are really important for some of the unit testing that you’ll need to be doing. So for next week, you’ll be working on a debugging logging example. And you’ll be working on the third restaurant milestone which is refactoring your code to take advantage of inheritance and polymorphism. Also, on October 1, you’ll have the second final project meeting that should be scheduled. However, in just a second, I’m going to talk about some scheduling that might impact exactly when you want to get that done.
So for milestone three, this is the first milestone that we require all the general requirements. So make sure you have your code unit tested, have your documentation. And this time we’ll be enforcing the style guide. So make sure that your code passes the style checker completely. There shouldn’t be any issues in your code. As far as the style checker is concerned. You’ll be adding some new unit tests, you’ll be updating your UML diagram. Thankfully, since this is mostly refactoring, you should only be working on about a 1500 lines of code, it’ll be a little bit smaller than your previous milestones. But it will be a lot more in depth the work that you’re actually doing to update this milestone.
So some big hints for this milestone, just like every other milestone, try and work in small chunks, get a short little bit working; commit early commit often. Remember that you can use GitHub to roll back. This is also the first milestone where you could try test driven development. As you’re working on code, you could try writing your unit tests first, and then building the code so that it will actually beat those unit tests that will actually fulfill them. I also have a hint that it’s not in the assignment. But it’s a big hint that you can actually inherit the order item interface on your base classes. So pizza drink and side, instead of inheriting it directly in all of the subclasses of that. It’s a little bit different infrastructure, but I think it actually works better. And also this, this particular milestone your work on some new and improved syntax. So if you have any questions on syntax, especially in Python, but maybe also in Java, feel free to let me know and ask those questions. And I’d be happy to answer ways to do that. This especially comes in with a style checker. Sometimes making the style checker in Python happy requires some weird syntax to wrap your lines. So make sure you keep that in mind.
An update on the schedule. I will be on vacation from October 1 to October the 10th. So that is a week from Friday through the following weekend. During that time, I’ll be on the road a lot. So I will have limited access to email and Discord. I will try and check in about once a day and answer what I can. But I may not be as quick at answering. Because of that the grading for milestone four might be delayed. Milestone four is still due the Monday that I’m gone. But it might take me a little bit time to get to that. Thankfully, it’s mostly just getting your GUI up and running. So there’s not a whole lot of code there. It’s mostly just building your GUI, so you kind of know if it works or doesn’t. Based on previous semesters, with that milestone, I expect minimal questions. But if there’s a lot of questions or a lot of confusion, I may adjust the due dates on either milestone four or five, if needed, just to give me enough time to answer those questions. So we’ll kind of play it by ear, I’ll do the best I can to stay in contact while I’m on the road. But if things happen, I will do my best to make sure that it’s fair and equitable for everybody involved.
So looking ahead from there, after this milestone, we’ll start switching over to graphical user interfaces. So we’ll spend some modules learning about GUIs, Event Driven Programming, we’ll spend a lot of time talking about design patterns and how we can use that to implement combos and orders in our system. And then we’ll start talking about external libraries and then get into things like web API’s.
So hopefully, this is a really good week. It’s hopefully the last warm week of the summer. So if you’re starting to feel the heat, I’m hoping that by the end of today, it’ll start getting a little cooler outside it’ll start feeling more like fall. As always, if you have any questions on your work as you work on these milestones, feel free to let me know I’m always available. You can catch me on discord by email or at tea time or you can schedule one on one office hours with me using calendly. Otherwise, I look forward to seeing your code and good luck this week.
It appears that I missed an interesting error when developing Example 5 for Python. It is a bit complex, so I’m relying on the advanced formatting of this webpage to help explain it better than I can via email or in a short post to the class. I’ll start with a short version, and then include a longer discussion of the problem and how I came to a solution that I feel is very helpful reading for anyone learning to program and solve these issues in their own work.
Currently pytest has a bug that causes errors when logging to sys.stderr
when running code inside of pytest
.
As best I can tell, pytest
tries to capture all output being printed to sys.stderr
by redirecting it to a buffer (a virtual file) when running the tests. Once it is done, it will close the buffer and redirect output back to sys.stderr
. Unfortunately, our logger does not realize this, and it may continue to try and write data to the buffer that is now closed, resulting in the ValueError: I/O operation on closed file
error message seen in the output.
There are several methods to determine if code is running under pytest
and disable logging in that case.
I recommend this method:
import sys
# get the root logger
logger = logging.getLogger()
# disable if pytest is running
if "pytest" in sys.modules:
logger.disabled = True
You will need to add this code to any file that you add logging to, in order to prevent errors from pytest
. Alternatively, you can disable the handler that prints to sys.stderr
and instead just use a file handler.
Since this is an advanced programming course, I figure that it is worth a bit of a “deep dive” into this situation so you can understand what I found, the efforts I went through to solve it, and how things are really working behind the scenes.
This is a bit of cognitive apprenticeship, where I attempt to show you my thought processes and how I go about solving a problem like this. My hope is that you’ll be able to learn from this process and possibly use this knowledge to help you solve your own problems in the future.
Unfortunately, in the world of higher education, we spend way too much time focusing on narrowly-scoped, previously-solved problems, to allow you to learn in an environment where we know a solution is possible in a set amount of time. In the real world, however, you’ll be constantly presented with broadly-scoped, open-ended problems like this one, where you’ll have to do some exploration to find possible causes and solutions, and then use your own background and knowledge to determine what solutions, if any, are available.
So, here goes.
When you run pytest
in Example 5 after adding some logging code as directed in the video, you will see many pages of errors printed to the terminal. In my testing, the terminal in Codio printed errors for several minutes before finally stopping. A screenshot of a small portion of those errors is below.
When this happens, you may be able to use CTRL + C to stop the output, but in many cases I simply had to close the terminal tab in Codio.
When I developed this example, I focused on the debugging portion first, and then later added the logging code. However, I neglected to run pytest
after adding the logging code to my model solution, and did not encounter this error in my initial testing. That was an oversight on my part.
As you work on this project, you may end up adding the logging code first while still working on debugging the errors in the project. In that case, you will most likely run tox
or pytest
to run the unit tests contained in the project with the logging code in place. That will cause the error to appear. As soon as I ran tox
in my existing model solution, my code presented this error.
The process of finding a solution for this problem went in three phases.
First, I attempted to Google some of the error message and a few things that I suspected were at play. I already had a hunch that the error itself was coming from the logging code, since I had added that to my model solution last. After reproducing the bug in my solution, I set out to solve it. Some Google search phrases I used:
pytest logging stderr write to closed file
- Including keywords pytest
and logging
as well as the stderr
stream and a bit of the error message.pytest stream.write(msg) I/O operation on closed file
- adding more details such as the line of code causing the error and the exact error messages."pytest" stream.write(msg) I/O operation on closed file
- putting "pytest"
in quotes will find results that always include that keywordThere were others, but this was the most fruitful.
In several of those searches, I came across a few bug reports on GitHub, specifically within the pytest
project’s repository. Bug reports and discussions on GitHub are usually very fruitful when looking for technical errors that include code and error messages, so I looked into a few of them.
sys.stderr
as part of the test. It was also much more recent, and some of the error messages they were running into were similar to what I was seeing.sys.stderr
or sys.stdout
, then most likely pytest
would interfere with that and cause this error. Thankfully, the last two issues both referenced this issue…pytest
developers posted a message that included this text:What I believe is happening is:
- pytest changes
sys.stdout
andsys.stderr
to a buffer while importing test modules.- If there’s user code setting up logging and/or creating a
logging.StreamHandler
at the import level, it will attach itself to pytest’s buffer.- When pytest is about to finish the test session, it will restore
sys.stdout
andsys.stderr
to the original values, and close the “capture” buffer.- Here the problem happens: if any message is emitted at this point, the
StreamHandler
will try to attach itself to the buffer, hence the error.
So, we’ve now found what we suspect is the error. All we have to do is figure out how to resolve it.
Unfortunately, issue #5502 is still open as of this writing, so we needed a way to get around this error. With some quick testing, I was able to confirm the error went away if I removed the StreamHandler
from the existing logging code. So, I decided that the best way to deal with this was to find some way to disable logging while the code is running as part of a unit test. This is a somewhat common, though discouraged, trick in programming. Ideally you don’t want to hide any code from the unit tests, but in some instances you want to make sure that the unit tests don’t actually change live data, such as the actual database used by this program. So, you can “protect” the code that connects to the database and make sure it cannot run as part of a unit test.
A quick Google search for determine if code is running under pytest python
quickly lead me to a StackOverflow post discussing this very issue. Great! I had quickly found a pretty good resource that might lead me to a solution.
Within the discussion, there are a few solutions suggested, and helpfully ranked by the upvotes from other users.
if "pytest" in sys.modules:
since the pytest
application will always be loaded when running a test. This solution seemed pretty simple and didn’t have many obvious side effects, provided your application didn’t load pytest
as part of its normal execution.conftest.py
file, which is only executed as part of a unit test, to update a value in our code, and then check that value where needed. This looks promising, and is probably the correct answer that would work in all cases, but also requires significantly more code and adds a structural dependency between our code and the conftest.py
file.PYTEST_CURRENT_TEST
environment variable, which is set when pytest is running. This may also work, but has the side effect of being outside of our control - any other application on our system could also set that variable, including another instance of pytest
, so it may not work as reliably as the other two.In the end, I chose Solution 1, and updated the code at the top of my main()
method in TicTacToe.py
to the following:
import sys
# get the root logger
logger = logging.getLogger()
# disable if pytest is running
if "pytest" in sys.modules:
logger.disabled = True
That code will simply load the logger, and immediately check if the "pytest"
module is loaded. If so, it will disable the logger globally in my program.
An alternative solution would be to just disable the StreamHandler
and allow the FileHandler
to remain enabled, but I felt that logging from unit tests is not helpful and chose to disable it entirely.
I hope this discussion is helpful - I’ve found that sometimes the best opportunities for cognitive apprenticeship happen directly as a result of the class, so I wanted to take this chance and share a bit of my own problem solving process here.
If you have any follow up questions about this, please let me know!
Hello, and welcome to the week six announcements video for cc 410 in Fall 2021. So this week you should be wrapping up the last part of the first chunk of the class, which is all about debugging and logging, lambda expressions. And you’re working on the third restaurant milestone which covers inheritance and polymorphism. So all of that is due later today. I’ll get that graded here in the next couple of days. Typically, restaurant milestone three is one of the ones where I try and spend a lot of time reading through your code considering the structure of your code and how you implemented the inheritance and polymorphism parts. And I try and give you a good code feedback on style. It’s also the first milestone where we enforce all of the basic requirements we introduced in hello world. So things like your style checker is going to be something that will really look into as well, as well as make sure you’re… making sure your unit tests achieve 100% code coverage and things like that. Also, this week, you should be scheduling your second final project meeting, please make sure you try and get that in before Thursday if you can, because I go on the road on Friday. This is just a quick chance for us to chat about the final project, maybe talk about some possible project topics you’ve been considering. You don’t really need to have much else done for your final project at this point. But hopefully you’re thinking of final project topics that you might want to take on and thinking about some of the classes and the structure of those classes that you might need to build that project.
So this week is pretty simple. We’re just shifting gears talking about graphical user interfaces, or GUIs. This week, and then you’ll be working on the fourth restaurant milestone, which is all about building a basic user interface for our programs. So the fourth milestone, it’s all about GUI basics, I basically what you’re going to do is create the overall structure of your GUI, all the different panels and frames that you need to manage a graphical user interface for this program, we don’t worry much about functionality other than the buttons you need to switch between the frames so that you can see them all. I’ll give you one example of how to build this in the example project. And then you can either adapt that example for this or you can kind of go your own way a little bit. This is a chance for you to get really creative on these projects. There’s lots of different ways you can build these GUIs. As long as they meet the minimum requirements, you’re good to go. Don’t forget to read the helpful hints in the assignment I try and give some hints of different coding patterns that I have found are really important and useful for me when building a graphical user interface. So hopefully some of that information is useful to you as well.
Looking ahead after that, the next module will do Event Driven Programming, where we talk about how we can actually make a GUI functional using events. Module eight, we’ll spend some time on design patterns and use that to build combos and orders for our program. If there’s one big takeaway from this part of the class, besides learning how to build GUIs, it is the use of design patterns. That’s something that you use an awful lot in industrial programming today. So that’s something that’s really important that we’ll focus on. And then after that, we’ll talk about libraries, releases, web API’s, etc.
So quick reminder, I go on vacation this Friday, October the first and I’ll be gone through the next week I get back on Sunday, October the 10th. During that time, I’ll have limited access to email and discord while I’m on the road, I’ll still be reading emails, paying attention to discord, but my responses may be a little slow and they may not be as verbose as they normally would be. Because of that, even though milestone four is due next Monday. grading of that milestone will be delayed for a week until I get back. I don’t expect any issues with that, that milestone is mainly just whether you built the frames and the panels and everything for your GUI. That’s really all we look at for that one. So you kind of know if you got it working or not. Based on previous semesters, I expect minimal questions on these next couple of milestones, they’re pretty straightforward to follow. But if there are tons of questions, or there’s things that I can’t handle easily remotely, I’m more than willing to adjust due dates if needed, and push things back a little bit just to give me some more time. I’m also going to work with another faculty member here at K-State so that they will officially be covering these courses and can provide a little backup to me as well. But most of the time, I’ll still be the one actually fielding questions and things like that even while I’m on the road. So feel free to ask questions, but be a little flexible and we’ll adjust due dates as needed.
Other than that, I think we’re really strumming along good this semester. Everything looks really good. I look forward to seeing your restaurant milestones and chatting with you about your final projects. And then hopefully these next couple of milestones building out a graphical user interface go well, but as always, feel free to let me know if you have any questions and I look forward to seeing you over the next couple weeks.
Hello, and welcome to the week nine announcements video for CC 410 in Fall 2021. So we’re on week nine, I apologize for missing the last couple of weeks. I was on vacation two weeks ago. And then last week, I was busy getting caught up with everything, but we’re back on track and you should see announcements videos for most of the rest of the semester.
So we’ve taken a couple of milestones and split them over two weeks. So this week, you should be finishing up the sixth milestone on the restaurant project. This one is all about design patterns and using mock objects in your unit tests. You should also have your third final project milestone meeting with me sometime this week or next week. This is the point in the semester where you should start working on your final project. So make sure you get that started soon. We’re about halfway through that. Well, we’re over halfway through the semester at this point. So for your final project, if you haven’t already, load up that Codio project, get the base project built in there just like we did for the hello real world project. And then you can start working on code for your final project and get going there.
So next week, we’ve got another split milestone over the following week. So next week, we’ll introduce external libraries, and you’ll start learning how to use those. And then the following week after that, we’ll talk about releases. And you’ll be working on the seventh milestone, which is the checkout milestone. Checkout is one of the other trickier milestones in this semester. So I gave two weeks for that one, make sure you use your time very wisely. And then after that milestone will start doing some stuff with web interfaces. And you’ll have a lot more time to work on your final project as we get further into November.
So the milestone you’re working on today, milestone six is all about orders and combos, we’ve added those new classes to our code. And then we’re using some design patterns such as the factory method, builder pattern, singleton pattern and the iterator pattern. To use those design patterns to make orders and combos work really well in your system. We’re also writing unit tests with test doubles or mock objects in there. So that’ll be something really cool that you haven’t used. But there shouldn’t be very many GUI changes this week, the only real GUI changes are to handle the combos themselves. And it should be pretty minimal compared to what you’ve done in the past. But hopefully you start to see the use of design patterns in your code and how it’s really useful to reuse these common structures so that other people can understand your code quickly and easily.
The other thing we’ve run into with this milestone is the testing issues. Running tests, especially with these large objects and large GUI things really can take a lot of time. And Codio boxes have limited memory, I believe Codio right now limits them to 512 megabytes. And because of that every once in a while the tests will crash in Codio. There are a couple of ways to fix this. In Java. If your tests crash and you need to stop a running Gradle project you can do “gradle –stop” on the terminal that will stop any running Gradle instances, then in Codio you go to the project menu and choose restart box that will restart the code your box your code is running on. And then once that’s done, you refresh your browser page. And then you should be able to run the tests again, that should work. So if you ever have trouble with Gradle hanging on any of your tests, that’s the way to fix it. In Python, we’re simply going to run the tests in batches. And so in the code, I give you some examples of how you can change your tox configuration to run those tests in batches You may have to tweak it just a little bit to make sure that it fits with your unique setup. But that should work for that.
So looking ahead after the next few weeks, we’re going to switch to doing some stuff with web interfaces. those milestones are meant to be a little bit smaller, a little bit more straightforward. And that will give you some more project time to work on the project over the last four weeks of the class. So keep that in mind. We’re almost over the difficult part of the class and into some of the easier stuff toward the end.
So as you can tell week nine we’re finally over the halfway mark on the semester. So you’ve only got about seven weeks worth of content left. So make sure you keep plugging away at it that you’re doing well if you have any questions, let me know and otherwise I will see you next week.
Hello, and welcome to the week 10 Announcements video for CC 410 in Fall 2021. So this week you’re working on milestone seven, which is the checkout milestone, you’ll have two weeks to work on that. This week, you’re also doing an example on external libraries, which is really interesting. And then next week, you’ll work on actually creating a packaged and installable release of your software.
Milestone seven is actually best split into two parts. And so you can work on both parts kind of independently, I recommend on working them in order just to make everything work. The first part is editing the graphical user interface so that you can edit combos. You’ll need to probably go through and update a lot of other GUI panels. But hopefully, a lot of this should be just wiring stuff together copy pasting code to build the combo GUI and getting some of the dropdowns figured out. Hopefully, it’s pretty simple, especially with some of the examples I show. But if you need any help with that, let me know this is one of the trickier parts.
The second part is to use the external library I give you to build a checkout system. So there’s a library that mimics a cash register that you can either do a cash exchange or do a credit card. The credit card is very simple actually show you how to do that in the examples. So that should be pretty easy to build. The cash part is a little tricky, there’s a lot of different ways you could build the cash user interface. And then of course, you have to handle how to make change. And make sure you read this very carefully, the library should only be instantiated once. And so making change, you’ll have to make sure that if you run out of a particular coin, you can borrow them from the next highest, you can take $1 and get four quarters, for example. And so as long as the amount in the change drawer stays the same, you can make change however you need. And then finally, you’ll print out a receipt. And so there’s a little library that you’ll have to read. The library has good documentation, the code is open source, so you can read the code as well. So take a look at that library, see if you can understand how I built it and how it works. And then use it within your program yourself.
So beyond that, after this, this milestone we’ll start working on the web. So maybe not in five minutes, but in a couple of weeks will switch over to do web frameworks. Also, bear in mind that we’re getting toward the end of the semester, you got a little over a month and a half to work on your final projects. So now’s the time to start thinking about getting code written for your final project. After this milestone the restaurant milestones will be a lot smaller for the last four. So that shouldn’t be so bad. But make sure you keep in mind you got to start working on your final project soon so you have enough time to get it working. You should also have a final project meeting with be here in the next couple of weeks. So as always, if you have any questions, let me know otherwise. Good luck this week and next week on milestone seven and I look forward to hearing from you soon
Hello, and welcome to the week 12 Announcements video for CC 410 in fall 2021. So this week, we’ll be pivoting from working on our graphical user interfaces to starting working on the web. And so the example this week, we’ll introduce you to web frameworks and how you can build data driven websites using the same set of code that we’ve been using throughout this semester. So we’ll do a quick example on that. And then you’ll actually implement a website in your project itself. This first project will just work on setting up the routes following the web MVC kind of RESTful architecture. And then from here on out, we’ll add some features to that. So you can add custom menu items via the web. At this point, we’re also getting down to the last four weeks of the semester. So you should definitely start working on your final project if you haven’t already. And this is really the time to start getting a lot of the code done. We’ve got two weeks to do, we have Thanksgiving, and then we have two weeks. And that’s pretty much it. So keep that in mind that things are going to move pretty quickly from here on out.
So like I said, for this restaurant milestone, you’ll install a web framework into your project, you’ll set up some routes in the controller, you’ll also learn a little bit about templating, and how you can set a master template and some route templates. And really, the goal is to build a website menu that is data driven based on all of the data that we have in our class. A quick little aside on this in an actual practical website, you would probably use a database to store all the data about your menu instead of classes and objects like we’re using so far. However, databases are really outside of the scope of what I’m going to cover in this class. So we’ll learn how to do it using the existing objects and everything that we have. But understand that in actuality, you would probably use a database for this in the real world. And so those of you that are in the ICS program, you’ll go on to take our databases course. And you’ll learn how you can actually add a database to this, you can also take our web development course, which actually teaches you how to build data driven websites using a real database. So this is kind of a primer to some of that, but it doesn’t actually get you the full experience.
Looking ahead, we’re going to talk a little bit more about form data and filtering and how we can build web forms to collect data from the users. We’ll also talk a little bit about serialization. The big thing to know is from here on out, the milestones will be much smaller, about half the size of the earlier milestones about a quarter of the size of the last two milestones. And the whole idea is to give you more time to work on your final project for these last few weeks. Also, keep in mind that the last restaurant milestone will be due on December 13. That’s the Monday of finals week, although you’ll have until the Friday of finals week to get everything wrapped up and turned in on this class before the end of the semester. So that’s where we’re at at week 12. Hopefully you’re getting ready to pivot to working with the World Wide Web. As always, if you have any questions let me know and I look forward to hearing from you soon.
Hello, and welcome to CC 410. My name is Russ Feldhausen. And I’ll be your instructor this semester, I’m going to try and do weekly announcements videos like this about once a week or maybe once every other week, just to give you some updates about what’s going on in the class. These videos are unscripted, they’re not going to be nearly as produced as the rest of the videos in the class. It’s really just a chance for me to talk to talk through things that are on my mind and answer any questions that I’ve had throughout the week.
So CC 410 is kind of a new course, and I am updating it quite a bit this semester. Some things that I’m doing are updating the assignments for the milestones to be a little bit newer, I’m also moving the textbook content outside of Codio. So you’ll have free access to the textbook and all the quizzes, we’re also adding a couple of concept quizzes based on some of the stuff that’s been done in CIS 400 by Nathan Bean. So that will be something new this semester. I may also rework some of the examples in this course. So the short thing is things may change a little bit. And things definitely have changed from last semester. And because of that, you may run into little issues where links on Canvas aren’t working or something is missing, or there are typos or something didn’t carry over correctly. So if you run across anything that looks wrong, please let me know feedback is always welcome. And you can earn some of those bug bounty extra credit points for helping me find and squash all of these little bugs that come from reformatting this course.
So in this course, the big picture is to get you a lot of experience learning different types of programming. So in this course, we’re going to cover object oriented programming pretty deeply, we’re going to talk about how to build graphical user interfaces for our programs. And we’re going to dive a little bit into web interfaces for our programs. This course is built a lot around examples, the each milestone will come along with at least one big example, maybe two or three big examples that I walk through step by step, so that you can follow along and make sure you’re able to do them. And then throughout the semester, we’re going to work on several milestones for this restaurant point of sale project, I think it’s a really great way to learn how to build these big projects is to build one single project iteratively throughout the course instead of a bunch of little projects like we’ve done in previous courses.
And then you’ll also be able to take that experience and adapt it into a final project. One big thing I want you to keep in mind is your final project in this course, should be about 1/4 of the size of the restaurant project. And so as we’re going through the semester, you’ll see how big the restaurant project is, I think the final version that I have, that’s my model solution is around eight to 10,000 lines of code. So your final project is going to be in the range of two to 3000 lines of code is what we’re shooting for.
This class is going to introduce a lot of new technologies that you may not have used before. For example, we’re going to use Git and GitHub classroom to track our code and also to submit assignments will work with tools such as Gradle, and tox to automate a lot of our development and our compilation and unit testing. We’re going to introduce type checking in Python, Java, we already have type checking in the compiler, but you may not have really understood what it’s doing. So we’re going to talk about type checking, we’ll talk about unit testing, we’re going to use a style checker to actually check our code and make sure it follows a commonly accepted style. And we’re going to learn how to add documentation to our code and actually generate user documentation based on the comments we leave in our code. It’s lots of great things that will be very useful for you as you go forward this semester. So, like I said, the final project, you get to choose the topic, I want you to align it with your interests. So whatever you’re looking at doing outside of this course, this course is mainly for non computer science majors. So you’re either in the integrated computer science program where you’ve got a secondary focus, or you’re taking this as part of the computer science certificate. So it might be your actual major that you’re aligning this with. But the idea is to use the new skills that you develop in this class to build something of your own, you get to work with me iteratively throughout the semester, so you and I will discuss project topics and scope. And then you’ll have four milestone check ins with me to see how things are going. And then at the end of the semester, you get to present your work, hopefully, we’ll have be able to actually present it to the entire class, I’m hoping that we can get that figured out by the end of this semester.
So we’re launching in the week one of this course week one is pretty simple. It’s a lot of just the administrative stuff that goes at the beginning of the course. But the interesting thing that you work on is this project that I call Hello Real World. It’s a reimagining of the classic Hello World program, but done the way like you would see in a professional development shop. So it’s real world with unit testing and documentation and all sorts of things that are really important to keep in mind when you’re writing code. It’s not a simple three line program anymore. It’s going to be several different pieces all put together. This week, you’ll also be able to schedule your first final project meeting where I can discuss a little bit more about the final project with you one on one, answer any questions, maybe brainstorm some ideas for Project topics that you can keep in mind.
Also, as you’re going through this, please pay attention to my office hours. Since this is an online course I don’t hold any formal office hours. but you can always schedule a time with me on Calendly and I can meet with you one on one via zoom. There’s also a couple of different ways you can communicate with me there’s the cc410-help email address, which if you email me, please use that email address. I’m also on Discord and you’ll have a little assignment to introduce yourself on the discord server and ask me any questions you want to ask. If I’m at my computer, I’m probably on Discord, you might get pretty quick responses on Discord. If you post something on Discord and I don’t respond within an hour, so feel free to email it to me as well. I will guarantee responses from emails, definitely.
So after week one, we launch into week two, you’ll start working on a class library for an object oriented programming project. This is the first restaurant milestone it’s also one of the biggest restaurant milestones. My model solution for this milestone is around 2000 to 2500 lines of code depending on how you measure it. Thankfully, it’s mostly boilerplate. Once you get one project done, the others are pretty easy to do as well. So feel free to work on that. The big thing I can tell you about Week two is be a little thoughtful about how you’re putting your code together, and you should be able to make it work. This is Maggie, Maggie is one of our pets here. She’s a mini– mini poodle. So you’ll see Maggie and Reggie throughout this course they like to have attention whenever they hear me talking on the computer.
So after week two, we have week three, week three is unit testing and documentation, we’re going to add a lot of stuff to your restaurant milestones. So that’s something you get to see my model solution for the first semester in this course had 423 unit tests in it. Many of them were repeats this semester, I have scoped back this a little bit. So you’ll probably be in the three to 400 unit test range. But it’s really important to catch errors. When I wrote all these unit tests, I actually caught about a half dozen errors in my own code for the first milestone. So it is a really useful task.
Beyond that, we’ll launch into things on inheritance and polymorphism and some more advanced object oriented programming topics, it’s really a chance for you to refactor your old code and add some more structure to it. And so that will be due by the end of February. Once we get past that, then we’ll go into graphical user interfaces working with external libraries, the web serialization, all these other interesting topics that we’ll learn throughout the semester.
So, CC 410 is a four credit hour course, which means that it requires around eight to 12 hours each week of your time. So if you think about it, this is basically about a third of a full time job, just in this course. And I can tell you based on prior data that I have from other students, that that seems to be about right. Most students seem to spend around eight to 12 hours on this course each week, especially when they’re working on the first few milestones of the restaurant project. So I encourage you to schedule your time wisely. Look at your schedule, make sure you have that many hours to given your week. And make sure you plan ahead to make those hours available. And also on these milestones. Make sure you start early and ask questions. It’s not enough to do these milestones over a weekend and then get stuck and ask me questions on Monday. Because by then it might be too late to actually get a response. So make sure you start early, ask questions, get feedback early. If you’re not sure you’re going in the right direction, it’s much much easier to ask questions before you’ve written 1000 lines of code, then after you’ve written 1000 lines of code, and then you have to redo it.
When you’re copy pasting code, please copy paste carefully. There will be a lot of instances where you can reuse bits of code between the files. So make sure you’re careful and getting all of those edits made. This semester, you get to use the tool Git to keep track of your code, please commit to Git frequently I don’t want to hear from students that you deleted your code and lost it because you weren’t committing to Git. So anytime you get something working, you should probably commit to Git and then do git push. So that’s on GitHub, you can always do that I show you how to do it in the Hello Real World project. So make sure you make use of that. And then finally, in this course, you can use and you can cite online resources, there’s a lot of opportunities where we’re going to ask you to do something that you may not be comfortable doing or may not exactly know how to do in programming, but you can go look up a resource that will explain to you how to do it. If you do that, please make sure you cite where you get those sources from. And also bear in mind that you’re not actually bypassing the point of the project. I don’t mind if you look at an online resource to figure out how to sort an array. I’m not trying to teach you how to do that. But if you’re looking at an online resource for how to build an entire interface in Java, you probably should reference the textbook first because that’s really the point of what we’re trying to teach.
So beyond that, please feel free to keep in touch throughout the semester. I’m always on Discord. You can also schedule a one on one office hours with me. We also host tea time office hours in our department, those are Tuesdays at 330 and Fridays at 1030. There’ll be available via zoom or discord. We’ll kind of change it up throughout the semester. The Tuesdays will also be available in person once we get past this COVID wave so watch information about that if you’re on campus or near campus, you might be able to hang out with us Tuesdays at 330 on campus as well.
So that’s all I’ve got for this first week of announcements. I’m really looking forward to this class this semester. I hope you are as well. I’m here to help. If you have any questions, concerns need anything with this course please let me know. You might even get to see Maggie on Zoom if you connect with me, but good luck this semester, and I hope to hear from you soon.
Hello, and welcome to the week two announcements video for CC 410 in spring 2022. So by this point this week, you should have wrapped up module one, which is all about the Hello real world project and all of the introductory stuff for the course. Hopefully by now you’ve also scheduled your first final project meeting with me, mainly, what we’ll do is just go over the final project, discuss any finer points that you might be interested in and maybe discuss possible topics that you can think about. It’s usually a short meeting 15 minutes as well long enough for that meeting. But if you haven’t already, please schedule a time with me via Calendly so that we can meet and go over the final projects.
This week, you’ll be starting in on the first real module of content in this class, which is Module Two covering object oriented programming. There will be a short example around object oriented programming, and then you’ll start working on the first restaurant milestone, all of that content is due next Monday. Just to be aware, everything in this class is due on Monday, I’m on campus on Tuesdays teaching another class, so it’s most likely going to be Wednesdays or Thursdays when you actually get grades from stuff that you submit on Monday nights, just because I don’t have a whole lot of time to grade things on Tuesdays. So hopefully everything from Module One will be graded and posted later today or by tomorrow, so you can get some good feedback on that. But you’re welcome to go ahead and start working on Module Two Content while you’re waiting for feedback on module one.
So some quick updates. I believe everybody found the Discord channels. So that’s great. If you have any questions, you can post them there. If I’m on Discord, if I’m at my computer, I will try and respond pretty quickly. If you don’t get a response very quick on Discord, or it feels like I missed a message, please email the cc410-help email address and I will respond to it there. I always guarantee responses via email. I won’t guarantee responses via discord just because that’s really hard to do. But if I’m at my computer, and it’s a quick question I can answer I will definitely do that. For grading in this course, one thing to be aware of is you’ll have feedback on the rubric on canvas. But then I’ll also go to GitHub and leave comments on your code in GitHub through the feedback pull request. I believe you get an email from GitHub when I leave those comments, so you can check them there. But basically be aware that I might leave comments in one or both places. Most of the grading comments will be on Canvas, most of the code and stop comments will be on GitHub. Other than that, I think this class is going well so far. If you have any questions or concerns, let me know.
Basically, this week, we’ll be working on the first restaurant milestone, which is all about building the packages and classes to represent the menu of items in the restaurant. It’s a lot of boilerplate code. Once you make one entree class, it should be easy to make most of the other ones. Things that you can do now is to make things easier later by thinking about coding style, and documentation. Some of those requirements are not enforced until we get to the second and third milestone. But we covered all of this in the Hello real world project. So if you can do that, and follow some of those requirements, now, it makes the later milestones easier. Best advice for this milestone is to start with one of the more complex items on the menu, get that done, then you can copy paste that code into another item, tweak it a little bit and so on. When I did this, most students have told me this milestone takes anywhere between three and eight hours to complete, depending on how comfortable you are working in the language you’re working with. My model solution is around 1500 to 2500 lines of code depending on the semester and the language. So that gives you a pretty good idea of the scope of this project. Already, this first milestone is going to be a bigger scope than most of the projects you’ve been asked to do thus far in the computational core program. So just be aware of that this is a much larger program, but a lot of it is boiled boilerplate code that is duplicated between the classes. So be aware of that. Also, don’t forget, if you’ve got any feedback on any of these, please let me know. This is the third or fourth semester I’ve used this particular project, but I changed the menu and some of the specific key specifics each time. So if something looks weird, or you think there’s a remnant from previous semester, just let me know, you might be able to earn some of those bug bounty points for catching things that I miss.
So looking ahead from here, the next module is Module Three, all in documentation and testing. Module Four covers things like inheritance and polymorphism. Module Five is all about debugging, logging and lambdas. And that’s where we’ll have our second final project check in that covers most of the content through the end of February in this course, and then from there in March, we will skip over to working with graphical user interfaces. So good luck this week on the second module, the first restaurant milestone in this course as always, if you have any questions, let me know and I will look forward to talking to you all about your final projects.
Hello, and welcome to the week three announcements video for CC 410 in spring 2022. So this week, you should be wrapping up the second module in the class, which is all about object oriented programming. And so if you’re seeing this on Monday, by the end of today, you should have the object oriented programming example done, and you should be submitting the first milestone for your restaurant project. Coming up this week, you’ll be working on module three, which is all about documentation, testing and UML. There’ll be a great example on how to do documentation and testing in your code. And then you’ll be working on the second restaurant milestone, which is all about adding unit tests to your code.
So don’t forget for updates in this class, you can always find me on the discord channel. If you have any quick questions. I’m also responding to the emails, so feel free to use whichever one is most convenient for you. If you don’t get an answer on Discord very quickly, feel free to send me an email after a little while I guarantee answers via email within 24 hours within a working day. So you can always get feedback there. Also, for grading, I just got done grading the first example the Hello real world example. And I believe for everybody, I left a comment on Canvas as well as a code comment in GitHub. So make sure you look in both places to see those comments. They’re very minor. But that way you know what you’re looking for when you see comments on this next milestone. Usually this first milestone, I leave quite a few comments on it. Otherwise, I think things are going well. So far this semester. If you have any comments or concerns, feel free to let me know.
So for the second milestone, you’ll be working on unit tests. By my estimation, you’ll be adding about 400 unit tests to your code, which is a significant amount. You’ll also be working on documentation comments in your code so that everything is documented. Make sure you read the instructions very carefully to know what you should document. But basically, everything should have a documentation comment to go with it. Um, you’ll also build a UML class diagram for this program. And then throughout the semester, you’ll be updating it in bits and pieces. Once again, I estimate that this milestone will take anywhere between three and eight hours depending on your level of experience and how fast you work through it. This one is also significantly larger, by the time you’re done, you should have about 3000 to 4000 lines of code in your project. So this one, you’re really growing the size of your project quite quickly. Again, a lot of it is boilerplate code. If you write a unit test for one class, a lot of times that unit test can be used with very minimal changes in multiple classes. And as always, if anything’s unclear in these milestone descriptions, feedback is always welcome. I’m always refining these a little bit to see if I can make them better.
So some big hints for the second milestone. First and foremost, do not look at your source code while writing the second milestone, go back and look at the original first milestone, look at the second milestone information. But try and write your unit tests without looking at your source code. And the reason you do this is you want to write your unit tests so that they’re checking what your code should be doing, not what your code actually does. And so for example, if you have a typo in the price of a particular item, and you’re just referring to your source code, write the unit test, the unit test will not catch that typo. But if you’re looking at the original menu to figure out what price it should be and write the unit test to verify that, then you’ll actually check that typo. And it’s important because when I wrote this model solution the first time I found about six typos in my code by going through this process, so make sure you try and look at only the stuff that you have, instead of the source code to write these mile write these unit tests. Second thing you can do on your unit test is to use Global attributes to simplify your unit tests. And on the next slide, I’ll show you a little bit of an example of that. Likewise, you can try and generalize some of the unit tests. For example, unit tests to check for toppings that you can add or flavors that you can add things like that those can be generalized using some unit tests that go across the items that make up that particular set of items. But typically, the core ingredients on an item you can’t change. So you can look at parameterized tests across the items to make that a little easier.
So when I’m talking about generalized tests, this is what I’m talking about. This is an example from an earlier semester. But let’s say you’re writing unit tests to verify the price and the calories for a particular item. instead of hard coding that value directly in the unit test at the top of your test class, you could simply have some global attributes that set the price and the calories and things like that. And then by doing so, your unit test code can pretty much be copy pasted with one quick find and replace for the different objects that you’re testing. And that’s all you have to do. So it makes it a little bit easier to maintain some of these files as you go through go through things. I found this to be kind of easy. Hopefully you do too. So feel free to look at this example and see if it makes sense to you.
So that’s all for this week. Looking ahead, the module for the week after this is all about inheritance. Then we’ll spend a module on debugging and lambda expressions and that will your final project check in at the end of February. Then we get into the GUI stuff starting in March. So we’ll do some work with GUI basics event driven programming. And then toward the end of the semester, we’ll work on some web interface stuff as well.
So that’s all for this week. I hope it I hope you enjoyed this milestone. It’s really interesting. For a lot of you this might be the first time you worked with unit tests. So you’ll be writing an awful lot of tests, but hopefully you can start to see how powerful they are in your code. As always, if you have any questions or concerns, let me know and I look forward to seeing you again next week.
Hello, and welcome to the week for announcements video for CC 410 in spring 2022. So this week, you should be wrapping up the second restaurant milestone, which is all about documentation and unit testing, you should have done an example and then you’ll add a lot of documentation and unit tests as well as a UML diagram to your restaurant project. Hopefully, that’s going well. But if you have any questions at all, feel free to email me and let me know and I’d be happy to help.
This week, you’re going to start working on the next module, which is all about inheritance and polymorphism. It’s a topic you’ve probably covered several times already in object oriented programming, but we’re gonna hit it once more, but this time from a much deeper perspective. And so you’ll do an example on using inheritance in an object oriented program. The rest of this week, you’ll have a survey I’d like you to fill out which is the start-stop-continue survey, it’s a quick chance for me to get feedback from you if there are things you’d like me to start doing in this class or things you’d like me to stop doing in this class. Or if there are things that I’m doing that you want me to make sure I continue to do, you can give me that feedback in that survey. It’s totally optional. I keep it anonymous. But if there’s any feedback you want to give me feel free to do that. You’ll also have a little bit of time this week to start thinking about your final projects, coming up with some ideas that you want to look at.
So this week goes into next week. Next week, you’ll learn about debugging and logging and lambda expressions. You’ll do an example on debugging and logging. And that is where your third restaurant milestone comes in, as well as the second milestone for your final project, which should be scheduled by the end of February. So the third restaurant milestone is all about adding inheritance and polymorphism to your code. It involves refactoring a lot of the stuff that we’ve already done, including updating existing unit tests and adding new unit tests. This milestone also enforces all of the general requirements on the assignments. So you need to pass the style checker, the type checkers, all of those things are enforced just like they were on the Hello Real World project, I give you two weeks to work on this milestone because it is a lot of refactoring. And it can take a little time to work through it. But once you get it done, it’s only about 1500 lines of code that have changed. But it takes a lot more thinking to make sure you get those lines correct, get your unit tests fixed, get your documentation fixed, etc.
So some big hints for this milestone, I encourage you to work in small chunks, try and pick one little feature, get it implemented completely, get it working, and then work on the next feature, the thing you don’t want to do is take apart your entire project and try and do this all in one shot. Because you’re just going to end up with a whole bunch of parts lying around, and nothing that really fits together. So try and work in small chunks. Take advantage of Git, you can commit early you can commit often, if something doesn’t work, you can roll back to a previous commit, it’s really handy. This time, you might also consider trying test driven development, you would have learned about that this week. So you can actually try and write some of your unit tests first, and then change your source code to actually fulfill those unit tests as a way to make sure things are working correctly. One other hint that I do give the order item or the item class, I can’t remember what I call it this semester, I highly recommend implementing that on your base classes. So your base wrap class, your drink class, your side class, that will make things much easier if you inherit that order item interface there, instead of inheriting it on each individual subclass of those base classes. Hopefully that makes sense. I talked about it more in the milestone description. But make sure you read that. The other things you may have some questions on syntax, especially around object oriented programming, and the inheritance and polymorphism and some of the Lambda expressions you have to do in your unit tests. So don’t be afraid to ask questions on syntax. If something’s not clear, I do have a model solution for this that I can look at. And so I know I’ve gotten everything to work at least once. So I can help you with some syntax if you run into trouble there.
Looking ahead after these two modules, then we’ll go into the modules on graphical user interfaces. So module six, and seven will introduce working with GUIs in Java or Python. And we’ll cover a little bit about event driven programming. And then later on in the class, we’ll work on web API’s and libraries and things like that. So that’s all we’ve got going on this week. Hopefully things aren’t on fire for you right now. But I guarantee it as you work through milestone three, there’ll be at least one time where it feels like your project is on fire. But please keep working on it. I know you can get it done. Refactoring is kind of tricky the first time you do it, but it’s really good once you can get it to work. As always, if you have any questions, let me know and I look forward to seeing you again in a week.
Hello, and welcome to the week five announcements video for CC 410 in spring 2022. You get to see me in my professional recording setup because I’m recording some videos today for CC 110. And I figured I’d do some videos for CC 410 as well.
So this week, you should be wrapping up module four, which is all about inheritance and polymorphism. There’s also an example project that you’re going through, and you should have a start stop continue survey to fill out, please do fill out that survey, I do get some really good feedback from that. And I’m working on trying to adapt some of the things that you asked me to start those of you that have already filled out the survey. So watch for that over the couple weeks. And then also this week, you should also spend a little bit of time thinking about your final project and some of the topics you might want to take on, because we’ll have a meeting about that in the next week or so.
So this week, it’s part of a double module where you’ll be continuing to work on new content this week on debugging, logging, and lambda expressions. And that will feed into the work that you’re doing on the third restaurant project, which is all about re-implementing some of the architecture and adding some inheritance and polymorphism to the entire structure. You’re also going to be adding a bit more unit testing to confirm that your structure is correct. And then sometime next week, you’ll also need to meet with me for the second final project milestone. This is the one where we try and actually tie down your final project topic for later this semester.
So quick reminder on milestone three. I talked about this a little bit last week. Basically, this week, all the general requirements will be enforced. So you’ll need to make sure your unit tests are there, you need to make sure all your code is documented. I don’t necessarily care about documentation on your unit tests. But all of your other code should be fully documented. That includes every class, every method, including getters and setters, and having all the arguments and returns and throws keywords anything in there that needs to be covered. You’re also going to be adding inheritance this week. So make sure inheritance is correct. Make sure your code passes all of the style checkers. If you’re in Python, make sure it passes the Mypy type checking and also make sure that has a pretty high level of coverage of your unit tests. You’ll also need to update your UML diagram. This time, you’re going to add some associations in your diagram between all the different inheritance classes. This milestone it’s only about 1500 lines of code, but it is rather robust because of all the changes that you’re making to your structure. So be careful with it. Feedback is always welcome. If there’s anything that I can explain a little bit clearer in the assignment description itself. So don’t be afraid to let me know if something’s unclear.
For this milestone, some big hints, work in small chunks, don’t try and do everything in one shot. So pick one item that you’re going to work on, get it working, and then commit to git so that you’ve got that working, you can always commit often and go backwards if you need to. This is also a good chance to try test driven development, you can actually write your unit tests first, and then work on your code until you pass those unit tests. I also really recommend that you inherit the interface, I believe it’s an item or order item interfaces, what I named it the semester, you should inherit that on your base classes instead of on each individual item on the menu. That makes it much easier for you to manage later on down the road. And don’t be afraid to ask questions about syntax. There are some strange syntax things, especially with the unit tests on this one. So if you get stuck, don’t be afraid to ask questions.
So looking ahead from here after this week, when you turn in this milestone, we’ll switch over to start working on GUIs and graphical user interfaces. So we’ll spend the next few weeks working on that some things around event-driven programming. And then in module eight, we’re going to introduce design patterns, which I think is the other big topic to cover in this class is design patterns. So we’ll cover that and then from there, we’ll go into libraries releases, web API’s, etc.
So hopefully everything’s going well for you. It’s mid February at this point, so it’s still kind of cold outside but it’s starting to get warmer as you keep working on this project. As always, if you have any questions you can reach me on Discord you can email the cc410-help email address. Either way, I’d be happy to help with you and I look forward to seeing you in a couple weeks and talking about your final projects.
It appears that I missed an interesting error when developing Example 5 for Python. It is a bit complex, so I’m relying on the advanced formatting of this webpage to help explain it better than I can via email or in a short post to the class. I’ll start with a short version, and then include a longer discussion of the problem and how I came to a solution that I feel is very helpful reading for anyone learning to program and solve these issues in their own work.
Currently pytest has a bug that causes errors when logging to sys.stderr
when running code inside of pytest
.
As best I can tell, pytest
tries to capture all output being printed to sys.stderr
by redirecting it to a buffer (a virtual file) when running the tests. Once it is done, it will close the buffer and redirect output back to sys.stderr
. Unfortunately, our logger does not realize this, and it may continue to try and write data to the buffer that is now closed, resulting in the ValueError: I/O operation on closed file
error message seen in the output.
There are several methods to determine if code is running under pytest
and disable logging in that case.
I recommend this method:
import sys
# get the root logger
logger = logging.getLogger()
# disable if pytest is running
if "pytest" in sys.modules:
logger.disabled = True
You will need to add this code to any file that you add logging to, in order to prevent errors from pytest
. Alternatively, you can disable the handler that prints to sys.stderr
and instead just use a file handler.
Since this is an advanced programming course, I figure that it is worth a bit of a “deep dive” into this situation so you can understand what I found, the efforts I went through to solve it, and how things are really working behind the scenes.
This is a bit of cognitive apprenticeship, where I attempt to show you my thought processes and how I go about solving a problem like this. My hope is that you’ll be able to learn from this process and possibly use this knowledge to help you solve your own problems in the future.
Unfortunately, in the world of higher education, we spend way too much time focusing on narrowly-scoped, previously-solved problems, to allow you to learn in an environment where we know a solution is possible in a set amount of time. In the real world, however, you’ll be constantly presented with broadly-scoped, open-ended problems like this one, where you’ll have to do some exploration to find possible causes and solutions, and then use your own background and knowledge to determine what solutions, if any, are available.
So, here goes.
When you run pytest
in Example 5 after adding some logging code as directed in the video, you will see many pages of errors printed to the terminal. In my testing, the terminal in Codio printed errors for several minutes before finally stopping. A screenshot of a small portion of those errors is below.
When this happens, you may be able to use CTRL + C to stop the output, but in many cases I simply had to close the terminal tab in Codio.
When I developed this example, I focused on the debugging portion first, and then later added the logging code. However, I neglected to run pytest
after adding the logging code to my model solution, and did not encounter this error in my initial testing. That was an oversight on my part.
As you work on this project, you may end up adding the logging code first while still working on debugging the errors in the project. In that case, you will most likely run tox
or pytest
to run the unit tests contained in the project with the logging code in place. That will cause the error to appear. As soon as I ran tox
in my existing model solution, my code presented this error.
The process of finding a solution for this problem went in three phases.
First, I attempted to Google some of the error message and a few things that I suspected were at play. I already had a hunch that the error itself was coming from the logging code, since I had added that to my model solution last. After reproducing the bug in my solution, I set out to solve it. Some Google search phrases I used:
pytest logging stderr write to closed file
- Including keywords pytest
and logging
as well as the stderr
stream and a bit of the error message.pytest stream.write(msg) I/O operation on closed file
- adding more details such as the line of code causing the error and the exact error messages."pytest" stream.write(msg) I/O operation on closed file
- putting "pytest"
in quotes will find results that always include that keywordThere were others, but this was the most fruitful.
In several of those searches, I came across a few bug reports on GitHub, specifically within the pytest
project’s repository. Bug reports and discussions on GitHub are usually very fruitful when looking for technical errors that include code and error messages, so I looked into a few of them.
sys.stderr
as part of the test. It was also much more recent, and some of the error messages they were running into were similar to what I was seeing.sys.stderr
or sys.stdout
, then most likely pytest
would interfere with that and cause this error. Thankfully, the last two issues both referenced this issue…pytest
developers posted a message that included this text:What I believe is happening is:
- pytest changes
sys.stdout
andsys.stderr
to a buffer while importing test modules.- If there’s user code setting up logging and/or creating a
logging.StreamHandler
at the import level, it will attach itself to pytest’s buffer.- When pytest is about to finish the test session, it will restore
sys.stdout
andsys.stderr
to the original values, and close the “capture” buffer.- Here the problem happens: if any message is emitted at this point, the
StreamHandler
will try to attach itself to the buffer, hence the error.
So, we’ve now found what we suspect is the error. All we have to do is figure out how to resolve it.
Unfortunately, issue #5502 is still open as of this writing, so we needed a way to get around this error. With some quick testing, I was able to confirm the error went away if I removed the StreamHandler
from the existing logging code. So, I decided that the best way to deal with this was to find some way to disable logging while the code is running as part of a unit test. This is a somewhat common, though discouraged, trick in programming. Ideally you don’t want to hide any code from the unit tests, but in some instances you want to make sure that the unit tests don’t actually change live data, such as the actual database used by this program. So, you can “protect” the code that connects to the database and make sure it cannot run as part of a unit test.
A quick Google search for determine if code is running under pytest python
quickly lead me to a StackOverflow post discussing this very issue. Great! I had quickly found a pretty good resource that might lead me to a solution.
Within the discussion, there are a few solutions suggested, and helpfully ranked by the upvotes from other users.
if "pytest" in sys.modules:
since the pytest
application will always be loaded when running a test. This solution seemed pretty simple and didn’t have many obvious side effects, provided your application didn’t load pytest
as part of its normal execution.conftest.py
file, which is only executed as part of a unit test, to update a value in our code, and then check that value where needed. This looks promising, and is probably the correct answer that would work in all cases, but also requires significantly more code and adds a structural dependency between our code and the conftest.py
file.PYTEST_CURRENT_TEST
environment variable, which is set when pytest is running. This may also work, but has the side effect of being outside of our control - any other application on our system could also set that variable, including another instance of pytest
, so it may not work as reliably as the other two.In the end, I chose Solution 1, and updated the code at the top of my main()
method in TicTacToe.py
to the following:
import sys
# get the root logger
logger = logging.getLogger()
# disable if pytest is running
if "pytest" in sys.modules:
logger.disabled = True
That code will simply load the logger, and immediately check if the "pytest"
module is loaded. If so, it will disable the logger globally in my program.
An alternative solution would be to just disable the StreamHandler
and allow the FileHandler
to remain enabled, but I felt that logging from unit tests is not helpful and chose to disable it entirely.
I hope this discussion is helpful - I’ve found that sometimes the best opportunities for cognitive apprenticeship happen directly as a result of the class, so I wanted to take this chance and share a bit of my own problem solving process here.
If you have any follow up questions about this, please let me know!
Hi, everyone, I’m hoping I can break the record for quickest turnaround on responses to a question that I got. But I did get a question via the start-stop-continue survey about loading the milestone content on Codio, so that you can see it on a single monitor, especially if you’re using a laptop. So I’m going to show you a couple of things that you can do in Codio to to help out. First I have loaded, this is the Codio restaurant project. And I just added up here all of these options for the different milestones. And so in Codio, one of the things I can do is go to the View menu, and then click panels. And I’m going to split the main panel vertically so that it has two sides, then I can pick my milestone up here, and it will open that milestone in a web browser. And so now you can have your web browser encode do, you’ll be able to see all of the assignment requirements, and then over here, you can open up your files. This is adjustable, just like any other IDE that you’d be used to, you can split the panels. And if you’re done, you can close this. And then you can go to View panels and join with closest, and it will make it go away. So that will work on the milestones for the restaurant project. Hopefully that fixes that. And if you’re loading the restaurant project, I think the next time you reload it, it should show these new buttons up here at the top. If they don’t let me know.
For the examples, it will take me a little bit longer to go through because there are 14 of those. But you can do the same trick with an extra step. And so in any of the examples, I can go to View panels and split. And then over in this panel, I’m just going to click this project index button to load the web browser over here. And then I can go to the textbook and find that milestone or example project. So for example, if you’re on the example project for find the page that you need. And then up here at the top, there’s a button right here that says embed this page. What that will do is that will reopen the web page in this embed link by adding embed.html at the end of it. You can do this on any pages on our textbook. And so I’m just going to copy that URL. I’m going to go back to my Codio project. I’m going to paste that URL in the browser in Codio, and ta-da, I can load the page directly in Codio. Once again, I will go through and add these to the examples it will take me a little while because there are 14 of them. And it takes a little bit of time to do all that. But as a quick sidestep around that you can easily load any webpage inside of Codio, you can do anything in this web browser. It’s pretty easy to play around with. So for those of you that are working on a single monitor or on a laptop, hopefully this is a great workaround so that you can be more productive in Codio.
I have also gotten a couple other questions via the start stop continue survey that I’m going to work on answering. One of them is providing some additional instruction for people who would like to work outside of Codio, and so hopefully in the next week or so I’ll make a set of videos on installing local IDEs, using git to clone into those local IDEs and setting up a development environment outside of Codio in both Java and Python, so watch for those over the next couple of weeks as I get time to work on that. But this one is one I can solve really really quickly. As always, if you have any questions or feedback please let me know I’m more than happy to work with you to make this class is as painless as I possibly can while still being a four credit hour class. So good luck and I look forward to seeing you all again soon.
Hello and welcome to the week six announcements video for CC 410 in spring 2022. So this week, you should be wrapping up the module on debugging, logging and, lambda expressions and be working on the milestone where you’re adding all of the inheritance and polymorphism into your restaurant project. Hopefully, that’s going okay. If you have any questions, I’ll be available today to answer questions via email or on Discord. But at that point, once you’re done with restaurant milestone three, that wraps up the first module of — the first chunk of this course where we’re working with object oriented programming, and then we’re going to move into graphical user interfaces. Also, this week, you should be scheduling your second final project check in. This is the time where we’re hopefully going to try and lock in on a particular topic for your final project. So you can start thinking about the classes that you’ll need to represent that in your code.
This week, we’re going to shift gears a little bit and move to GUIs, or graphical user interfaces. This module is all about just building the basic structure of a GUI for your program. It’s really simple, it’s not too bad. I will show you one example, based on some of the example projects we’re going to work on. Make sure you read the helpful hints that I give you in the milestone itself. But this is one milestone where you can really be creative. The only thing I really care about on your GUI is that it has the right functionality. And then it’s somewhat follows my structure in the code. But the actual layout and design of the GUI is totally up to you. Feel free to get creative, make it as cool or as interesting or as useful as you think you can. Because you’re going to be building on top of that framework for the next several milestones.
Looking ahead after this, then we’ll get into event driven programming and how we actually make our GUIs responsive to things like button clicks and actions by the user. Module eight, we’re going to cover design patterns and testing mocks, which I think are probably the second most important thing we cover in this class outside of the object-oriented programming concepts. Module nine, you’re going to work on integrating combos into the project as well. And then we’ll go into web API’s and other stuff later on this semester. That’s all I’ve got for this week. Hopefully things are strumming along really well for you. As always, if you have any questions, feel free to let me know and I look forward to talking to you this week or next week about your final projects.
Hello, and welcome to the week seven announcements video for CC 410 in spring 2022. So this week, we’ll be doing the second module on GUI programming, which is all about event driven programming. And so in this module, you’ll actually have two smaller examples covering both parallel programming and event driven programming. And then you’ll work on the fifth restaurant milestone, which is all about making your GUI reactive to button clicks and things like that.
So again, in this milestone, you’ll be working on your events in your GUI, we’re going to refine the structure of the GUI a little bit to change a couple of things. But the big thing you’re going to do is add the button click handlers for your GUI. So by the end of this milestone, you should have a mostly functional GUI, there’s a few things that we’ll leave out, but we’ll get to over the next couple of milestones. You’ll also be writing a few unit tests for this project. And the big thing I will tell you is look at the milestone and read the hints. There are a lot of hints on coding style and some different things you may want to change in this milestone. So make sure you read the hints that I give you and try and follow those as best you can.
So one thing that comes up with this milestone, as we start doing unit tests with graphical interfaces is we run into the problem that the Codio boxes have a very limited memory on the internet itself, most of them have only 512 megabytes of memory. And when we’re running unit tests, we keep spawning a lot of instances of the user interface and that can cause problems. So on Java, what will happen is Gradle will lock up so you’ll just have to open the terminal and do gradle –stop to stop any running Gradle processes. And then go to the Project menu and hit restart box to restart the Codio box. And then you can refresh your browser and try again. In Python in tox, what we do is we run the tests in batches. And so I give you an a skeleton of an updated tox file, you may have to tweak it just a little bit to match your previous talks files. But this allows you to run things in batches. The other thing you can do, I just released a set of videos for how to set up either Visual Studio Code or PyCharm or IntelliJ outside of code to to work on these projects. And so another option is you could download your projects to your computer, get those things set up and then run Gradle or tox outside of Codio to do the testing. It’s up to you. I’ve been able to get everything to work in Codio but sometimes I have to start with restarting the box and then running Gradle immediately after that, or being careful in Python about how I break out my tests so that they will all actually run. So read up on that if you run into trouble, please let me know. And I’d be happy to help you out.
So looking ahead, The next module is all about design patterns and combos. Like I said earlier design patterns, I think is probably the most important thing to take away from this class other than the object oriented concepts we’ve already covered. So you’ll have that module you’ll have all through spring break to work on that milestone. And then after that, we’re going to do module nine and 10, which is external libraries and releases. And so week nine and 10, after you get back from spring break are also going to be the same milestone. So after this milestone, you have to double week milestones. So you’ve got plenty of time to work on those. And these are two of the last really big milestones before we switch over and work on web development. And so after that on week 11 and going forward, we’ll switch over to web API’s.
So we’re getting close to spring break. Hopefully everybody’s keeping up your motivation and then keeping up with this course. As always, if you have any questions, please let me know and otherwise, I hope you have a great week.
Hello, and welcome to the week eight announcements video for CC 410 in Spring 2022. So this week coming up is spring break. So we’re talking about things that are happening after spring break. This is one of the larger modules where this week you’ll be covering things like design patterns and test doubles, you might also know them as mock objects. And so this whole milestone is about a lot of cool programming concepts that are related to object oriented programming, but help extend your ability to develop programs that people can understand and to develop your ability to write unit tests that can actually test around those objects. So this is the rather large milestone, this is probably the largest milestone of new content that you haven’t seen before in this class. And because of that, I give you two weeks plus you have spring break. So you really have three weeks to work on restaurant milestone six. So the next milestone is not actually due till the end of March. However, it’s really important that you budget your time well, this is a milestone that is probably the second to most difficult assignment in the class. And the success rate of actually completing all of the milestone objectives on this one has been pretty low. So I encourage you to start early and work on it a little bit at a time, and make sure that you’ve budgeted enough time to work on this project together at all done. Also the first of April is when we’ll have our third final project meeting by then you should have locked in your project idea and hopefully started a little bit of coding. And then throughout April, you’ll have a lot more time to work on finishing out your final project.
So milestone six, it’s all about adding two big options to this project. The first thing we’re adding is orders for entering an object to keep track of the order that a user is actually constructing in that sidebar in your GUI. And then we’ll also create the ability for them to have combos where you have a wrap aside and a drink and a combo order that you can put together that comes with a discount. We’re really doing this to test out design patterns, which are common ways that we can build certain things in our program. So you’ll get to work with the factory method pattern, the builder pattern, the singleton pattern and the iterator pattern. In this particular milestone, you’re also going to do unit tests using test doubles. So mock objects and things that you can use. But other than that, there’s going to be few changes to the GUI itself, it’s mainly wiring up the bits to handle orders and combos, and things like that.
So because this is a big milestone, I figured I’d give you a few tips on how to complete it. If you look at the milestone, there’s really three major things that you’re going to work on, I encourage you to do orders first. So figure out the order object, how you can get that put together, how you can build an order in your sidebar, and get that all working, that’s really the important part to get working first, then you can work on adding combos, you’ll add some more buttons to your your UI, you’ll build the combo builder, and you’ll work that in. But if your orders are already working combos should just fit right into that with a couple of minor changes. Once you get all of that working, then the third thing you can do is switch your panels over to use a panel factory. If that doesn’t work, it doesn’t really break anything that is needed in the last milestone. And so I really encourage you to get orders and combos working for sure. And work on the panel factory. It’s not that complicated once you get it in there. But if anything has to be given on this project, I would probably leave out the panel factory. The other thing I really encourage you to do is write unit tests as you go. So once you get the orders working, you can unit test the orders before you ever actually implemented in your GUI, and so on. And then also document and fix your style as you go, you’ve got automated testing tools. And so every time you get something working, take a minute, get it unit tested, get it documented, make sure the style is fixed. And that will make it easier as you go along. So you don’t have that saved for the very end where you have to spend hours doing nothing but fixing style. I dislike that part of programming. And so I think it’s a lot easier to just build that in as you go. Or maybe even learn how to code with really good style in the first place so that you don’t have to do as many fixes later on.
So this module continues some of the testing issues that I talked about last time. This is simply due to the Codio boxes, having limited memory and now that we’re dealing with GUI objects, especially running unit tests is very intensive on memory. In Java, if it looks like your tests crash, you can refresh the page, do gradle –stop in the terminal to stop any running Gradle processes. And then you can go to the Project menu and hit restart box, which will restart the Linux system behind Codio itself. In Python, we can just run our tests in batches and I give an updated tox file that you can tweak a little bit that lets you run your tests in batches. The other thing that’s new this semester I just posted a few videos on how to run your projects outside of Codio. So if you so choose, you can watch those videos and download your project to your local system and work on those either in PyCharm or IntelliJ or Visual Studio Code. The videos I posted are reflective for a Windows environment for Mac or Linux it should be very similar. If you want videos for Mac and Linux please let me know and I will do my best to work with you to get those videos put together. But those are all options that you can use to make your experience a little bit easier when you’re writing unit tests on this project.
So looking ahead after March, we’re going to go into April. Module 10 and 11 is all about external libraries and releases. And so we’re going to work in the next milestone with an external library. It’s a library that represents a cash register system. It’s something that I wrote and you’ll be integrating that into your system. And so the next milestone will also be a two week milestone. So we’ll have one milestone due on March 28. And then the second milestone will be due the second week of April. These are the two biggest milestones in this class. And then after that, things wind down quite a bit. And then after that, we’ll go into things like web API’s and some of the other topics in this class.
So we’re finally at the halfway mark of the semester. It’s week eight spring break is coming up next week. There’s nothing do over spring break. There’s no expectation that you work on anything in spring break because you do have the two weeks after spring break to work on this next milestone. That said if you want to make things easier on yourself, get a head start on the milestone feel free. I will try and be available as much as I can over spring break. So I’ll be watching my email and watching discord. It may take me longer than usual to get back to you but I should be able to answer questions. Otherwise, I wish you the best of luck if you’re traveling over spring break, stay safe, be healthy and come back ready to go in the last half of the semester. And I will look forward to seeing you again in a couple weeks.
Hello, and welcome to the week nine announcements video for CC 410 in spring 2022. So we’re just getting back from spring break, and you’re still working on the same module as before. So this week, you’ll be working on design patterns and test doubles. And you’ll also have an example around using patterns and test doubles or mocks in your projects. And then you’ll start working on milestone six, you have two weeks to work on milestone six. So it’s not due until the end of next week, which is March 28. And then by the start of the next week, on April 1, you should meet with me again for your third final project check in.
So remember, milestone six is all about adding orders and combos to the restaurant project. An order is a way to keep track of all of the things that the user has ordered. Right now we’re putting those in the sidebar in our GUI, but we’re not actually keeping track of those in an object. So now we’ll make an object for that, we’re also going to have the ability to create a combo where they can have an entree side and the drink all put together with a discount. And we’re going to do that to test out a lot of design patterns. And so in your project, you’ll get to use the factory method pattern, the builder pattern, the singleton pattern and the iterator pattern. And then you’ll also write unit tests for those new projects. And you’re going to use test doubles, so mock objects, fake objects, things like that, to work along with these patterns. To go along with all of that there’s very few changes in your user interface itself, just mainly adding these different parts onto it. But this adds a lot of the remaining functionality to your project except for the checkout process, which we’ll do in milestone seven.
So some big tips for milestone six, there are a bunch of different things you’re doing. And I really recommend trying to tackle one piece at a time in to get that working before you try and move on to the next, it’s probably easiest to add orders first. So that’s doing things like the singleton pattern. And then once you get orders done, then you’ll add combos. Oh, and the orders also does the iterator pattern as well combos, then you’ll be adding the builder patterns and adding combos to your menu. And then you’ll add the panel factory doing the factory method pattern third. And so if you get each one of those working in turn before you start the next one, it should work really well. I encourage you to make unit tests as you go, you can even try some test driven development by writing tests before you work on your code. And then once your tests pass, you know your code is working the way you intend it. And it’s also a really good chance to practice documenting your code and fixing style as you go. It’s much much easier to do that a little bit at a time as you go, instead of having to spend a few hours at the end of the milestone doing all your documentation and style fixing all at the same time.
Also, this project, you might run into some testing issues. So this is due to the limited memory of Codio boxes where they’re limited to about 512 megabytes of RAM. In Java, if your Gradle ever crashes, you can hit CTRL+C to stop it and then do Gradle –stop in a new terminal and that will stop Gradle running, then you can go to Project and restart the box and then refresh your web browser to clean things up. In Python in tox, the easiest way to fix this is to simply run the tests in batches that seems to work really well. And of course, you can always develop things outside of Codio and I’ve just released some videos a couple weeks ago on how to install a local IDE and get these projects working. They’re focused on Windows, you can probably do something very similar on Mac or Linux. If you’re on either of those systems, let me know and I’d be glad to help you out to figure that out.
So looking ahead after this week, once we get done with this module, you’ll have a couple more modules on libraries and releases. And then milestone seven. We’ll cover some of that. And then once we get past that, then we’ll start working on web API’s and other things. This week is a two week milestone. The next milestone is also a two week milestone. And then after that things will really ramp down and you’ll have some more time to work on your final project.
So here we are. It’s the Monday after spring break. So hopefully didn’t hit you too hard. But now it’s time to get back to work and start working on the rest of the semester. As always, if you have any questions, let me know and I will look forward to seeing you again next week.
Hello, and welcome to the week 10 Announcements video for CC 410 in spring 2022. So this week next week, you’ll be working on milestone seven in the restaurant project, which is all about including external libraries and getting ready for complete release, we’re also going to be adding the GUI panels that we need to actually modify combos in our project.
So milestone seven, this is the biggest most complicated milestone in the class. Last milestone is a pretty close second, but this one, most students have reported that this is the most difficult milestone, it really comes down to two parts. The first part is adding all of the GUI to manage combos. It’s really meant to reuse your existing panels. And so if you look at the example project, it will show you quite a bit about how to use this in your code. Hopefully that makes sense. But make sure you think about how you can reuse your existing GUI panels, and just include things like a drop down to switch between the different items in the combo. The second part of this milestone is adding the checkout functionality. And so this actually uses an external library to represent a cash register, you can pay by cash or credit card, you’ll need to be able to make change if you pay by cash. And then the project should also use that library to print a receipt at the end of the transaction.
So some hints for this milestone, as I mentioned earlier, for the combo GUI, try and reuse your existing panels, you may have to change them a bit. For example, you may want to make the side panel so that it can instantiate without a side actually implemented. That way, you can choose none in that drop down and it will blank out that area of the combo. So you just have to think a little bit about the layers and the abstraction that you have to make your combo work. But again, look at the sample projects and how we build that combo GUI there. And it should make sense for how you can break that out into the full project itself. When you get to the making change part, making change is difficult. So think about it, you have to keep track of all of the different denominations of cash, and how you’re going to report that to the user and also how you have to interface that with the library. So make sure you think about that the making change, you do also have to deal with limited quantities in the drawer. But I’ll give you a big hint. Don’t worry about that at first assume the drawer has unlimited cash and get that working first, and then worry about the case where you run out of things like pennies, or nickels or something and how you would handle that by making change with other denominations. So get it working first, then try and work on that edge case, it’s not worth very many points. But it’s really important to have it for completeness. So think about it that way. Also, remember, for the receipt printer, it has a very limited length, you can only print 40 characters on line. So you’ll have to think about how you’re going to truncate or deal with that. You can use things like ASCII art to show a combo. Think about receipts you get in your daily life and how those are formatted. And that will give you some ideas there. I highly highly recommend using the adapter pattern with this library. So that would mean you will write a small wrapper class around the classes that are provided in the library. And then for your unit tests, you can do unit tests with your adapter library. So for example, for the making change process, you might have a method in your adapter class that takes in the denominations of cash from the user and the amount that the user needs to pay. And then it will compute the denominations that need to be given for change. And then you’ll have a separate method that will take in those denominations of change and the current contents of the of the actual cash register and make sure that they fit or make any adjustments to the change to be given to match the different denominations that are in the register. And then you’ll have another method that is not tested that actually implements the transaction itself. So think about how you can use the adapter pattern, especially when you need to write your unit tests. And the other big hint is the library that you’re using is completely open source. It’s something that I wrote and it has a complete suite of unit tests. So don’t be afraid to go through and read the unit tests that are included in that library, it might give you some ideas of ways that you can write your unit tests to work with the library itself.
So other than that after this week, and next week, when you get milestone seven turned in, we’re going to switch over to working with web interfaces, that is much much smaller milestones, there are about a third the size of the milestone that you’re working on this week, maybe even smaller. And the examples are much more directly applicable to the whole milestone. So the goal is those next few milestones are a lot smaller, which should give you a lot more time to work on your final project. So now is the time to rescheduling your third final project meeting and starting to really think about how you’re going to sit down and implement your final project, building the class libraries and the GUIs for it. So now’s the time to start thinking about that we’ve got about six weeks left in the in the class, so we need to get that done as soon as we can. So other than that, hopefully you have fun with this milestone this week. This is where everything comes together and you actually build a fully working GUI for the entire process of creating orders and combos and doing the checkout process and printing a receipt At this point you’ll have a fully working project and then we’re going to switch gears a little bit and do some web interfacing as well as always if you have any questions let me know otherwise good luck this week and I will talk to you again next week
Hello, and welcome to the week 11 Announcements video in CC 410 in spring 2022. So this week, you should be finishing up milestone seven, which is all about checkout. And you’ll also be doing a quick example on building a release of your project. This is a really great opportunity to learn how to package your software up in a way that other people can use it. And I’m hoping later this semester, I can give you some pointers about adding some automation and GitHub actions with your releases as well. I’m prepping that for another class, but I’m going to try and share it here. But either way, this is really useful information for you as you get out into industry.
Don’t forget, for milestone seven, it really comes in two parts, you have the first part, which is adding all the GUI options to add an edit combos to your order, you’ll need to update some of your other GUI panels. But hopefully you can reuse a lot of the code that you’ve got, it’s just about rewiring it in a different way to work with combos instead of just single items for your orders. Then the second part is adding the checkout functionality to your project, we went through an example of doing the credit card parts of this. So hopefully that should work. And then you’re going to add the cash part and the making a receipt part. Make sure you focus on getting this to work as best you can, it doesn’t have to cover all of the edge cases, because there’s not a ton of points there. I also really encourage you to use the adapter pattern, it’s in the book of patterns that you can look at, you can also just Google it online. But basically you make a wrapper around the library that I provide and the new call functions in your wrapper that call functions in my library. And then in between there, you can do your own logic. And that’s the stuff that you can unit test. So hopefully you can get that working. If you have any trouble, please let me know.
But like I said, focus on the basic ideas first, and then dive into the little nitpicky edge cases and things like that. So I went through a lot of these hints. Remember making changes hard receipts have limited length, do your best to use the adapter pattern and read through the library’s code and the unit tests that will give you a lot of good ideas of how to complete milestone seven. So after this milestone starting next week, we’re going to shift over and do some milestones around web interfaces. Thankfully, these milestones do not depend a whole lot on milestone six, and seven. So as long as you are good up through about milestone five, the Web Interface kind of picks up from that point. So don’t worry too much if you have little bits and things that don’t work so well in milestone six and seven. That’s pretty common in this course, because we’ll shift over the web. Also, you’ll have smaller, smaller milestones from here on out, which gives you some more time to work on your final project. We’re getting to the point where you have about five weeks left in the class. So make sure you’re starting to schedule time to work on the final project and ramping up on that, especially after this week.
So hopefully that works for this week. You’ve got any questions you can let me know. I always like this gift because as you’re testing your credit card thing, it gets kind of frustrating that it doesn’t work all the time. So hopefully you get really excited when it’s a match and the credit card is approved and you’re testing and as always if you have any questions, let me know
Hello, and welcome to the week 12 Announcements video for CC 410 in Spring 2022. So this week, hopefully you should be wrapping up the milestone on checkout and getting all of that working. It’s by far the most complex milestone in the course. So hopefully that’s going well. But if you still have questions, feel free to contact me today, and I’ll do my best to answer your questions throughout today until it’s due tonight. Of course, you can always turn it in a little bit late with the late penalty. But please let me know if you’re having any major issues with that milestone so I can help you out.
Starting this week, we’re going to pivot over to the next set of milestones, which are all about building an interface via the World Wide Web. And so this week, we’ve got a few simple milestones on working with data driven websites, the basics of adding a website to your existing project, and then actually building out routes and controllers for that website. So this is the start of the next set of milestones. These milestones are a lot smaller than the previous milestones I’m estimating, they’re about a third of the size and the example actually goes through most of the code that you’re going to need. So hopefully that will give you more time to work on the final project. Remember, at this point, we’re at week 12 out of 16 in the semester, so there’s about four weeks left in the semester. So you need to be starting to work on your final project and getting code committed for it so that you’ve got something to present toward the end of the semester.
So like I said, in milestone eight, we’re going to install a web framework into our existing restaurant project, we’re going to use that framework to set up some routes and controllers so that we can actually talk with it via the web, you’ll set out some templates for your Master Layouts and for the different routes. And you’ll eventually end up with a data driven menu. And so the goal is to have a website that shows the menu of our restaurant. And then we’ll build some forms where we can add custom items to the menu, we’re not going to do a web ordering platform that’s a little bit more complex than we have time to do right now. But we’ll definitely be able to present a menu and have a way that people can add custom items to the menu via our web interface.
So after today, we’re going to work with a little form data and filtering over the next few weeks. We’re going to learn about serialization. We’re learning about restful routes and things like that. But like I said, these are smaller milestones. It’s meant to give you more final project time and the last restaurant milestone is due.. I forgot to change that date on my slides… last restaurant milestone would be due I believe May 9. So keep an eye out for that.
Other than that, I hope you have a good week this week. I hope you can get done with milestone seven and get transferred over to my milestone eight, where you get to work on the World Wide Web. As always, if you have any questions, let me know and I wish you the best of luck.
Hello, and welcome to the Week 14 Announcements video for CC 410 in spring 2022. So this week, you should be scheduling your fourth and final final project meeting with me, we’re going to talk a little bit about using external libraries and API’s and generally just checking to see where you’re at on the project and make sure you’re making good progress. Because we’re getting really close to the end of the semester, you’ll also be continuing to work on the restaurant project. This week, we’re going to talk a little bit about web API’s and RESTful routing. And so you’ll do a quick example of building RESTful routes for your project and implementing that into your restaurant project. And then, of course, I’d like you to continue to work on your final project this week and next week, so we can get it wrapped up by the end of the semester.
So like I said, for milestone 10, we’re going to be converting your web app into more of a RESTful web app. And the way that we’re going to do this is allow you to add custom menu items to your list of menu items. And it’s going to help reinforce some of the design patterns that we’ve already worked with, such as the iterator pattern and the singleton pattern, we’re also going to take this chance to update the UML diagram for your project. So make sure you watch for that. Next week, we’re going to cover a little bit on form validation and also on serialization to a file. This allows us to actually store and persist our custom menu items in our project. Granted in a real web application, you would probably do this to a database. But this is not a databases class. So we’re going to look at file serialization instead. And then you’ll add that to your project, you’ll add some validation and serialization to your restaurant project. That’s the final milestone on the restaurant project, which is due next week. And then again, you’ll keep working on your final project. And then the rest of the semester I have a little extras module in the textbook that just has a quiz to go with it. It’s mainly a bunch of things that I wanted to talk about, but didn’t get a chance to cover anywhere else in the class. So it becomes this potpourri grab bag of a chapter at the end of the textbook, and then during finals week, sometime you will actually be able to present your final project. So let’s talk about that.
This slide lists the deliverables for your final project. First and foremost, make sure your your code is committed to GitHub and that you’ve created a release tag on GitHub for your code. You should also read the requirements page for the final project to make sure your code meets all of the functional and structural requirements for the project. Your code should also have a full set of code documentation. So make sure your docs are created. You can go through the releases example earlier this semester to learn how to deploy that documentation through GitHub Pages, if you so choose. Your project may also need things like a readme and user documentation attached to it. So make sure you’re thinking about that. And then finally, the other major deliverable outside of your project itself is the presentation. So the presentation I want you to plan on giving about a 30 minute presentation, probably not a whole lot shorter than 30 minutes, I’ve had some students go as long as an hour, depending on how complex your project is. And for the presentation, you have the option of either pre recording that presentation or presenting it live to me via zoom, whichever you prefer.
On your presentation, there’s a suggested outline, I suggest you follow you don’t have to follow this outline. But I found that it works really well for presentations. So you start with an introduction. And then you give a background which explains why you chose this project, anything you know about this project, how it relates to your interests, things like that. Then you’ll discuss the implementation of your project, what code structures you use, what libraries you used, what frameworks, you used all of those implementation details, you’ll spend a little bit of time evaluating your work how well did your project actually meet your goals, and are there any things that you would improve, then you’ll have a little slide a future work where mainly this is features that you wanted to add to your project, but didn’t have time. Or if you wanted to continue this project in the summer, these would be the things you’d work on, then you give a quick conclusion. And then finally, you’ll shift over and give a full demonstration of the project showing all of the nifty features and all of the different interactions that it has. So I encourage you to follow this outline if you don’t have another one in mind. But you don’t have to follow this as strictly as I’ve laid it out here. It just gives you a really good place to start.
Going back to your presentation a little bit on one thing you may be aware of I will actually be out of the country during finals week, my family is actually going to Mexico for a short vacation. But I will be working from there for several days during finals week. So it’s looking like I’ll be available either Wednesday or Thursday of finals week for a live presentation. If you want to pre record, you can pre record your presentation and I’ll work with you to get it sent to me via OneDrive or some other methodology. But if you actually want to present to me live on Zoom, your options are on finals week, you can work with me to find a schedule there, or you’re welcome to schedule your presentation the week before finals week. I should be available pretty much anytime that week as usual, and I can watch your presentation there. You can totally give your presentation even if your project is not completely done. But I want you to be pretty close to done and have most of the major functionality figured out before you give your presentation. So if you have any questions or concerns or want to get on my schedule right away for presentations, shoot me an email and let me know and I’d be happy to work with you to get that figured out.
All right, at this point, we’re getting close to the end of the semester. So hopefully you’re not freaking out too much. We’ve just got a couple of weeks left. But there’s not a whole lot left in this class other than a couple of restaurant milestones that are pretty lightweight, and then the final project. As always, if you have any questions, feel free to let me know I’d be happy to chat with you. Otherwise, good luck this week, and I will look forward to seeing you again next week.
Hello, and welcome to the week 15 Announcements video for CC 410 in spring 2022. This is the last announcements video, I won’t be doing a video on finals week. So we’re going to cover everything you need to know for the end of this semester in this video. First and foremost due today is the second concept quiz in the course, so make sure that you go through that and get that submitted, it does take a little bit of time, I think you’re allocated about two or two and a half hours to work on that it should be more than enough time to get through it. But it gives you plenty of time to go through the code, make sure you understand what you’re doing and get that submitted. You’re also working on the example for the REST part of the web interface. And then milestone 10 also covers RESTful web interfaces. So make sure you get that submitted.
After that next week, on Monday, May the ninth you’ll have the last milestone for the restaurant project, which is all about form validation and adding serialization following the examples. And the example code that I give should be really, really simple to get this put in. I don’t believe it takes a whole lot of time. But it really adds that last little bit of functionality to the website to make it very useful. So make sure you get that turned in by Monday the ninth, then by the end of finals week on May the 13th is when your final project is due. So let’s talk about that a bit.
The final project has a few deliverables. First and foremost, you’ll need to create a release tag on GitHub with your current code, make sure you read the requirements page for the final project and that your code covers all those requirements. There are a lot of requirements that are very easy to cover. And in that project, I tell you that if you cover most of the requirements, you’ll probably get a 70 or 80% on the project. And in going above that is really how well you meet those requirements and how well you truly have built a useful project. And not something that just checks all the boxes. I’ve been talking pretty closely with a lot of you and I think you’re all on the right track. So make sure you review those requirements and that you’ve hit all of those in your code before you get it submitted. You may also want to add documentation to your code, your code does have to follow the same coding standard that we’ve done throughout the class. So it should pass all of the linters and style checkers, Python, it should have typing information in the Object Oriented part of the program. It should have documentation comments throughout, you don’t need to necessarily be as strict on the unit tests. But in your actual source code, it should follow all of those requirements. You may also find it useful to add either a readme or some sort of user documentation to your project. And then of course, it never hurts to do things such as have your documentation published on GitHub Pages, maybe even making a release, like we saw in milestone, or example 10. So you can do all of that stuff as well. And then you should also add your presentation to your repository, I highly recommend just adding your PowerPoint or PDF or whatever presentation you’ve got inside of your code repository and making sure that that gets uploaded to GitHub, along with the rest of your code.
For the presentation, I expect you to give a presentation that is around 30 minutes in length, you have a couple of different options, you can choose to pre record your presentation however you’d like. Zoom works well for this, you can also download OBS and do what I’m doing where you share your screen. And then you also have some video of yourself talking pre recording gives you a chance to stop and start and cut and paste and kind of put things together the way you want. Or you can also choose to present it to me live via zoom. If you want to present live via zoom, I have two days set aside for that. So may 11, or may 12th, which is Wednesday or Thursday of finals week. If you would like to present live, please let me know soon, I’ll probably send out an email as soon as this announcement goes live asking each of you to reply really quickly with your preference on presentation. Please be aware that for finals week, I will be out of the country I will be in Mexico with my family, I’m still going to be working off and on. And I will try and be available as best I can. But really outside of May 11, or 12th, I won’t have a ton of availability. I’ll still respond emails as best I can. But it may be harder to catch me on a Zoom meeting while I’m down in Mexico. But I’ll do the best to coordinate with you. And if something comes up, we’ll deal with it. But if you have any questions on the presentation, please let me know soon. You can always record your presentation. Even if your project is not exactly feature complete. As long as it’s close enough, you can get your presentation recorded and send it to me to get feedback.
For your presentation, there is a suggested outline that I recommend you follow. It’s outlined in the final project document. I’ll go through it quickly here. Typically, I suggest starting with a brief introduction, and then give a little bit of background on the project. So why you chose this project, maybe some related projects or programs that you’re familiar with that inspired this, you’ll spend a lot of time talking about the implementation. This is how you chose to structure your code, why you chose the classes and GUIs and whatever you chose, and talk me through how you how you built the project, how you structured it, all of those high level things. This would be where you’d show your UML diagram. For example, you might even show some other diagrams or some other information such as GUI mockups that would help. The evaluation point is where you evaluate how well your project met your own goals. And it’s also where you can talk about things such as your unit tests that helps confirm that your project is working correctly like it should. You’ll have a brief slide at the end for future work, if you were to continue this project, what would you do on it? What are some things you’d like to fix or continue working on, you’ll have a short conclusion. And then at the end, you’ll have a demo, the demo is a really important part, I expect you to be able to pull up your source code, kind of talk me through some of the interesting parts of it, and then work through the GUI of your project and highlight what different parts of the source code it’s going through, you know, anything that you would do to explain to me, all of the work and all of the cool stuff that you put into this project, that sometimes not visible just by working with the GUI, so actually digging down into the code and showing me some of the cool things that you worked on and things you learned, is really useful for this presentation.
So that’s all we’ve got for this semester, the checkered flag is flying. Hopefully, everything is going well for you in the class. If you have any questions or concerns, now’s the time to reach out to me and let me know, I can’t really do a whole lot with grades, especially once we get to finals week, because most everything is locked in. And there’s not a whole lot of time to make changes. But if there’s any grades or any concerns that you have on this class, let me know as soon as possible. So I can deal with those, especially before I go to Mexico. If you have any questions you can reach out to me and also just start working on your final project presentations. Like I said, be watching for an email from me very soon to figure out the modality of your presentation and the timing if you’re going to present live so I can get those things on my calendar. Other than that, it’s been a pleasure having you all in this class. I’ve really enjoyed getting to work with you. I hope you’ve gotten something out of the class, please watch for the TEVAL email that will come out shortly that will ask you to evaluate my teaching and the structure of the class. Any comments that you can give me as always greatly appreciated. I’m always looking for ways I can improve this class. And it’s been a pleasure having you so good luck, and I will see you hopefully in the future
Hello, and welcome to the week one announcements video for CC 410 in Fall 2022. My name is Russ, I’ll be your instructor for the semester, I’ll probably post these announcements videos about once a week, usually on Tuesdays since I’m on campus on Mondays and won’t have time to record them. So you can check Canvas about every Tuesday to get a quick update for me on what you’re doing this week and anything else that’s on my mind.
So this class is advanced programming. And really in the big picture, we’re going to spend a lot of time on object oriented programming, we’re going to look a lot of graphical user interfaces, or GUIs. And we’re going to do a bit of work on web programming as well. This class has lots of interactive examples where you get to watch me go through an entire coding project that relates directly to the milestone that you’re going to work on. And then throughout the semester, we’re going to work on this huge restaurant project, there will be several milestones throughout that project that we’ll work on in class, and then you’ll get to work on it yourself as the big project in this class. And then you’ll also do an independent final project to really show that you can take what you’ve learned with the restaurant project, and build it out as an independent project yourself.
So this class, you’re going to learn a lot of new technologies, we’re going to start using Git and GitHub classroom to keep track of all of our code, you’ll learn to use either Gradle or talks to help manage your builds and dependencies for your projects, we’re going to do some work with type checking unit testing style checking documentation. The whole idea is this class is really going to take what you already know in programming, and add a lot of the more industrial professional ways that we deal with programming into that course. The Hello real world project that you’re going to work on this week is a great example of how we’re bringing all of these ideas into the programming that you already know how to do. So in this course, you’re going to work on a final project, you get to choose the topic for your final project. Hopefully it aligns with your interests. And the idea is to use what you’ve learned in this course to do something new. So your project is going to be object oriented, it’s going to have a GUI, it’s going to have some GUI forms. So we’ll kind of work with you to discuss the scope and the scale of your project. And then throughout the semester, you’ll have a few milestones on the final project, mostly just as talking about ideas for your final project until we get later into October, November when you do a lot of the coding on that project. And then at the end of the semester, you’ll give a presentation on your final project as well.
So this first week is mainly just administrivia. Going through all the basics of the course, the syllabus, the background, things like that. You’ll also work on the Hello real world project, which introduces a lot of the concepts in this course. And you’ll be able to schedule your first final project meeting with me, hopefully either this week or next week, so we’ll be able to chat some more about the final project. Do check out the information about my office hours, I’m usually only on campus on Mondays the rest of the week, I’m available using the Calendly link that you can find in my email signature and on the syllabus and on the website. So feel free to check that out. For communication. This class has an email list so you can please use the cc410-help email address to reach me. You can also chat with me on Discord. A lot of you have already done the introductions on Discord, which is great, I’m always there to answer questions as well.
After this first week, then we’ll start getting into some of the other content of the second week we’ll spend a lot of time working on a class library using Object Oriented Programming. It’s about 2000 to 2500 lines of code, which is much larger than most of the projects you’ve done in the past. But a lot of it is boilerplate. So you really just have to be thoughtful as you copy paste that code around. Week three, we introduced unit testing and documentation this week is a lot of code, sometimes 3500 to 4000 lines of code. There are lots and lots of unit tests. One of my model solutions for this hadn’t 423 unit tests. So there’s a lot of repeat code. And it’s a great way to catch some errors in your code. When I wrote the model solution for this, I found about half dozen errors in my own code just by going through and doing unit testing, then we’ll get into some inheritance and polymorphism polymorphism by refactoring a lot of your old code. This milestone is not as much lines of code, but it’s a lot of changes that you’ll need to work with. And then this is also where you’ll do the final project Milestone Two, I forgot to update the dates on those slides. Those should be mid to late September. And then beyond that, you’ll be working with GUIs, external libraries, web serialization, and so much more throughout this class.
So big advice for this class. This is a four credit hour class, which means you’re expected to work about 12 ish hours each week, I can definitely tell you looking at the statistics over the past few semesters that that is very true. A lot of students on these milestones end up spending anywhere from 10 to 15 hours per week on the milestones. So make sure you’re budgeting that amount of time in your schedule, and make sure that you get started soon on the projects. A lot of students that have trouble in this class, start the milestones the day they’re due, and then they simply run out of time to get it done. So schedule your time wisely. Start early, leave time to ask questions. Remember, this is an online course and it may take a day or so for me to get back and answer all of your questions. I will try and do the best I can but I will guarantee within one business day. So get feedback early. Copy paste your code carefully as you change things. There’s a lot of duplicates functions that you need to tweak a little bit. So think about that. Don’t be afraid to commit to get frequently get is your friend here. If you screw something up, but you committed to get when it was working, you can roll back and try again. In this course, especially with advanced programming, you can use in sight online resources. So if you find a little piece of code that’s helpful, you can cite that the biggest thing is don’t try and look up whole solutions to this, there really aren’t going to be any. But if you need to just have a little piece of code to sort something or do something in the GUI, you can use that and cite it.
So that’s really all I’ve got for this week. If you have any questions, you can email the cc410-help email list, you can talk to me on Discord. I also host the tea time office hours for the department currently scheduled at Tuesdays at 330 and Fridays at 1030. Although we may be sending out a survey to change that schedule, and then of course, you can schedule a one on one office hours with me using Calendly anytime you like. So that’s all I’ve got for this semester. I’m rooting for you. Best of luck. Feel free to keep in touch and look forward to seeing you throughout the week. And I’ll probably meet all of you in person when we do our first final project meeting here in the next couple of weeks. So good luck and I will see you soon
Hello, and welcome to the week two announcements video for CC 410 in fall 2022. So you should be wrapping up module one this week, which includes the Hello real world project and the first final project meeting. If you haven’t done that already, please take a minute to schedule a time to meet with me using my Calendly link. So we can talk about the final project in this class and just answer any questions you might have about what’s going on.
This week, you’ll be working on the second module, which is all about object oriented programming. We’ll go through a long form example of how to use object oriented programming that really closely matches what you’ll be doing in the restaurant project. And then you’ll start working on the first milestone in the restaurant. This is generally the rhythm that we’re going to go through this semester where we’ll start with a textbook content that introduces some things, then you’ll have a long example video about an hour long of me talking through and doing some of the coding on a sample project. And then you’ll be doing something similar to the sample project in the restaurant project itself. So hopefully, it works out really well. So some quick updates on this class. Don’t forget, there’s a discord channel that all of you have introduced yourself in. So make sure you go check that out. If you have any questions, you can also email the cc410-help email address.
The grading in this course, you’ll start seeing grades for the Hello real world project come in in the next couple of days. The rubric itself will be on Canvas, so you can see where you lost points there. And then I’ll also go into GitHub. And I will give comments on the GitHub feedback pull request. Please do not close that poll requests. We want to leave that open throughout the semester. So it’s really important that you leave that alone, and I will just continue to add comments to it throughout the semester. Other than that, hopefully things are going well. If you have any questions you can let me know.
For the first milestone we’re talking about packages and classes is specifically we’re going to create classes and packages for all of the menu items in the restaurant. A lot of this is boilerplate code. So once you get one menu item done, you can easily copy and paste and kind of transition that code to all the other menu items. If you want to make things easier later, you can do style and documentation. Now, if not, we’ll start enforcing that in the next couple of milestones. This milestone I estimate takes between three to eight hours to complete depending on your comfort level with the programming language that you’re working in. My model solution from a couple of semesters ago was around 1500 to 2500 lines of code, I’ve reduced the size of this milestone just a little bit, so I’d expect it to be on the lower side of that. But that’s about where you’re shooting for. For a lot of you coming out of the CC courses, this is going to be a much larger project than you’re used to. But the code itself isn’t that complex, and a lot of it is repeated. So don’t let that number of lines of code really scare you too much. And as always, feedback is welcome. So if you have any questions on the milestone or anything is unclear, please let me know. And I’d be happy to answer that for you.
Looking ahead to the rest of this class. Once we get past this module, we’ll spend Module Three on documentation and unit testing. Module Four is all about inheritance and polymorphism. And we’ll spend some time refactoring our code to use take advantage of that. And then the module after that is all about debugging, logging and lambda expressions, which is also very interesting in this project. And then once we get toward the end of September, you’ll have a second final project meeting with me, where we’ll actually start talking about Project topics and see what might fit. So that’s all I’ve got for you this week. Good luck on the first restaurant milestone as always, if you have any questions, let me know and I will see you next week.
Hello, and welcome to the week three announcements video for CC 410 in fall 2022. This week you should be wrapping up module two, which is all about object oriented programming. You’ve also got a quick example on object oriented programming. And you’re also going to be diving deep into the first restaurant milestone. Hopefully all of that is going well. But if you have any questions or concerns, feel free to let me know. I’ll be grading those over the next few days this week and leaving lots of comments both in Canvas for the grading and in GitHub on your code. So make sure you check both of those places to see all of my feedback from milestone one on the restaurant project, you’ll have a chance to make some of those updates as part of milestones two and three, as we go ahead.
So this week, we’re going to dive into some other topics related to programming. Specifically, we’re going to focus on documentation and testing, we’re also going to do a quick review of the Unified Modeling Language or UML, which is a great way that you can document the structure of your program. We’re also going to do a quick example on adding documentation and doing some unit testing for an example project. And then you’re also going to start working on the second restaurant milestone, which is Milestone Two. So hopefully that goes well.
Milestone Two is all about adding unit tests and documentation to the code. My estimation is there anywhere from 300 to 400. Unit tests, maybe even a few more than 400 unit tests that you’ll add to your project. You’ll also add documentation comments to every method, every class, every file, you’ll have class diagrams that you’ll add. This milestone I estimate, once again takes about three to eight hours depending on your comfort level and familiarity with the content. In this one is very large, there can be anywhere from 3500 to 4000, lines of code that you touch. Some of those lines are obviously just comments, a lot of those are unit tests that you can copy, paste and tweak. And so try and think ahead, one of the things I really recommend doing for this milestone is picking one of the large entree classes writing all the unit tests for that one. And in most of those tests, you can copy and paste and tweak a little bit for the other entrees. The same goes for the drinks on the side. So it’s a lot of repeated code with little tweaks. So make sure you think about how you can do that in a more intelligent way instead of just writing the code by hand in every class.
So some other big hints for Milestone Two. First and foremost, do not look at your source code, I really want you to write these unit tests based on the specification that was in Milestone One, not by looking at your source code. What happens if you look at your source code is you ended up testing what you wrote, instead of what you should have written. For example, making sure that the prices are correct making sure that the calories are correct making sure that things are spelled correctly, you want to go back to that original source document and write the tests based on that not based on the code that you wrote. Another thing you can do is you can use Global attributes, I’ll show an example of that on the next slide, you can try and generalize some of your tests a little bit. But don’t try and generalize the individual ingredients in the entrees that’s really difficult. And also you can look at using parameterised tests across the enums. So we have a few enums that we’re going to use in our object oriented programming. And you can parameterize a test so that it tries it with each possible enum value to make sure that it works.
So this gives you a quick idea of what a generalized test would look like this is from a few semesters ago. But in this case, we have a menu item that has a price and a calories. And then we have tests that will check to see that the price is correct, and checks to see if the calories are correct. And so instead of embedding the price and the calories in the unit test itself, I’ve made those global variables in the test class at the top. And so what I can do is I can copy paste this entire piece of code into another class and just change those variables. And then we’ll be able to reuse a lot of the code without having to tweak each individual line of code to do the same test. So this gives you a quick idea of one way that you can restructure your code to make it a bit easier.
So looking ahead from here, and the next few milestones will cover inheritance next time, we’ll have a module on debugging. And then at that point, we’ll be at the end of September, and we’ll be working on about the second final project milestone, then we’ll shift over and we’ll start talking about graphical user interfaces and event driven programming, and lots of things to go down the road from there. So hopefully, this unit testing module gives you a lot of experience working with unit tests and how you can actually write code to test that your code works properly. It’s a really important concept in software development. And it’s one of the things that I really encourage you to learn. Writing good unit tests will help make your code better because you know how to make good testable code. As always, if you have any questions, let me know and I look forward to seeing you again next week.
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.
Hello, and welcome to the week five Announcements video for CC 410 in fall 2022. This week you should be wrapping up the module on inheritance and polymorphism. There’s also an example that goes along with that. But there’s not a milestone due this week. You also should have gotten the start stop continue survey, I’ve received several responses already. And I’ve responded to some of those in an announcement on Canvas. So make sure you check that out. And also, this is a good time to start thinking about your final project and bounce around some ideas of things that you might want to work on as we get toward the end of the semester.
So this week, you’re going to have another module that talks about debugging and logging. We’re also going to spend a little bit of time on lambda expressions. You’ll do an example around debugging and logging and learn how some of those techniques can work. And then you’ll be working on the third restaurant milestone, which is mostly about refactoring your code follow object oriented polymorphism. And then we’ll also have the the second final project meeting either late this week, or probably next week as well.
So like I said, last week, milestone three is the first milestone for the restaurant where you’re going to need to do all general requirements. So you’ll need to make sure your code has correct type checking. If you’re in Python, it should pass the style checker, it should have documentation, comments and all the source code, it should have unit tests that achieve a high level of code coverage, all of those things is what we’re looking for in milestone three. Also, don’t forget to update your UML diagram, this one’s going to have a lot of associations in it because we now have an object oriented inherited structure. The code, the milestone itself was only about about 1500 lines of new and changed code. So it’s a little bit smaller than the last two, but it is quite a bit more complex. And as always, feedback is welcome. If there’s something that’s not quite as clear as it should be in the problem statement itself.
So also, like I said, for milestone three, try and work in small chunks, don’t do it all at the same time. an iterative incremental design pattern is really what you want to take in this class. Try and commit early and commit often to git so that if something breaks, you can roll back and try again. You can also give test driven development and try see if you can try and write the tests that you want to pass before you actually write the code itself. There’s an Order Item class that you’re going to build, I highly recommend that you inherit that on your base class. So the base wrap, drink inside class and not the individual items themselves. And of course, this one has some complex syntax, especially in Python, where you may not have seen some of these things before. So feel free to ask questions, if any of the syntax is confusing, and I’d be happy to help you out there.
Looking ahead from this milestone, once we get done with this one, we’ll switch over to talk about graphical user interfaces. So we’ll go through some basics of that. We’ll talk about event driven programming, which is a big concept when working with graphical interfaces, then we’ll spend some time talking about design patterns. Design Patterns is probably one of the biggest takeaways in this class. I think it’s a super important idea in programming. So we’ll spend quite a lot of time on it. And then we’ll actually switch over and talk about external libraries, web API’s and other things.
So it’s really hot this week. This is kind of one of those last little bits of summer before we get really in the fall. So hopefully you’re staying cool out there. Make sure you stay hydrated. Make sure you put sunscreen on if you need to. But hopefully we can get past this heatwave and get back to normal pretty soon. As always, if you have any questions, let me know and I will look forward to seeing you again next week.
It appears that I missed an interesting error when developing Example 5 for Python. It is a bit complex, so I’m relying on the advanced formatting of this webpage to help explain it better than I can via email or in a short post to the class. I’ll start with a short version, and then include a longer discussion of the problem and how I came to a solution that I feel is very helpful reading for anyone learning to program and solve these issues in their own work.
Currently pytest has a bug that causes errors when logging to sys.stderr
when running code inside of pytest
.
As best I can tell, pytest
tries to capture all output being printed to sys.stderr
by redirecting it to a buffer (a virtual file) when running the tests. Once it is done, it will close the buffer and redirect output back to sys.stderr
. Unfortunately, our logger does not realize this, and it may continue to try and write data to the buffer that is now closed, resulting in the ValueError: I/O operation on closed file
error message seen in the output.
There are several methods to determine if code is running under pytest
and disable logging in that case.
I recommend this method:
import sys
# get the root logger
logger = logging.getLogger()
# disable if pytest is running
if "pytest" in sys.modules:
logger.disabled = True
You will need to add this code to any file that you add logging to, in order to prevent errors from pytest
. Alternatively, you can disable the handler that prints to sys.stderr
and instead just use a file handler.
Since this is an advanced programming course, I figure that it is worth a bit of a “deep dive” into this situation so you can understand what I found, the efforts I went through to solve it, and how things are really working behind the scenes.
This is a bit of cognitive apprenticeship, where I attempt to show you my thought processes and how I go about solving a problem like this. My hope is that you’ll be able to learn from this process and possibly use this knowledge to help you solve your own problems in the future.
Unfortunately, in the world of higher education, we spend way too much time focusing on narrowly-scoped, previously-solved problems, to allow you to learn in an environment where we know a solution is possible in a set amount of time. In the real world, however, you’ll be constantly presented with broadly-scoped, open-ended problems like this one, where you’ll have to do some exploration to find possible causes and solutions, and then use your own background and knowledge to determine what solutions, if any, are available.
So, here goes.
When you run pytest
in Example 5 after adding some logging code as directed in the video, you will see many pages of errors printed to the terminal. In my testing, the terminal in Codio printed errors for several minutes before finally stopping. A screenshot of a small portion of those errors is below.
When this happens, you may be able to use CTRL + C to stop the output, but in many cases I simply had to close the terminal tab in Codio.
When I developed this example, I focused on the debugging portion first, and then later added the logging code. However, I neglected to run pytest
after adding the logging code to my model solution, and did not encounter this error in my initial testing. That was an oversight on my part.
As you work on this project, you may end up adding the logging code first while still working on debugging the errors in the project. In that case, you will most likely run tox
or pytest
to run the unit tests contained in the project with the logging code in place. That will cause the error to appear. As soon as I ran tox
in my existing model solution, my code presented this error.
The process of finding a solution for this problem went in three phases.
First, I attempted to Google some of the error message and a few things that I suspected were at play. I already had a hunch that the error itself was coming from the logging code, since I had added that to my model solution last. After reproducing the bug in my solution, I set out to solve it. Some Google search phrases I used:
pytest logging stderr write to closed file
- Including keywords pytest
and logging
as well as the stderr
stream and a bit of the error message.pytest stream.write(msg) I/O operation on closed file
- adding more details such as the line of code causing the error and the exact error messages."pytest" stream.write(msg) I/O operation on closed file
- putting "pytest"
in quotes will find results that always include that keywordThere were others, but this was the most fruitful.
In several of those searches, I came across a few bug reports on GitHub, specifically within the pytest
project’s repository. Bug reports and discussions on GitHub are usually very fruitful when looking for technical errors that include code and error messages, so I looked into a few of them.
sys.stderr
as part of the test. It was also much more recent, and some of the error messages they were running into were similar to what I was seeing.sys.stderr
or sys.stdout
, then most likely pytest
would interfere with that and cause this error. Thankfully, the last two issues both referenced this issue…pytest
developers posted a message that included this text:What I believe is happening is:
- pytest changes
sys.stdout
andsys.stderr
to a buffer while importing test modules.- If there’s user code setting up logging and/or creating a
logging.StreamHandler
at the import level, it will attach itself to pytest’s buffer.- When pytest is about to finish the test session, it will restore
sys.stdout
andsys.stderr
to the original values, and close the “capture” buffer.- Here the problem happens: if any message is emitted at this point, the
StreamHandler
will try to attach itself to the buffer, hence the error.
So, we’ve now found what we suspect is the error. All we have to do is figure out how to resolve it.
Unfortunately, issue #5502 is still open as of this writing, so we needed a way to get around this error. With some quick testing, I was able to confirm the error went away if I removed the StreamHandler
from the existing logging code. So, I decided that the best way to deal with this was to find some way to disable logging while the code is running as part of a unit test. This is a somewhat common, though discouraged, trick in programming. Ideally you don’t want to hide any code from the unit tests, but in some instances you want to make sure that the unit tests don’t actually change live data, such as the actual database used by this program. So, you can “protect” the code that connects to the database and make sure it cannot run as part of a unit test.
A quick Google search for determine if code is running under pytest python
quickly lead me to a StackOverflow post discussing this very issue. Great! I had quickly found a pretty good resource that might lead me to a solution.
Within the discussion, there are a few solutions suggested, and helpfully ranked by the upvotes from other users.
if "pytest" in sys.modules:
since the pytest
application will always be loaded when running a test. This solution seemed pretty simple and didn’t have many obvious side effects, provided your application didn’t load pytest
as part of its normal execution.conftest.py
file, which is only executed as part of a unit test, to update a value in our code, and then check that value where needed. This looks promising, and is probably the correct answer that would work in all cases, but also requires significantly more code and adds a structural dependency between our code and the conftest.py
file.PYTEST_CURRENT_TEST
environment variable, which is set when pytest is running. This may also work, but has the side effect of being outside of our control - any other application on our system could also set that variable, including another instance of pytest
, so it may not work as reliably as the other two.In the end, I chose Solution 1, and updated the code at the top of my main()
method in TicTacToe.py
to the following:
import sys
# get the root logger
logger = logging.getLogger()
# disable if pytest is running
if "pytest" in sys.modules:
logger.disabled = True
That code will simply load the logger, and immediately check if the "pytest"
module is loaded. If so, it will disable the logger globally in my program.
An alternative solution would be to just disable the StreamHandler
and allow the FileHandler
to remain enabled, but I felt that logging from unit tests is not helpful and chose to disable it entirely.
I hope this discussion is helpful - I’ve found that sometimes the best opportunities for cognitive apprenticeship happen directly as a result of the class, so I wanted to take this chance and share a bit of my own problem solving process here.
If you have any follow up questions about this, please let me know!
Hello, and welcome to the week six Announcements video for CC 410 in fall 2022. This week, you should be wrapping up the last part of the first section of the course, which deals with debugging and logging. You’ll also learn about Lambda expressions. And you’ll be working on the third restaurant milestone where you’re adding a whole lot of inheritance and polymorphism into your project. This week, and next week, you should also be scheduling our second final project meeting. This is where we’ll start talking about how your final projects will match the framework that we’ve built in the restaurant project. And we’ll start bouncing around some ideas for your final project, you don’t really have to lock in anything yet. But this is a good chance to kind of discuss where you’re at in the course and see what your final project might be going forward.
So this week, we’re going to switch gears a little bit and we’re going to start working on graphical user interfaces or GUIs. So this week, we’ll have a quick GUI basics example where we’ll kind of build out some of the framework around our GUI. We’ll add a lot of the interactions to it next week. But this will lead toward the fourth restaurant projects, and then also do not this week, but next week is the first concept quiz in the course that I’ll talk about here momentarily. That’s a big thing to keep in mind. It is part of this week’s module, but it’s actually not due until the end of next week. But I encourage you to set aside some time here in the next two weeks to get that done. So for milestone four, you’re going to create a basic graphical user interface for your project, we’re going to talk about an overall structure. And then I’m going to give you one example in the example project of how this might look. But you can really take your your user interface in a different direction as long as it has the same functionality for what we’re looking at. I highly encourage you to read the helpful hints especially in the project description, I give some hints and some sample code that you may want to use. But this is a chance for you to get creative. If you want to add additional designs or graphics or colors or whatever to your user interface, you’re more than welcome to do that. It just needs to meet the basic requirements of having the buttons and the sidebars just like we describe it. But everything else is fair game. So feel free to get creative as much as you’d prefer working on this project.
So next week is our first concept quiz in the course, these are kind of like checkpoint exams, but I really treat them more like a large quiz. They are a significant chunk of your grade, I think they’re about 5% of your grade, the syllabus would have the full percentage on there. Each concept quiz is presented as a quiz in Canvas, it has a two hour time limit. So once you start it, you have to do the whole thing in one sitting. So make sure you block out a couple hours of time to work on this. Mainly this concept quiz is all about object oriented programming theory. There are some questions about code comprehension and UML comprehension where I have you read some code, read a diagram and talk about how it would look. There are some instances where you have to write small bits of code. So make sure you have either Cody available or another IDE available. The code itself, it’s you’ll get full points if it actually compiles and works, you’ll get most of the points if the idea is there. But you may have a couple of syntax or usage errors, I’m usually pretty flexible in that as long as I can see that you’ve got the right idea in the code. We’ll do some testing on unit testing as well. So be prepared to write some unit tests. The big thing about this quiz, it is totally open book, open notes, open code, you can refer to any of the resources you have in this class, including your project code, the milestone code, the example code, so feel free to have some of that available to you as you work on this quiz. If you have any questions or concerns about the quiz, or you have any concerns specifically about the timing on the quiz, let me know and I’d be happy to work with you to make sure that this works. So that everybody has an equal chance to work on this quiz and do well.
Looking ahead from here after we build our graphical interface this week, next week, we’re going to work on event driven programming where we actually add some of the interactivity to that. Then we’re going to go into module eight, which is all about design patterns and unit test mocks, I think that’s probably the single most important thing that we’re going to learn in this class is all of the software engineering design patterns that we can use, and also how to use mock objects in our tests. So module eight is really important. Module nine, we’ll add some more features, building combos for our project, which is really important. And then after that, we’ll talk about some web API’s. And we’ll go into the last third of the class.
So hopefully, things are coming along really well this week. If you have any questions or concerns, let me know. We’re basically 1/3 of the way through the class. We’re going to shift gears a little bit and start working on user interfaces. As always, if you have any questions, let me know and otherwise I will see you again next week.
Hello, and welcome to the week seven announcements video for CC 410 in Fall 2022, this week, we’re going to switch gears a little bit and spend some time working on both parallel programming and event driven programming, a couple of different paradigms that you’ve maybe seen before, but you haven’t worked with a little bit. So this will be some really good examples that you can work through. And then we’ll apply a lot of that to our restaurant milestone where we’ll add some of the interactivity to our graphical user interface.
So in milestone five, we’re adding all the events to our GUI. When you click on buttons, it needs to be able to actually do something following event driven programming paradigms. We’re also going to refine the structure a little bit by reformatting the sidebar as a tree, which will make it a little bit easier to manage down the road. By the end of this milestone, we should have a mostly functional user interface where we can do some things, we can actually take click buttons, we can get to different places, we can save items, we’re also going to add some basic unit tests, mainly to check the sanity of our GUI forms so that when we give an item to the form, it formats it correctly. And then when we save an item from the form, the item it creates, is done correctly. It’s not a very fully functional unit tests, but it gets some of the basic ideas across. The other big thing for milestone five, please make sure you take some time to read the hints. There’s a lot of useful information in that milestone. So make sure you read the milestone carefully and get all of those nice little hints that I’ve included to help you get through it.
So one of the things we run into with this project as we start making them more complex is we run into some issues with testing. Specifically, when we’re running testing, using graphical user interfaces, it does use up a lot more memory. And you might run into trouble with Codio. having issues with that. If that happens if your Codio box locks up or anything, one of the things you can do if you’re running in Java is you can refresh the page, then go back to the terminal and do gradle –stop that will stop any Gradle daemons running in the background and it should clear out some memory. Once you’ve done that, go to the Project menu in Codio and click restart box to restart the underlying box and refresh your browser that should get you past any issues if you run into them with Java. on the Python side of things, what we’re going to do is we’re going to run our unit tests in batches. And so I give some updated talks dot ini configuration. To help with that, you will have to shift those examples from Python 3.6 to 3.9. But other than that a lot of those examples should work really well. If you do run into issues running any of these unit tests, just let me know. And I’d be help happy to help you figure those out.
So of course, looking ahead after this module, we’re going to spend some time on design patterns and combos, then we’ll bring in some information about external libraries and working through releases. And then we’ll start shifting over to web API’s and some other background as well. So keep an eye out for that. So we’re pretty close to halfway through the semester. At this point. It’s week seven out of 15 ish. It’s technically a 16 week semester, but week 16 is final. So we’re pretty much halfway through the semester. Hopefully things are going well for you. But as always, if you have any questions, let me know and I will look forward to seeing you again next week.
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.
Hello, and welcome to the week nine Announcements video for CC 410 in fall 2022. This week, you should have wrapped up a module on design patterns and test doubles as well as done an example around that. This week, all you’re going to be doing is working on restaurant milestone six, which is one of the two really big milestones in this class. So you’ve got an entire second week to work on it. Once you get that submitted, you’ll also be working on final project. So make sure you’re starting to schedule your final project three milestone as well.
So milestone six for the restaurant is very large, where we’re going to add a lot of new functionality on the back end, working with orders and combos. To do that, we’re going to explore a lot of different design patterns, such as the factory method pattern, the builder, singleton and iterator patterns. And then to test all that you’re going to write a lot of unit tests using test doubles to confirm the functionality. However, this milestone doesn’t include many GUI changes, we’re actually going to wait and add all of the combos and orders to the GUI in milestone seven, which requires a lot of GUI changes. And then we’ll finally add in the ability to do checkout as well.
So like last week, some quick tips for milestone six, I recommend starting with the orders first. So get the orders class working and get the order number singleton working. Once you get orders figured out then trying to add combos. If you did things correct in the orders with the base menu or the base item class, then the combos should work really well. That’s a lot of different work. And then you’ll need to write unit tests for these. Finally, once you get all of those working, then you can work on the panel factory. All three of these are kind of independent and unique things you can work on. And so it really works to do them separately, make sure they work completely before you move on to the next one. And then of course, don’t forget to document your code and fix your style as you go so that you don’t have to do that at the end.
So again, in this milestone, we’ll run into some testing issues due to limited memory and co do I think most everybody got this fixed on the previous milestone, but if not a quick reminder, in Java, you can stop a running Gradle daemon using Gradle dash dash stop and then restart the box and refresh the browser. And in Python, we’re just going to update our tech our tox.ini file to run tests in batches. Or of course, you can work on developing outside of Codio. Easier said than done, but I’m happy to help if you’d like to get that setup.
So once we get past this milestone and the next milestone with Checkout, then we’ll start working on working in API’s working on the web. We also talk a little bit about external libraries and releases in the next couple of weeks. I think those are really exciting as well. So hopefully milestone six goes well. Don’t forget to do basically next Monday for most of you. So hopefully this isn’t your experience on Sunday where you feel Monday crashing down on you. As always if you have any questions with this milestone, let me know and I look forward to seeing you next week.
Hello, and welcome to the week 10 Announcements video for CC 410 in fall 2022 This week and next week, you should still be working on the external libraries and releases examples. And then you also have a restaurant milestone all about checking out, which is what we’re going to talk about today.
So milestone seven, it really can be split into two parts. The first part is adding all of the GUI interfaces for dealing with combos, so you’ll be able to add buttons to your menu to add a combo to the order, you’ll also have a GUI where you can edit combos, including drop down lists, where you can add the wrap the side and a drink to the combo, you’ll also need to update some other GUI panels to make all of that work. The biggest thing you can do is reuse a lot of the stuff you’ve been using and look at the example as we’ll talk about in just a second. The second part of milestone seven is adding a library to handle checkout, I have written a custom library that simulates a cash register and a receipt printer that you’ll download and install on your project, you’ll basically be able to use cash to pay for the order or there’s a simulated credit card reader, you’ll also need to figure out how to make change out of the cash register, which is a little bit more difficult than it sounds. And then you should also print a receipt that will actually just get printed to a text file. And all of these have some limitations that you’ll have to figure out.
So for the hints for milestone seven, the first big thing for the combo GUIs is you can reuse all the existing panels, really take a look at the example project and see how we use a drop down to switch panels out in a larger window. That becomes the basis for the idea of the combo panel. However, instead of having one of those, you’ll have three of those side by side by side. So you’ll be able to switch out the wrap the side and the drink in the combo and save it that way. So really take a look at the code in the example projects and try and get that to work. The second big thing in this milestone is to deal with making change on the cash register. Making change can be kind of difficult, especially when you consider the fact that the cash register has limited amounts of each coin in it. My biggest hint for this, ignore that for now get change working without worrying about that requirement and then only try and implement that requirement. If you have taught. That’s only about five points of this milestone. So if you get it working great. If not, don’t sweat it, it’s much much harder than it looks. But I put it out there as a neat little challenge that you’ll have to deal with in real life when you’re dealing with this. The other thing that you work on is receipts. The big thing about receipts, the receipt printer can only print lines of a limited length, I believe it’s like 40 characters, so you may have to truncate some names of things. But you want to try and make your receipts easily readable so that you can see the item and all the special instructions as well as the subtotal and the total and how the item was paid for. So make sure you try and get all of that in using the receipts. For both the cash register and the receipt printer, you can use the adapter pattern where you actually make your own class, and then wrap it around my class that I wrote. And so that way, you can add your own logic to what’s going on. Instead of calling directly into those methods, you kind of get to control everything with your adapter pattern.
The other big thing I recommend doing is reading all of the source code for the library and read the unit tests for the library. The unit tests especially give you some really good hints about how to test the cash register. And it gives you some really good examples of using test doubles to be able to do that. So read my code, read my unit tests and make sure you make use of that in your own code as well. So I’ve got a couple of questions for feedback for this class. It’s been a couple of semesters since I built this class the way it is currently structured. And I’m leaning toward the idea of splitting milestones six and seven. Currently, they are big milestones that you spend two weeks on, I’m considering splitting them into four smaller milestones that you’ll spend a week on each and then maybe adjusting the point values a little bit to match. So I’m curious about that. The other things I’m thinking about doing is moving the stuff on test pattern or on design patterns and test doubles. Moving that earlier in the semester. Before we have the GUI, I kind of found the parts of milestone six seemed a little bit out of place, because we weren’t doing any GUI updates to add the order and the combo into the GUI. And so I wonder if maybe we should move those earlier to milestone four or five, and then shift all the GUI stuff a little bit later. So I’m curious about your feedback on this. If you have any input, you can use the start stop, continue survey link to send me some feedback. Let me know what you think about this. But just kind of letting you know I’m considering restructuring this class for future semesters. So any feedback you have is greatly appreciated.
So looking ahead, after we get done with milestone seven, you’re going to move toward web interfaces working with milestone eight through 11. Those milestones are going to the smaller milestones that I have promised, so you’ll have more time to work on your final project. So once you get done with milestone seven, you’ll be scheduling your next final project meeting. And this is the one where I’m really going to talk to you about the specifics of your final project and really get you started coding on it. And then you’ll have about a month or so to code on that as you work on these last few milestones in the class. The other big thing you can do in this class if you want to, you can forge ahead and get the last milestones done really quickly. They’re all posted and available for you. If you get a milestone done and you want to graded before the deadline, all you have to do is send me an email, I will basically use that email as your submission time where you can’t change it afterward. And then I will go in and grade it real quick so you can get some feedback. So if you want to just forge ahead and finish up the milestone content, and then leave the last part of the class for your final project, that’s fine too. Feel free to do that if it fits in your schedule.
So that’s all I’ve got for this week, you’ll be working with cash registers. So hopefully, you’ll be really excited to get your GUI up and running and actually have a fully fledged project where you can go from picking your order to getting it in the order of setting up your combos and finally being able to pay for the order and get your receipt. As always if you have any questions let me know and I look forward to seeing you again next week.
Hello, and welcome to the week 11 Announcements video for CC 410 in fall 2022, this week you should be working on milestone seven. And you’ll also have a short example on creating a release. Those are really the only big topics for this week, you also should be finishing up the external libraries example from last week if you haven’t done that already. But mostly this week is just getting through the checkout milestone, it’s the biggest milestone in this class really, it’s generally the most difficult one. And so hopefully, you’ve got enough time this week to spend on that and get that taken care of.
So milestone seven that you’ve been working on really comes in two parts. The first part is updating the user interface to handle combos. So you’ll have a GUI to actually edit and create the combos and you’ll need to make some updates to the other GUI handles so that they will actually work with the combos that we created in milestone six. The second part is checkout, we’re going to add a checkout feature where you’ll have an external library representing a cash register that has a receipt printer, it will be able to check out using credit card or cash. In the example I’ll show you how to use the credit card for this, but you’ll have to work on the cash part yourself with the cash part, you’ll also be making change. And then finally, you’ll be printing a receipt into a text file. So all of these things that you’ll need to do some big hints for the combo GUIs, make sure you reuse your existing panels. One of the nice thing is all of the panels that you’ve created, have a parent or a master that you can give it and so when you’re putting them inside of the combo, you just use that frame as the master instead of the parents window. It’s pretty cool. So take a look at the example project, I give you some pretty good code for how to do this.
On the checkout side, making change is hard. And so I always tell students get it to work in the initial case, don’t chase all of the edge cases first, just get it making change. If you run out of coins in the cash register in a crashes, that’s fine. Get it working first and then try and work on those edge cases if you have time. Likewise, with receipts, remember that each line can be a limited length, so you may have to add some string parsing in there to make sure that those lines are not too long. And so a great way to do this is to use the adapter pattern where you can actually write a wrapper around the cash register classes. And then you can use your functions to do all of this work and then call the functions inside of the cash register. With that adapted data. If you want to learn how to unit test all of this stuff, you can read the unit tests in the library, all of the code for that library, including the unit tests is open source, so you can take a look at it. So feel free to read some of the unit tests that I’ve written to see how you might try and unit test your adapters as well. Bear in mind, you only have to test your functionality, you do not have to test the functionality of the cash register itself, you can assume that it works.
So looking ahead after this one, once you turn in milestone seven next week, we’re going to shift gears and talk about web interfaces. The next four milestones in this class are much smaller and easier to do, they shouldn’t take a lot less time than these last two milestones have. And so the idea here is to give you more time to work on your final project. So after this week, I encourage you to get started on your final project and contact me and schedule a time to meet if you have any questions or aren’t sure where to go from here. So hopefully everything’s going well. Hopefully you get really excited the first time your project works. You can actually do a checkout with a credit card and you get a match and it works. As always if you have any questions, let me know otherwise, I will see you next week.
Hello, and welcome to the week 12 Announcements video for CC 410 in fall 2022. This week we’re switching gears from working in the traditional graphical user interfaces. And now we’re going to start working on web interfaces. So this week, you’re going to have some examples on building data driven websites using either Python or Java, you’ll go through the basics of adding a web framework into your existing project. And then you’ll basically build a milestone that shows that you can render those pages very quickly. Also, this week, you should start working on the final project. So make sure you get working on that if you haven’t already. And if you have started on working on your final project, now’s the time to keep working on it. There’s only about three weeks left in the semester, so it’s a good time to get some of that work done.
So like I said, for milestone eight, you’re going to install a web framework, you’re going to set up the routes and the controllers for your web framework. You’ll also learn a little bit about layout templates. So you’ll set out a template and a route template. And you’ll eventually make a data driven menu that shows all of the items at the restaurant all on one web page, it’s a really nice way to kind of learn Database Driven websites from the basics. But instead of using a database, we’re just going to use our object oriented classes for now. And we’ll see how that kind of merges into databases a little bit later.
Looking ahead for the rest of the semester, you’ll spend some time working on form data and filtering, you’ll also have a milestone on serialization. As I’ve been talking about this, these are smaller milestones that are meant to give you more time to work on the final project. And the last restaurant milestone itself is going to be due on finals week. So if you want, you can go ahead and work ahead, all of these milestones are already posted. So you can just work right through them and get them done. Maybe even as soon as before Thanksgiving. So you’ll have the rest of the semester to just work on your final project. And then a little bit later, we’ll talk about how you finish your final project, you’ll either record a video or present to me on Zoom, and I’ll be able to see how you did on your final project.
So now we’re at that last part of the semester where we’re moving from traditional GUIs to the World Wide Web. I hope this is really interesting and gives you some ideas of how you can actually build web apps using the coding skills that you already know. As always, if you have any questions, let me know and I will look forward to seeing you again next week.
Hello, and welcome to the week 13 Announcements video for CC 410 in Fall 2022 This week you should be working on the second of the web milestones. This one you’re going to learn about restful API’s and also about Web Forms. You’ll do an example around using form data to search through the movies collection. And then the milestone will be to create a search form for the items in the menu. As you’re working on this project this week, make sure you should be continuing to work on your final project. If you haven’t had the third project meeting with me yet, you should have done that you should also be close to doing the fourth project meeting with me, just so I can see your progress on the funnel project. At this point, hopefully you should have some code done. But if you have any questions, or you’re still not sure where you’re going on the final project, just let me know.
So like I said, the ninth milestone is all about creating web forms, you’re going to create a form for an advanced search through the menu of items on a restaurant. Then you’ll create some search filters on the menu to actually filter by keywords by price by calories, things like that. And then you’ll have to present the results on a page. Hopefully, you can reuse some of the code from your previous milestone to help present the results in a nice and orderly fashion on the page. So looking ahead, after this milestone, we’re going to spend another milestone on restful controllers to actually create custom items. And then we’ll have a last little module on serialization and some other concepts that don’t fit anywhere else in the class. As I’ve been talking, don’t forget these web milestones are meant to be smaller milestones, they should be a lot easier to complete. That should give you more time to work on the final project. And then don’t forget that the last milestone for the restaurant project is due on finals week.
So we’re at week 13. There’s really only two more weeks of the semester left after this one and then we’ll have finals week, and then we’ll be out of here. So hopefully this milestone this week is very useful to help you find exactly what you’re looking for even out there in that huge menu that we’ve gotten in the restaurant project. As always, if you have any questions, feel free to let me know and I look forward to seeing you again in a couple weeks. And I hope you all enjoy your Thanksgiving break.
Hello, and welcome to the week 14 Announcements video for CC 410 in fall 2022. This week you should be wrapping up your fourth Final Project milestone which is involved, just meeting with me and making sure that your final project is on track to be done by the end of the semester. The second concept quiz is also done due this Friday. So make sure you can set aside about three hours to work on that. The concept quiz there is mostly about design patterns and using mocks in your unit tests. And it’s really just meant to check your understanding of the higher level concepts and theories that we’re working on in this class. As always, with the concept quizzes, do your best on the code, as long as you’ve got the right idea, I’ll give you most of the points and it is completely open book, open notes, open project. So make sure you have all your code available to you. But it is time limited. So you need to work on it pretty quickly and during a single time block to make sure you get it all done.
Then next week, we’ll have the rest example and the restaurant 10 milestone which will be due next week. And then you should keep working on final project this week and next week so that you’re done with it by the end of the semester. So for milestone 10, you’ll be building a RESTful web application that allows you to add custom menu items to our list. This also reinforces some of the design patterns like the iterator pattern and the singleton pattern. It’s very similar to the movie database that we’re working in in the examples. However, instead of using movies, we’re going to add custom menu items using the item interface. And then of course, you’ll update the UML diagram to include some of these new classes and new things that you’re doing inside of the milestone itself. So for next week, we’ll have an example on serialization and form validation. And then they’ll also be a restaurant milestone that is due the Monday of finals week on validation and serialization. And then of course, you should keep working on the final project.
And then the rest of the semester, there are a couple of things due at the end of finals week. Mainly, it’s the extra as quiz for the textbook. And then there is a final project module that is due also on the 16th. So for your final project, you’ve been meeting with me throughout the the entire semester. So hopefully that’s going well.
The deliverables for your final project are to create a release tag on GitHub with your code, just like we’ve been doing, make sure you read the requirements page for your final project and that you’re meeting most or all those requirements. Your code should have documentation in it so that I can understand how it works and what it does. I really encourage either adding a readme file to your project or some user documentation so I can understand how it works. And then you will give a presentation that goes over the code of your project and gives a demo of it actually working.
The presentation itself should be around 30 minutes in length, you can either pre record a video and then submit the video on Canvas, or you can schedule a time to meet with me via zoom and present your project live. Either way, if you want to present live, you should schedule a time with me for about 30 minutes. If you choose to pre record the video, what I’d like you to do is schedule a time to meet with me for q&a. So I will watch your video, and then afterwards, I’ll have a chance to ask you some questions about your project. So if you’re presenting live, please schedule 30 minutes. If you’re just doing a q&a, please schedule 15 minutes and make sure that that scheduled after your video is recorded and submitted. And give me at least a little time to watch the video before we get to q&a. The big thing to keep in mind because I’m taking care of the computer science in your project class this semester. My finals week, Tuesday, Wednesday and Thursday are completely booked for those presentations. So I’ve got a few slots left on Friday for presentations in this class. Otherwise, it would be Monday a finals week or earlier. So you need to be aware of that, you can go ahead and schedule your times now. So if you want to grab a block on my Friday calendar and make sure that that’s available for you, I encourage you to use my Calendly link and do that right now. If you need alternate arrangements, if you need to meet in the evening, or if your schedule changes, something like that, let me know I do have a little bit of availability in a couple of evenings on finals week. So I will work with you to fit that in wherever I need to.
So for your presentation, here’s a quick suggested outline follows most common research papers, you can give an introduction for your project, a background of where you came up with this idea or any related projects you’re aware of. You’ll spend a lot of time talking about the implementation or the code of your project, you can show some slides, you can pull up your source code and walk through it either way, then you’ll give an evaluation of how well you feel like your project met your original goals. You can talk about any future work you intend to do if you want to keep working on the project. And then you should give a conclusion and a demo of your project itself.
So we’re at the end of the semester, there’s not a whole lot left. Hopefully your courage is keeping up and you’re getting everything done that you need to get done. I’ll probably be back next week with one more final Announcements video but there’s not much else to talk about except for tevals and wrap up at the end of the semester. As always, if you have any questions or concerns, let me know and I look forward to seeing you again next week.
Hello, and welcome to the week one Announcements video for CC 410 in Spring 2023, my name is Russell Feldhausen. And I’ll be your instructor this semester. My contact information is here on the slide, you can email me anytime you can also contact me, I generally work remotely, I usually am at home in Shawnee, Kansas near Kansas City. But I’m usually on campus on Mondays. So most of the time you’re working with me I’ll be remote, we can meet via zoom anytime we want. If you want to meet with me in person, you can do that usually on Mondays when I’m on campus.
So the big picture for cc 410 is all about building up your skills in object oriented programming. We’re going to spend a lot of time learning how to structure large programs, with a lot of classes and a lot of different things going on, we’re going to learn about testing specifically unit testing, we’re going to learn some design patterns that are very common in software. Then we’ll shift gears a little bit and spend some time learning about graphical user interfaces or GUIs. We’ll learn a bit about web interfaces. And we’ll spend some time on serialization and some other topics. The way this class is taught is each week or each module will have some sort of textbook section followed by a quiz, then we’ll have an interactive example. Generally the example you’ll just follow along with me, I work through the example in a video that takes about an hour or so. And then when you get done with the example we’ll have a long form restaurant project that consists of multiple milestones. And throughout the semester, we’ll build up that project one milestone at a time until we get a fully working restaurant point of sale. At the same time throughout the semester, you’ll be working on an independent final project. We’ll talk more about the final project when we meet in person a little bit later. But for right now, don’t worry too much about the final project, just be aware that there’s one out there that’s coming towards the end of the semester.
So in this class, we’re going to introduce you to a lot of new technologies you haven’t used before. First and foremost, you’ll be using Git and GitHub classroom to store all of your code. This is one of the tools that you use in professional software development. And it’s really important for you to get comfortable with it. So you’ll learn how to use Git and GitHub classroom will also use an automated build tool for Java, you’ll be using Gradle, which is one of the more common tools for Python, we’re going to use tox, which I think is a pretty good tool for Python for that. For Python, specifically, we’ll also introduce you to formal type checking in Python, it’s something you haven’t had to do a whole lot of right now, Java developers, you’re already pretty used to type checking, so you don’t have to worry about that too much. Unit testing is going to be brand new, it’s how you can write software to actually test the software that you’re writing. We’ll also spend some time talking about programming style and doing style checking, and also writing documentation comments in your code.
So like I said, the final project, you get to choose the topic for the final project, the goal is to have it aligned with your interests in some way, and use the new skills that you learned in this class to actually demonstrate that you’ve really learned how to build some software on your own. You’ll meet with me a few times throughout the semester, for the different milestone check ins via zoom, we’ll discuss the scope and I’ll kind of give you some pointers on exactly where you can go. And then at the end of the semester, you’ll deliver a presentation as part of your final project.
So this is week one week one is mostly administrivia. Just going over the basics of the class, you’ll also go through the Hello real world example where we’ll build up some of our development environment for this class. You’ll also be able to schedule the first final project meeting for either this week or next week, where we can meet one on one to discuss final project ideas. Don’t be afraid to to look at the office hours. I don’t have any formal office hours for this class, but you can schedule a one on one meeting with me using Calendly. Anytime. Since there’s only three people in this class, I think that will work out much better than trying to have a formal Office Hours period. We also have a lot of discussion platforms that you can use my primary platform for this class is discord. So you’ll have a chance to introduce yourself on Discord and say hi, you can also chat with me via email anytime. I’m also on the K State instance of Microsoft Teams. So if you use teams, you can also DM me there whatever works for you. But Discord is a great place for having whole class discussions.
After that, you’ll shift into week two, you’ll spend some time writing a class library and object oriented formatted for the restaurant project. That project is about 2000 to 2500 lines of code, which is already several times larger than the largest project you’ve probably done so far in the computational core program. A lot of it, however, is boilerplate code. So once you get one class built, you should be able to copy and reuse a lot of that code. But you have to be a little bit thoughtful about how you copy paste and be really careful and make sure that you get everything changed and updated. Because being careful now makes next week a lot easier.
The week after that on week three, you’ll spend some time learning about unit testing and documentation. You’ll add full unit tests to all of your class library, you’ll also add full documentation comments. So depending on where you’re at, that could be 3000 to 4000 additional lines of code. My model solution from a couple of semesters ago took 423 unit tests. However, a lot of those unit tests again are repeats. So you can copy paste and reuse a lot of the code and it’s a really good chance to catch errors. One reason that we’re doing projects this big is part of the point of this class is to get you used to working on large code bases. And so one of the things we have to do is have you write a large amount of code so that you learn some of those tools and techniques for how to manage large code, code bases, how to carefully copy paste how to reuse things, and how to really build stuff in an object oriented way. Then we’ll shift to week four, and five will add some inheritance and polymorphism to our class library, you’ll also develop the UML diagram to represent it. This is about 1000 lines of code, and a lot of it is just refactoring old code and simplifying the structure. In fact, sometimes you may even remove about as many lines of code as you add.
And then on week four, and five, we’ll actually have our second final project milestone where we’ll talk a bit more about what the final project will look like now that you’ve seen a few of the milestones in the class. So that takes us all the way through the end of February. After that, you’re going to learn about graphical user interfaces, libraries, web serialization, and a bunch more throughout this class.
So this semester, I’m making some big changes and some small changes to the class. The Big changes are I’m trying to split some of the larger milestones into smaller milestones. Previously, in the last couple of semesters when we got to the GUI part, I had two really large two week milestones, and I’m going to split those into four smaller one week milestones. Hopefully that helps you stay on task a little bit better. I’m also doing that to move some of the content around I’m going to try and pull the stuff on more advanced unit testing and undesigned patterns, I want to pull that forward. Before we start talking about GUIs. I’m hoping by doing so the class will be a little bit more streamlined. However, there might be some hiccups as I get everything figured out, we might have some examples that I have to rerecord things like that. So please bear in mind that I’m doing some changes in this class, but I’ll work with you to make it as painless as possible. And a lot of this will start with module six, which is the module you’ll start on at the end of February 1 of March.
There’s also some small updates behind the scenes. In Code yo, I’ve updated the stack that we’re using. So now in your load, your Codio box will be running on Ubuntu 22. With Java 11, and python 3.10. It shouldn’t really change anything. What you’ve been learning in computational core program is compatible with all of this. But it does mean that some of the versions are a little bit different than what you’re used to. This also implicates all of the examples. The examples have some hard coded stuff in there that is relative to a particular language, I’m going to go through and test and update those, but it may take me a little bit. For example, my goal today is to work on the Hello real world project. So there may be some updates that ASU for that very quickly this week as I get some of those fixed. So bear in mind, there’s some changes, I’m working through all of the code to make sure that it’s up to date.
So some advice for this class. This is a four credit hour class, which means you’re expected to work around 12 hours each week on the class. That’s four credit hours of actually in class time of watching lectures watching examples reading the textbook, plus another eight hours of working on the projects, I’ve tried to build the project milestones, so I expect any student can complete them in about eight hours. Most of the project milestones I can code through in about an hour to an hour and a half. So I figured that that gives you plenty of time to work through it. However, because it’s a four credit hour class, and it is a programming class, it might feel very heavy, it’s a bit a bit larger than classes that you’re used to. So I really encourage you to take the time now and schedule your time wisely. To help with that I’ve added a time management sheet in into the files and into the modules for this class. Basically, you can fill out a sample week for you and make sure that you’ve got 12 hours of time to devote to this class. And then on the backside, there’s a whole semester calendar that you can fill out so that you have an idea of what your due dates are, what the requirements are, you can fill that out through Week Five right now that’s already posted. And you’ll be able to fill the rest of that out as I post the rest of the modules. As far as each individual module, I really encourage you to start early and leave time for questions. Most everything in this class is due on Mondays. And so you’ll basically have all week to work on it the weekend to work on it and then you’ll have a chance on Monday to get questions answered. But if you wait until Friday to start and you get stuck very early on, you may not have time on Monday after I answer your questions to really get going. I will try and answer emails over the weekend as I can, but I don’t guarantee it always there are some times when I’m out of town over the weekend. I do guarantee email responses within one business day. So if you email me after hours on Friday, it might be Monday before I can get back to it. I will try and do better than that. But that’s what I can guarantee. Another piece of advice I can give you is to copy paste carefully. There are a lot of instances where you can either copy paste example code or copy paste your existing code and adapt it to a new class. However, you have to be very careful when you do that. Make sure you get your variables updated your class names updated. Sometimes debugging a pile of copy pasted code can be more frustrating than just rewriting it from scratch. Another tool that you can use is Git will show you how to use Git to store your code. One thing that programmers learned sometimes the hard way is to commit to get frequently anytime you have something working anytime you have a file finished, you know multiple times throughout a milestone you should be able to save and commit your code to get that way as you continue to work. on future stuff, if you break something, you just roll back to that commit, no big deal. So programmers will tell you that you should commit to get, you know, about every 30 minutes to every hour, whenever you get something working you should be committing to get. The last thing you can do in this class is used and cite online resources. There are a lot of resources out there for learning more advanced forms of code, I encourage you to go read through those. And then if you do use any code from those, you should cite those, again, the same rules apply. Don’t copy paste code, that is the point of the assignment. So if I’m asking you to write a bunch of unit tests, do not copy a whole unit test suite in there. That’s plagiarism. I don’t want to see that. But if you can’t remember how to reverse a list, or you want to know something, that’s you know, a little thing that you can find on StackOverflow go look that up, learn how to do it, and then cite the resource that you use to learn that that’s a very common thing you’ll see an industry and I want to encourage you to do it here.
So that’s really all I got, um, beyond that you can keep in touch with me via discord. If you haven’t signed up for discord already, please do you can go to discord bot.cs.ksu.edu. To register your eID with the discord system, it will match those two things up so you can get into the discord. There’s a channel there already for CC 410 that you get to post a little introduction in as part of the first assignments. Another good way to keep in touch with me is tea time office hours. We’re bringing that back this semester. So every Tuesday at 330. And every Friday at 1130 will open the Zoom Room for an hour. So it’ll be me and David Invirgo one of the CS advisors will also have some other CS faculty and staff hanging out and we encourage students to come hang out. It’s a great time to just hang out chat, get to know your fellow students ask questions about life, the universe and everything, whatever we can do to help. And then of course, you can schedule a one on one office hours with me anytime using Calendly that you can find either on the syllabus or on the homepage of Canvas. That’s all I’ve got. For this first video. I’m rooting for you. I hope things go well this semester. I look forward to meeting each of you one on one via zoom when we have our first final project meeting later this week or next week. In the meantime, feel free to get started on the coding, introduction and hello real world example. A lot of that is due either this Friday or the coming Monday. So make sure you watch those due dates. Those come up very, very quickly. If you have any questions, comments or concerns, feel free to email me anytime. And otherwise Watch this space for a new announcements video probably every Tuesday morning throughout the semester. I’ll try and be pretty good about getting those posted sometime before noon. So I look forward to working with you and I will see you all next week.
Hello, and welcome to week two of CC 410 in spring 2023. So today you should be wrapping up module one, which includes the Hello real world project. And it also includes the first final project meeting. So if you haven’t done that already, please schedule a time to meet with me via Calendly. Over the next week or so, we’ll talk a little bit about the final project in this class, it gives us a chance to get to know each other, and it opens up that line of communication as you work on your final project throughout the rest of the semester.
This week, you’ll be working on the first big module of the restaurant project, which is all about object oriented programming, you will be creating a lot of objects to represent different menu items for a fictional restaurant. You’ll also do a quick example in object oriented programming following a very similar restaurant style. It’s just a ice cream restaurant. And then the big thing you’re doing this week is the first restaurant milestone which is due next Monday. So some big updates on this class. Don’t forget there is a discord channel, you can go to discord bot.cs stockades.edu. To join it, I think I have seen an invite from everybody there. So hopefully you’re all there.
In terms of grading, you should see grading on the Hello World project later this week. But really, the grading kicks off with the restaurant project next week. There are two places you’ll see comments from you on grading, you’ll see comments on the rubric on campus on Canvas about anything that you missed. And then I’ll go through your code and leave code comments in GitHub under the feedback pull request. It’s very important to remember on the feedback pull request, I will leave the comments. You don’t have to do anything, please do not accept or resolve or close that feedback poll requests. It will continue to update as you make changes throughout the semester. And then I will go in and add additional feedback as you work on the project. So again, don’t do anything with the feedback pull request and GitHub classroom, you can leave it as it is just read through it to see those comments. And then you can work on updating them for your next project. Hopefully other than that things are going so far. So good. I’ve got a couple of questions out there. So I’m working on some updates for this class. And then I will send out an announcement once I get those figured out. But at anytime if you have questions, you can either find me on Discord or email the cc410-help email address and I’d be happy to help there.
So this week, you’re working on restaurant milestone one. This is creating a lot of packages and a lot of classes within your code. Packages are probably something new for a lot of you this semester. So make sure you pay close attention to that. Really a lot of this is just boilerplate code. It is building classes with getters and setters and a few other interactive methods that you’ll use a lot of it’s boilerplate. Things you can do to make things easier later on, you can pay attention to your coding style, and documentation. Those particular requirements are not enforced for these first couple of milestones, but they do get enforced later on. So if you want to make things easier later, you can go ahead and do the style and documentation documentation stuff that we learned in the Hello real world project and add that to your code. Now, that definitely makes the next couple of milestones a lot simpler. For this milestone, I estimate it would take about three to eight hours to code depending on how comfortable you are with this, I will tell you that I wrote the model solution in about an hour for both languages. So it’s definitely not that much code if you’re really efficient about your coding style. But if you’ve never done some of this before, it may require some reading and some different things to actually learn how to put the code together. My model solution was about 1500 to 2500 lines of code depending on how much style and documentation you add to the code as well. And as always, feedback is welcome. If there’s anything on these milestones, that is unclear, please let me know. So I can go through and edit that for future semesters.
Looking ahead to the rest of this class, the next couple of modules are going to introduce some other concepts related to object oriented programming, including documentation and testing, inheritance and polymorphism. And then we’ll talk a little bit about debugging and logging. And we’ll talk about Lambda expressions, which are also really cool. And then once we get through all of those milestones toward the end of February, you’ll have another final project milestone where you’ll check in with me, and we’ll talk a little bit more about the final project in this class. last big thing I’ve got for today is I’m working on some updates for this class, I talked briefly about this in the previous video, what I’m trying to do is pull some of the content forward a little bit, I used to introduce user interfaces, and then I would cover some more content after user interfaces. I’m going to try that backwards this year. And so this year, we’ve got two new modules module six, module seven. module six is on design patterns, which I think is a very, very important part of object oriented programming. And then on module seven, we’re going to learn about test doubles. You might know these as mocks. This allows us to write unit tests that use mock objects instead of just working with the actual objects. And so these are two modules that are not new content, but I’m restructuring it so that it’s earlier in the class, it should work really well. It also splits some of the larger restaurant milestones into smaller milestones.
So those will hit toward the end of February, early March. And that should cover most of the content between now and spring break, and then I’ll work on getting the rest of the content posted sometime later in February. I’ve got some other class updates I need to make before I get back to this class. So as always, if you have any questions or comments, let me know and I look forward to seeing you again next week.
Hello, and welcome to the week three announcements video for CC 410 in spring 2023, this week you should be wrapping up module two, which is all about object oriented programming. There was an example project that went with that and you shouldn’t be wrapping up the first restaurant milestone, we’re really setting the stage for the project that we’re going to work on throughout the rest of the semester. Hopefully, you’ve turned in the first restaurant milestone by this point. But if you haven’t, please make sure you get that done as soon as possible. I’ll be going through your code and trying to give you feedback on structure and style as best I can. So it may take me a little while to get these graded, but I’ll shoot to have them graded by the end of this week. So you can look at that as you work on the next milestone.
This week, we’re going to shift gears a little bit and work on documentation and unit testing in our code. We’ll also look at UML diagrams, you’ll do a quick example on adding documentation and unit testing to a project. And then we’ll work on the second restaurant milestone, which is all about adding unit tests to our existing code. So for the second milestone, there are about 400 ish unit tests that you’ll end up adding. You’ll also add documentation comments, and you’ll create a UML class diagram for your project. Similar to the previous milestone, this takes anywhere from three to eight hours depending on how comfortable you are with the project and how much work you’ve done ahead of time. And this project can be significantly larger, because you’re really adding 3500 to 4000 lines of text to your source code. Again, much of that can be copy pasted, much of that is repetitive either between the unit tests as well as the documentation comments. So part of the reason that I make this project so big is to really give you the chance to work on your coding process. And think about ways that you can work smarter, not harder, I really don’t encourage you to try and type out every single line of code. Instead, I want you to think about parts that you can reuse and how you can simplify this. So you can work on a big project efficiently. And then as always, feedback is welcome. If anything is unclear on the milestone, please let me know.
So some big hints for the milestone to the first and foremost thing I’d say is when writing your unit tests, do not look at your source code to figure out what the test should do. Instead, you should go back and look at the original Milestone One assessment Milestone One requirements to figure out what you shouldn’t be doing for Milestone Two. A great example of this is the price for each menu item. If you’re looking at your source code for what the price should be, your unit tests will never actually find out if your price is wrong. Instead, you should get the prices and the calories and things from the original project description and put those in your unit tests. And that is a way that you can confirm that your source code actually has the right price in it. Hopefully that makes sense. It’s kind of a thing that once you think about it, it should be pretty obvious. But I really encourage you to write your unit tests solely based on the project description and not necessarily looking at the source code.
Another thing you can do in your unit tests is you can use Global attributes for things. This allows you to copy paste code a lot easier, where instead of having the price hard coded inside the unit test, you can have it stored in a global attribute at the top of the source file so that you can then change those attributes as you rotate around. And then you can try and generalize your unit tests, I show you how to make unit tests that generalize across enums. So anytime there’s an an enumeration or a list of things that you can generalize, please try and do that in your unit tests.However, I encourage you not to try and generalize across the ingredients. Anything that is listed as an individual ingredient attributes. You can generalize those, but it requires using code reflection, and I really don’t recommend trying that. So I really just recommend generalizing anytime you have an enumeration. So look at the enumeration parameterized tests.
Here’s kind of a quick example of one way that you can generalize your tests. This is a very simple test file from a few semesters ago. But notice at the top of the file in both Java and Python, I’ve created some global attributes to store the price and the calories for each item. And then the unit test below instantiates the item and then simply checks to see that the price is the correct number. Not that it’s anything else. And so when I copy paste this, I can basically do a find and replace for the Riker and replace it with whatever item we have. And then I can replace the price and the calories at the top of the file. And I can pretty much reuse most of these unit tests for any of the entrees in this project. So hopefully that gives you an idea of what I mean when I say you can generalize your unit tests a little bit to make it easier to move code in between those files.
Looking ahead from here, in module four, we’re going to talk all about inheritance and how we can add some inheritance to this project. We’ll spend module five looking at debugging and logging and lambda expressions. And you’ll do a little bit of work there. You’ll also have the second final project milestone at the end of module five, which aligns roughly with the end of February. Then we’ll get into the two new modules this semester, which are on design patterns and test doubles. This is content that previously existed in the course but it was later after we introduced graphical user interfaces. I’m pulling that content forward, if hopefully should stand alone really well, but there might be some weird references to things you haven’t seen yet. If you come across any of those, let me know and I’ll remind you when we get to those milestones about that.
So again, hopefully this is is a really useful one this is really the first time that you’re going to be working with unit tests so hopefully find that process very simple and helping you learn how to write code that is easier for you to test and debug as we go forward as always have any if you have any questions let me know and I look forward to seeing you again next week
Hello, and welcome to the week for announcements video for cc 410 in spring 2023. This week, you should have wrapped up the module on documentation unit testing and creating UML diagrams for your project. There’s also an example and then the second restaurant milestone that’s all about adding testing and documentation to your restaurant project. Hopefully, you’ve got all of those turned in by now, and I’ll work on getting them graded later this week. But as always, if you have any questions, feel free to let me know. So this week, we’re going to dive more deeply into some object oriented programming concepts. Specifically, we’re going to talk about inheritance and polymorphism. It’s a topic you’ve learned about once before, but now we’re going to approach it from a more advanced perspective and see how we can add that into our project to make things work a little bit better. There’s an example that you’ll go through to add inheritance to your project. But there is not a restaurant milestone due this week. Instead, you’ve got two weeks to work on this milestone, because it is a little bit bigger. And it does require some thought. The one thing I will have you do this week is a start stop continuous survey, it’s a short survey that tells you basically gives you the opportunity to give me some anonymous mid semester feedback by telling me if there’s anything you’d like me to start doing anything I’m currently doing, you’d like me to stop doing, or anything that I’m doing that you’d like me to make sure I continue doing. I try and read this feedback as closely as I can. And I will let you know if I make any changes to the course based on that feedback. And then of course, since you don’t have a restaurant milestone this week, you may want to take some time to work on your final project and be thinking about ideas of things that you want to do at the end of the semester.
After this week, next week, we’ll have a module on doing some debugging and logging. We’ll talk a little bit about Lambda expressions, which are part of what we need to do for some of this. We’ll have a small example on doing debugging logging. And then next week, you’ll have your third restaurant milestone do as well as a check in for the final project. It’s due by the end of February. So for milestone three in the restaurant project, this is the first milestone where we are enforcing all general requirements. So make sure that your project passes all of the style checkers, it has all the documentation for Python and should also pass the type checkers. So make sure you have all that taken care of I will be going through your code pretty closely for milestone three, and making sure that it meets all those coding requirements. From here on out if you don’t meet those general requirements, there will be pretty significant point deductions, just like in a professional programming shop, you need to turn in code that is working is documented correctly and is styled correctly, otherwise, they won’t accept it. So make sure you work on that. The big thing you’re working on in this milestone is adding inheritance to your classes. So you’ll end up refactoring some of your code to deal with new interfaces and new parent classes. So you’ll need to work on that you’ll also update a lot of your unit tests to deal with the new structure, you may also need to update your UML diagram and make some changes there. It’s a lot of changes in your code. But really, there’s only about 1500 lines of code that you’ll actually end up touching. The rest of it carries forward pretty easily. But it does require some more advanced thought and being a little bit careful on how this milestone works. And then of course, as always, if there’s something unclear about the milestone, feedback is always welcome.
So some quick hints for working in milestone three, the biggest thing I can tell you is to try and work in very small chunks, pick one particular thing that you’re going to do and try and get that working before you work on something else. Don’t tear the whole project apart and try and make all of the changes at once. That’s really, really difficult to do. The other thing about milestone three is you have Git Git is your friends. So as soon as you get something working, commit that so that you have it. So commit early and commit often. And that way, if something doesn’t work, you can always roll back to a previous commit, instead of trying to manually undo your changes. This always trips student up students out that they break something and they don’t know how to fix it. And then they have to roll all the way back to Milestone Two and start over. So commit early and commit often as you make changes. This is also a good opportunity to try test driven development. We talked a little bit about this in the last chapter. So you can actually go through and write some of your unit tests before actually changing the code and then work on changing your code. So that meets the unit tests. It’s something you can try if you want this time. The one big thing I will tell you there is an item or an Order Item class, I can’t remember what I called it this semester. But I highly recommend inheriting that class on your base classes. So your base class for the entree, the side and the drink instead of inheriting it on each of the subclasses. So that item interface will carry through as you inherit that, so make sure you work on that. And if you have any questions on any of the syntax for anything that we’re doing, feel free to ask me questions. There is some strange syntax with some of the unit tests and lambda expressions that we’ll do. So if you have any questions or get stuck, feel free to ask me when you get to that point.
So looking ahead from here, we’re working on inheritance and debugging in the next couple of milestones. Then we’ll go to milestone six and seven, which are the two new ones for this semester on design patterns and test doubles. So be worth watching out for that. And then after those modules will go into GUIs, web API’s etc. So hopefully it doesn’t feel like everything’s on fire but I’m sure at some point when you’re working on this project it will feel like everything has come apart. Because adding inheritance after the fact is kind of tricky, but that’s why we’re doing it is we really want you to see that experience of adding it after the fact instead of coming in with that design. So hopefully you see the value in thinking about inheritance in future designs. As always, if you have any questions, let me know and I will look forward to seeing you all again next week.
Hello, and welcome to the week five Announcements video for CC 410 in spring 2023. This week you should be wrapping up the module on inheritance and polymorphism. There’s an example project there. There’s also a Start Stop continue survey that I’d like you to fill out just gives me some quick feedback in the middle of the semester. If there’s anything you’d like me to start doing, stop doing, or make sure I continue doing. And then you’ll also have some time this week to think about your final project, be looking at what we’ve done with the restaurant project so far, and make sure you’ve got an idea that fits within that framework. And then eventually here in the next couple of weeks, you’ll meet with me and we’ll talk a little bit more about final project ideas.
This week, we’re going to have a module that talks about some debugging and logging. We’ll also introduce the concept of lambda expressions, which are something kind of cool in programming you probably haven’t seen before, you’ll do a short example on adding some debugging and logging to existing code. And then we’ll have a restaurant milestone that’s due, as well as the final project milestone that you’ll need to at least schedule a time to meet with me before you can mark that as done. So as a quick reminder, for milestone three, we’re mainly just adding inheritance and refactoring all of our classes, you’ll also need to add some new unit tests. And this is the one that we start to enforce all of the general requirements. So in this milestone, make sure your code passes the style checker, the type checker has all the unit tests has good code coverage, that’s what we’re looking for. You’ll also update your UML diagram to add the associations between all the different classes. This milestone is maybe only about 1500 lines of code changed, but it takes a lot of work to get this to actually work the way you want it to. And as always, feedback is welcome. So if you have any questions or concerns on the milestone, just let me know.
So like I said, last week, the big hints for milestone three, work in small chunks, try and get one piece working like adding one class or one interface and getting all of that working, including the unit tests before you move on. Likewise, take advantage of the fact that we’re using Git and GitHub, you can commit early and commit often, anytime you get something done, you can always roll back even multiple commits to start over. But it’s much easier to do that. And then try and undo any of your code changes manually. You can also try test driven development, you can try to write some of your tests before you actually write the code to pass that test and see if that works. And then of course, I give this big hint, inherit the interface, the item interface on your base classes, not on your individual subclasses. And if you have any questions on syntax, just ask me I’d be happy to help. Looking ahead from here, we’ll start in on module six, which is the new module on design patterns and then followed by test doubles. This is content that used to be after we introduce GUIs. But I pulled it a little bit forward this semester. Hopefully that works well. And then we’ll get to module eight and nine after spring break where we deal with graphical user interfaces and event driven programming. And then we’ll get towards the end of the semester on modules 10 - 11, where we introduce web API’s and a little bit more.
So it sounds like the weather it’s going to be a little bit snowy later this week. So hopefully you enjoy that. But if you’re like Lucy here and you don’t really enjoy snow, hopefully can stay home nice and warm. Unfortunately, I’m going to be driving it a little bit because I get to be on campus later this week for our guest speaker. As always, if you have any questions, let me know and otherwise I will see you again next week.
Hello, and welcome to the week six Announcements video for CC 410 in spring 2023. This week you should be wrapping up the last modules on debugging and logging and lambda expressions. There’s an example project that was due last week. And then right now you should be working on the third restaurant milestone, a lot of which is about adding inheritance and polymorphism into our existing project. You also should be scheduling a meeting with me this week to talk about your final project either this week or next week, just so that we can see that you’re on the right track and you’re starting to get some ideas for final projects that you might want to work on in this class.
This week, we’re starting in one of our new milestones, which is the design patterns. This is content that I previously had later in the class after we introduced user interfaces, but now I’ve pulled it forward. So this week, you’ll have an example on design patterns and your work on the fourth restaurant milestone, which is about adding several new classes. You’ll also have the ability to work on the first concept quiz, which is due at the end of next week. The concept quiz we’ll talk about briefly as well.
So for the fourth milestone, we’re going to add several new classes to our project that represent different design patterns that we’re going to learn about this week, we’re going to have the order class, which allows us to keep track of an order of items, the order class is an iterable. The combo class allows us to combine different entrees sides and drinks into a single combo. We’ll also have a combo Builder class that uses the builder pattern, and will also have the order number singleton class, which uses the singleton pattern. So these classes allow us to add some really good functionality to our project. And then we’ll work on adding unit tests for those classes in the next milestone.
Also available this week is the first concept quiz in this course, you can think of the concept quiz kind of like an exam that you’ll do from home. Its take home, it’s completely open notes. open book, open code is a quiz on canvas that has a two hour time limit. So once you start working on it, you have to finish it all within that two hour time period and submit it. The quiz will go through some object oriented programming theory, it will cover some code comprehension where you read code and determine what it does, there will be a little bit of UML comprehension reading a UML diagram and understanding what it means you’ll write some small unit tests as well. So this quiz, it’s not meant to be very difficult, you shouldn’t have to study for it very much as long as you understand the concepts we’ve introduced so far in the class. And like I said, it’s open book open notes open code. So feel free to make sure you have some code in front of you available. But do please be aware of that two hour time limit? It does take away very quickly. Although thus far, I haven’t had any students really have trouble not answering all the questions within the time limit. So hopefully it works well for you. If you have any questions or concerns about this, just let me know.
So looking ahead from here, module seven, we’ll talk about test doubles, which is the unit tests that we use along with a lot of these design patterns. And then after that, we’ll switch over to turning talking about graphical user interfaces and event driven programming. And then eventually we’ll shift over and talk about web API’s as well. So hopefully things are struggling along for you this semester. We’re on Week Six right now, which means we basically have a third of the semester done. Hopefully these new modules work out well. If you have any comments or feedback on them or if something doesn’t make sense, let me know. But otherwise, best of luck and I look forward to seeing you again next week.
Hello, and welcome to the week seven Announcements video for CC 410 in spring 2023. This week you’re working on the last of the two new modules that we’re working on this one covers test doubles, also known as mocks, you’ll be doing an example project around that. And in your work, you’re working on the fifth restaurant milestone, which we’ll talk about in a minute. You should also be wrapping up the first concept quiz, which is due by the end of this week. So make sure you set aside a couple hours to work on that. Hopefully that goes well. But if you have any questions or concerns, let me know.
So for the fifth milestone, we’re adding unit tests for a lot of the new code we added with design patterns in the previous milestone. And in this milestone, we’re going to focus on using test doubles or mock objects in our unit tests. The reason we want to do this is we can focus on only testing one class, for example, we can focus on testing the order class without having to depend on individual items working correctly, so we can create mock items, add them to our order class and very carefully control how our order class actually works. This allows us to build much more powerful unit tests. And it’s a really powerful tool to understand when you’re building code, especially code that stores other classes inside of it.
Looking ahead from here, after this module, we’ll switch over to work on graphical user interfaces. So we’ll spend some time on the basics. We’ll talk about event driven programming and parallelism. We’ll also talk a little bit about external libraries, building releases, etc. And then finally, we’ll spend the last few weeks of the class working on building a web interface as well.
So we’re getting close to halfway we’re almost a spring break. Hopefully things are going well in this class. As always, if you have any questions, let me know but good luck on this new milestone. Good luck on the concept quiz. And I will see you again next week.
Hello, and welcome to the week eight announcements video for CC 410 in spring 2023, so this week, you should be wrapping up the module on test doubles and mock objects, which is one of the other new units we’ve added this semester. You also should have met with me last week probably for the final project. And then you should have completed the first concept quiz in this class, which was due late last week. So this week, we’ll be switching gears a little bit to start working on graphical user interfaces. This week, there’s a basic example of a user interface that you’ll get to work on. And then you work on the six restaurant milestone, which is all about adding a user interface to our existing project. And even though it seems like we already talked about the final project last week, by the time we get back from spring break, I’d like you to schedule another meeting with me to talk about the final project so that we can start talking about how you might add a user interface and some more advanced use unit testing to your project.
So for the sixth milestone, you’re going to create a basic user interface for this project. It’s kind of modeled after a point of sale system. So if you’re at the restaurant, it’s what the cashier uses to take your order, you’ll create the overall structure of the user interface, I will give you one example. And I encourage you to stick kind of close to that example in terms of overall structure. But feel free to get creative. If you want to change the design, the fonts, the shapes, the colors, you know, make it really interesting to you. But also make sure that you focus on usability, I would much rather have a usable interface than one that I can’t figure out even if it looks really good. But this is a place that you can use a little creativity in this class. But like I said, I encourage you to keep the overall structure of the menu panel and the sidebar. But you can really get creative as far as design beyond that.
So looking ahead after this module, the next module, we’ll do some event driven programming, which adds interactivity to our user interface. We’ll spend a couple more modules talking about things like libraries and releases and iterating on our user interface model. And then when we get toward April, we’ll spend some time on web API’s and web interfaces as well.
So it’s week eight, we’re finally at the halfway mark of the semester. Hopefully, things are going well. But be aware that we’re halfway there. So now’s the time to start thinking about some final project ideas and making sure that you’re set up for success in the second half of the semester. As always, if you have any questions, let me know. Next week is spring break. So there will be no announcements and I won’t be available a whole lot because I’m traveling to a computer science education conference, but I will watch my email as well. So please feel free to send me emails or chat on Discord and I will catch up with you as best I can. But I will see you again in a couple of weeks.
Hello, and welcome to the week nine Announcements video for CC 410 In spring 2023. This week we’re going to go through a couple of different examples. The first one is about parallel programming, which is an important concept for us to learn when working with user interfaces. We’ll also do an example around event driven programming, which allows us to make our interfaces interactive. And then finally, we’ll have another milestone for the restaurant project. This week, we’ll do milestone seven, where we’re going to add events to our user interface, we’ll refine our structure a little bit for our user interface to add a tree to keep track of our menus. But the big thing is, we’re going to add our button click handlers. By the end of this milestone we should having mostly functional user interface, we’ll still be needing to add some things. And we’re also going to add some unit tests as well. One big thing I really encourage you to do with this milestone is to read the hints very carefully, I give you some hints about structure and some code that you may want to use, both in your user interface and in the unit tests.
So one of the things you run into when we’re doing unit tests with GUIs is we need to use a lot of RAM because we’re constantly creating and destroying our GUI. This can cause issues on Codio. Because Codio boxes, by default have a very limited memory of only 512 gigabyte megabytes. So if you run into issues where something breaks, for example, Gradle will hang up or your system will run out of memory. In Java, you can open up another terminal and try and do gradle –stop to stop any running Gradle projects. Otherwise, you can go to the Project menu and Codio click restart box to restart the underlying Codio box. And then once that’s done, you can refresh your browser. For Python, we’re just going to run our tests in batches. And so you’ll see some new tox files that I include that will help you with that. But if you have any questions or any issues with testing issues, just let me know.
Looking ahead after this, we’ll have a couple more modules working with traditional user interfaces. These modules will mostly cover additional concepts like working with libraries and working with releases while we finish up our user interface itself. And then we’ll switch over to start talking about web API’s and web interfaces from there on out. So we’re over halfway we’re past spring break, which means we’re closing in on the end of the semester. Hopefully you’re enjoying this class and getting a lot out of it. As always if you have any questions, feel free to let me know and I look forward to seeing you again next week.
Hello, and welcome to the week 10 Announcements video for CC 410 in spring 2023. This week we’re going to be working on an external libraries example where we’ll talk a little bit more about how we can add code from external sources into our program. Then you work on the eighth milestone in the restaurant project where we’ll add some new features. And finally, you’ll be asked to do a Start Stop continue survey, which is just your chance to give me some quick feedback as we go through the semester. If there’s anything you’d like me to change, about how we’re approaching the course.
So for the eighth milestone, we’re going to be updating our GUI to handle orders and combos, so you’ll be updating stuff on the sidebar, so that handles orders properly as you add items to your order. And as you edit them, we’re also going to add buttons and a new panel for creating and editing combos. So there should be a button for each individual preset combo, plus a custom combo button that you can use to create a custom combo using any entree site and drink that you’d like. The panel for combo should have some basic unit testing, mainly making sure that if you give it a combo, it properly populates it. And also, if you have it properly populated, it saves the correct combo. And then finally, we’re going to implement the factory method pattern by abstracting some of our panel code into a panel factory. That will just make it a little bit easier for our button handlers to actually request the correct panel, since we have some duplicated code and a couple of places. Looking ahead for the rest of this class after this milestone, we’ll have one more on traditional user interfaces, where we talk about making a release of your project. And also we’ll add the checkout functionality to our user interface.
Then we’ll switch over to module 12. And we’ll start working on our Web UI. And we’ll have a few smaller modules around web UIs. The web milestones are about half the size of these milestones that you’re working on right now. So they should go a little bit faster and give you some more time to work on your final project. So that’s where we’re at.
Right now. We’re working on building a restaurant that serves food and keeps track of orders. So hopefully you can build a tool that Squidward would be able to use to take everybody’s order at the Krusty Krab. As always, if you have any questions, let me know otherwise, I will look forward to seeing you again next week.
Hello, and welcome to the week 11 Announcements video for CC 410 in spring 2023. My apologies for being a little bit behind this week, but I’m going to get this video out on Thursday. This week, you’re going to be looking at releases, we’re going to talk a little bit about how we can actually build a releasable version of our project. So we’ll do a quick example around that. And then we’re going to do the ninth restaurant milestone where we’re adding the features to actually check out and pay for our order.
So the ninth milestone, like I mentioned is checkout, we’re going to include an external library that represents an actual cash register, that cash register allows you to pay by cash or credit card, the credit card part is pretty easy. That’s what we do in the example project. But then if we want to pay by cash, we have to figure out how to make change. And then in either case, we also have to figure out how to print a receipt. Thankfully, the external library has functions to handle all of this. But we’ll need to figure out how to use that library and how to adapt our data and what our application is doing to actually fit the requirements of that library. So some quick hands for milestone nine. First and foremost, making change is hard. The actual calculation isn’t that bad. But when you have to take into account the limited amount of denominations in the cash register, that can be very, very difficult. One hint that a lot of people mess up is that you should only instantiate the cash register once when you start your application, not each time you make a new order. And so you’ll have to watch for that. The receipts, each line has a limited length, I think it’s 40 characters or something. So you’ll have to figure out how to truncate or limit the size of your receipts and do some text formatting. So three seats look nice.
I really recommend in either case, using the adapter pattern so that you can adapt the library and have your own wrapper around it and call those functions. And I encourage you to look at the source code for the library that I provided you it’s all open source, including the unit tests, the unit tests will give you a good idea of some things you can do to actually test your code and make it a little bit better. The other thing that will really tell you I’m making change, don’t worry about the edge cases, first, just get it making change without worrying about if you run out of pennies, or nickels or something, get that base case working and get it tested before you try and add the other cases. The other cases are not worth that many points. So don’t worry about it too much if you don’t get there. Looking ahead after this milestone, we’re going to switch gears and start talking about a web interface. The web interface milestones there’s about three or four of them, they’re going to be a lot smaller milestones about half the size of the current restaurant project milestones, and it’s meant to give you more final project time. So from here on out, we’ve got about five weeks left. Hopefully you starting to spend more time working on your final project and getting that up and running.
So hopefully everything goes well like the target lady, you get really excited every time the coupon matches of the credit card swipes properly. Hopefully things are going well in the restaurant project. I know a couple of you are a little bit behind but you’re getting caught up pretty quickly. As always, if you have any questions, let me know and I look forward to seeing you again next week.
Hello, and welcome to the week 12 Announcements video for CC 410 in spring 2023. This week, we’re going to shift gears a little bit and start working on a web graphical user interface instead of a traditional desktop user interface.
So we’re going to start working with data driven websites. Mainly, we’ll show you how to install a website framework into our existing projects and how to configure that. So we can generate a few pages using the data. Also, this week, you should start or continue working on your final project. We’re at week 12. So there’s only about three or four weeks left, so make sure you get started working on your final project and make progress on that. So the milestone for this week is pretty simple. We’re just going to install a web framework and set up routes controller for the web app part of our program. I show most of this in the examples. So you can almost just copy paste the code and tweak it a little bit into your project and follow along. But it allows us to build the framework for data driven websites. And we’ll actually use the menu classes that we’ve already built to generate the menu on the web programmatically, which is really cool.
Looking ahead after this, we’re going to spend some time on form data and filtering and serialization. This allows us to make our website a little bit more interactive and save the data for later. The web milestones are a little bit smaller than the previous ones. So the last three or four milestones in the class are going to be about half the size, they should take about half as much time. This is meant to give you more time to work on the final project, but also recognizing that we’re getting close to the end of the semester and your other classes might be getting busy as well. There is one last restaurant milestone that will be due on finals week. So just be aware of that there’s no final in this class, but there is a milestone that will be due. And then there’s also your final project that is due on finals week.
So we are getting ready to head to the World Wide Web. I hope everything works out well for you as we transition to web user interfaces. As always, if you have any questions, let me know otherwise, I will see you again next week.
Hello, and welcome to the week 13 Announcements video for CC 410 In spring 2023. This week, you should continue working on the milestones around adding a web interface to your project. This week, we’re going to deal with rest, which is a really important concept in web interfaces. And you’ll also learn how to create some forms and deal with form data. And then that all comes together to the restaurant project where you’re going to add a form where you can create a custom item and add it to your restaurants menu. This is a separate area from the rest of the menu. So don’t try and put those both in the same place, it really doesn’t work will have the normal menu and then we’ll have another page that just has the custom menu items as well.
This week, you should also continue working on the final project. Be aware that this is week 13 of 16. So there are just three weeks left in the semester. So hopefully you’re getting done with all of the work that you need for the final project. We’ll have another final project check in in a week or so. And then your final project presentation will be due on finals week. Typically, we do those on either Monday or Friday for this course. Because Tuesday, Wednesday and Thursday, I’m on campus for the computer science in your project.
So for the 11th milestone, like I talked about, we’re going to add web forms, we’re also going to add the ability to add some search filters and present the results to this as well. So make sure you’re keeping up with that. I think I misspoke earlier. I don’t think we had to customize them for another milestone. But you’re definitely going to play around with some web forms and being able to search and filter your results. So this is a really cool technique for working with websites, building these filters. So hopefully this milestone goes really well. And then, like we said, upcoming, we’re going to deal with rest controllers, we’re going to deal with serialization of data. And like I said, this is smaller milestones, it’s meant to give you more time for the final project. Each of these web milestones should be pretty simple. You’re pretty much just following along with the example and building it out a little bit.
But as always, if you have any questions, you can let me know. But we’re looking toward the end of the semester. So hopefully you’re looking forward to that we’re getting very close to the middle of May. Hopefully everything’s going well with you this semester. But if you have any questions or concerns or you just need some help with your final project, feel free to contact me anytime and I’d be happy to help. Have a good week.
Hello, and welcome to the week 14 Announcements video for CC 410 in Spring 2023, as you can see, I’ve got the green screen behind me, I’m getting ready to record some new videos for some other classes. So this week, you should be working on your fourth Final Project milestone, which is talking about ways you’re going to integrate libraries and API’s. So make sure you’re scheduling that meeting with me over the next week or so. So you can look at your final project and make sure you’re on track. Also, this week, you should be working on the second concept quiz in this class, this quiz goes a little bit more in depth into unit testing and some of the other structures that we’ve looked at and design patterns. So make sure you schedule a lot of time for that you’ve got I believe, two or three hours to work on that. So make sure you look at that and schedule that in your schedule.
The rest of this week, you’re going to be working on a rest example learning a little bit more about restful API’s and adding that to your restaurant project. And then of course, you should keep working on your final project were on week 14 of 16 in the semester, so you’ve only got a couple of weeks left. So this week, you should be working on milestone 12, which is all about building a RESTful web app, you’re going to create some menu items that are custom and added to the the system in a different way. And this helps us reinforce some of the design patterns that we’ve already seen, such as the iterator pattern and the singleton pattern. But we’re going to use that in a different way in a web application, you’re also going to spend some time updating the UML diagram, I’m mostly concerned with the new stuff. So the web stuff and the custom items, I’m not so worried about the rest of the stuff that you’ve done previously. So make sure your UML accurately reflects the structure of the web part of your project.
Next week, there’ll be another milestone on serialization. You’ll have an example on validation and serialization and a restaurant milestone on that that’s the last restaurant milestone. And again next week, you should keep working on the final project. And then for the rest of the semester. There is one extra module at the end, which is the textbooks extras module, there’s a quiz that’s due on finals week. And then your final project presentation is also due by the end of finals week, which is May 12.
So for your final project, you’ve got a few deliverables that you’ll need to turn in. First and foremost, you’ll need to make a release tag on GitHub just for everything else. Make sure you read the requirements page for the final project. So you know you meet all of the requirements for that. Your code should have some documentation and some user documentation such as a readme, so that I know what it does and how to run it. And then you’ll need to make a presentation. So the presentation should be about 30 minutes, you can either pre record the presentation or you can schedule time to present it live to me. Either way, you need to schedule a time to meet with me in person so that we can have some q&a before the end of finals week. If you’re presenting live, please schedule about 30 to 45 minutes. If you’re pre recording schedule at least 15 minutes for q&a. For the presentation. Most of these you’ll give either Monday or final Friday of finals week, Tuesday, Wednesday, Thursday, a finals week, I’m busy with other class presentations. So look at my schedule on Calendly. And go ahead and grab your time on either Monday or Friday. Again, even if you’re pre recording your presentation, you still need to schedule a time to meet with me. And it must be after your presentation is submitted. So make sure you get that done. So I have time to review your presentation. And then we’ll have some q&a live via zoom. So make sure you’re scheduling that ASAP.
For your presentation, here’s a quick suggested outline. You can also find this on the final project. Introduction is pretty self explanatory background. Tell me about why you chose this project and where the idea comes from. Talk me through the implementation of your project your code, how you use structures, design patterns, all the things we did in the class evaluation, how well does your project actually meet your original goal? Talk about future work. If you were to continue to work on this project, what would you do? Give me a quick summary and then demo, I want you to be able to demo and walk me through a lot of the major functionality of your project and probably also walked me through the code and kind of explain how you took what we did in the restaurant project and adapted it to your final project.
So we’re nearing the end of the semester. Hopefully you’re not too scared about it, but we’re getting close to the end. As always, if you have any questions, let me know otherwise, I will see you again next week.
Hello, and welcome to the week 15 Announcements video for CC 410 In spring 2023. So recently, you should have completed the second concept quiz in this class, which goes over a lot of the stuff that we’ve learned in the second half of the class, you also should have completed the rest example. And you should have completed the 12th restaurant milestone, which is about adding a RESTful API into your project itself. So next week, there are a couple of more things due there is the form validation example. And there’s a last milestone on validation and serialization. So hopefully, you can get that done pretty quickly. That’s due next week. And then by the end of finals week, which is on May 12. The only thing that’s really left to do then is the final project. So make sure you’re working on that.
For your final project. Some quick updates, don’t forget that the things you need to submit Are you need to create a release tag on GitHub for your project, just like we do for everything else. Please make sure you read the requirements page for your final project and make sure that it meets all of those requirements. Your final project should have code documentation just like everything else. So all your functions should be documented, your file should be documented all of the stuff that we expect in this class you should be doing on your final project. I also recommend creating either a readme or some sort of user documentation to explain how the project works, how to run it, how to use it. And then of course, you’ll do a presentation.
So the presentation itself should be about 30 minutes, you can either pre record your presentation, and then send me the video or you can present it live. But either way, you have to schedule a time with me to meet for q&a. So if you pre record your video, you’ll send it to me, I’ll watch the video, and then we’ll meet on Zoom to have some q&a afterwards. On finals week, I’m busy on campus may 9 10th and 11th with the senior projects for computer science. So for this class, the only two days I can do presentations, and Q and A’s are either may 8, Monday or may 12 on Friday of finals week, you can go ahead and schedule those times right now using my Calendly link. So make sure you do that. But please make sure you get on the schedule soon. And let me know if you’re going to either present live or if you’re going to send me a video beforehand. And then we’ll do some q&a During our meeting time.
For your final project presentation. Here’s a quick suggested outline that I recommend using the introduction and background are pretty self explanatory. Just tell us about your project and where the idea came from. Background. You might also include any inspiration or any related work that you’ve seen, your implementation is going through the design in the code of your project itself, you can actually switch over and show some of the code for your project. Evaluation is evaluating how well your project met the goals how well it runs. And then you’ll give some future work some things that you want to continue working on. If you could work on this project some more, you’ll give me a quick conclusion. And then you’ll demo your project. So make sure you’re prepared to run and demo your project. However you need to do that, because I’ll have you walk through it. And then we’ll go through some q&a.
Finally, the last big thing there are Tevals in this class. So make sure you’re watching for that t values should be emailed to you on finals week. And you’ll get a couple of reminders to complete them as well. Don’t forget teaching evaluations at K State are anonymous. I don’t know who submits what. And they’re also delayed. I can’t see the results of Tevals until after grades are submitted. So please make sure that you take some time to fill out Tevals and give us honest and constructive feedback, any and all feedback you have as welcome on this course. We’re constantly trying to update this course and all the other courses in the CC program and your feedback is a real key part of that. So please take some time to make sure you fill out the Tevals for this course. But other than that we’re waving the checkered flag. We are almost at the end of the semester. This is the last Announcements video I’m going to post I won’t do one on finals week, but hopefully everything’s going well. Feel free to work on getting this class finished up and I look forward to seeing your final project soon. Good luck.
This video was recorded before I decided to switch to Ed Discussion instead of Discord. So, any mentions of “Discord” in this video can be replaced with “Ed Discussion” instead. Sorry for the confusion! - Russ
Hello, and welcome to the week one Announcements video for CC 410 in fall 2023, welcome to the class. My name is Russ Feldhausen. I’ll be your instructor for the semester, my contact information is here, you’ll also find it on the syllabus, you’ll find it on the intro video that I just got done recording. If you have any questions at all, please feel free to reach out to me. anytime throughout this class, I’m happy to help. So big picture in this class, we’re going to be doing a lot of work with object oriented programming, we’re going to spend some time doing testing, we’re going to work on design patterns, these are all things that you should know how to use, if you’re going to be a good programmer out in the industry. We’re also going to introduce some new topics and things we haven’t worked with before in this program such as user interfaces, working with web interfaces and doing some serialization. And to learn all of this, we’ve got a lot of interactive examples. Almost every project in this class has about an hour long example, where I sit down and do a live coding demonstration of exactly what you’re trying to work on in a smaller scale, so that you can then follow that example to do the restaurant project. Throughout this semester, we’re going to do a project that has about 11 milestones in it that builds a point of sale interface for a fictional restaurant. And that interface will eventually include both a desktop user interface and a web user interface.
At the same time, you’ll also be thinking about a final project. And so at the end of the semester, you will do your own final project. The final project is about a third or a quarter of the scope of the restaurant project, it’s the restaurant projects is pretty good sized. Your final project will be smaller version of kind of the same idea. But it’s up to you to decide exactly what you want to do with your final project. And you’ll get some chances to meet with me throughout the semester to talk about your final project and see how things are going there. This class is also going to introduce a lot of new technologies. First and foremost, you’re going to work with Git and GitHub classroom to submit all your assignments. This is a tool that’s used a lot by professional programmers, so it’s really worth your time to get used to it now. We’ll also work with some build automation tools such as Gradle for Java and talks for Python. This helps automate a lot of the work of building and actually running your code, we’re going to introduce type checking. This is important in Python. If you haven’t done any type checking in Python before it helps you write better Python code, we’re going introduce unit testing, which is commonly used to actually test software in the real world, we’re going to enforce a coding style. And so we’re going to use a style checker to make sure all of our code matches a defined style. And we’re also going to learn how to write documentation for our code so that other developers can come in and learn how to read and write our code. So like I said, final project, you get to choose the topic, we want it to align with your interests. But we also want it to kind of follow the scope and scale of the class, it’s a chance for you to learn some new skills. And eventually at the end of the semester, you will do a presentation, I’m still kind of figuring out the presentation part, we may have you do a recorded video, or you can do a live presentation via zoom, we’ll get that figured out toward the end of the semester. This is really the first time that you get to turn yourself loose and work on a project that is of your own choosing, that meets the requirements for the class. And like I said, there’s some milestones throughout the semester that involve a short meeting with me via zoom, just we can chat about your final project and make sure that things are going well.
So this first week is mainly the administrative stuff. It just gives you a lot of background on the class, we’re also going to do a project called Hello real world, which is a redo of the classic Hello World project. But this time, it’s how you would do it in the real world. It’s got coding style, it’s got unit tests, it’s got a lot of stuff in it, that is going to be new. But it’s fun to do with a real world. So you get to see a lot of that. The other big thing I want you to do is make sure you can find the class channel on Discord and introduce yourself there, we’re going to at least use discord at first, I actually just got a license for a new software for discussion boards. And so I may switch everything from discord over to that here the first week of class, we’re still kind of figuring out exactly what we want to do with that as a department. So watch for an announcement for me soon. If I decide to make that change. Then you get into week two, you’ll spend some time working on a class library for the restaurant milestone, that class library ends up being about 2000 to 2500 lines of code. A lot of that code is boilerplate and repetitive. So the big key for week two is try and work smarter, not harder. Don’t sit there and try and type everything out by hand but build one of those classes, and then see what you can copy paste and what you have to change between the classes as you go. The next week is week three, we’ll spend some time adding unit testing and documentation to that project that balloons our project over 4000 lines of code. This has many repeats, I have a lot of unit tests, my model solution had 423 You’ll have more or less depending on how you implement them. But again, this is really training you not only how to write really complex code, but how to deduplicate code and how to work smarter and use that code to your advantage. Then we’ll spend some The time introducing inheritance and polymorphism, again refactoring some of our code. And then beyond that, we’ll spend some time talking about design patterns and serialization webs and GUIs, and all sorts of stuff throughout this class.
So, last spring, I did a big change to this course, I split a few of the larger milestones into smaller milestones, I move some content around to try and maybe organize the class a little bit better. I think it’s more streamlined. Now. There were some hiccups. I think I’ve gotten through with that all of these changes start at module six, I’m going to leave it the same way this semester. But if you notice a dip in quality after module six, that’s probably because I reorganized stuff. And I still haven’t found all the bugs yet. So please bear with me, if you do find bugs, submit them. To me, there’s that bug bounty extra credit assignment that you can get points for. So don’t be afraid to use that. There’s also been some small updates, I updated the Codio stack behind the scenes. So we’ve got the latest versions of Ubuntu, Java and Python. We’re using Java 11, which I recognize is an older version, but it’s a very compatible version. Right now we’re using python three point 10, which is a well supported version of Python. I’ve been going through and updating most of the examples, you’ll notice a lot of my examples, use Java eight, and Python 3.6, the concepts are all the same, you may just have to translate a little bit of code or change a couple of commands to match everything that’s going on. But I’m probably not going to rerecord those example videos right now. So you just have to mentally keep in your mind what version of things you’re working with.
So some big advice for this class. This is a four credit hour college class four credit hours means we expect 12 hours each week, in a normal college class you would spend for those hours in class listening to lectures. So definitely try and budget your time in this class to make sure that you have at least 12 hours each week, I really encourage you to schedule your time wisely and take advantage of it. Now. Block out some big blocks of time in your schedule to make sure you have time to work on this class. Like every other programming class, you should start your projects very, very early. Work on them for several days, that leaves you time to ask for questions. The number one reason that students struggle in this class is if an assignment is due on on Monday, and you start working on it on Saturday, you’re going to have a bad time. It’s really, really hard to do these assignments on a weekend. And then you come back on Monday. And you’re waiting for me to answer a question. And I might be in meetings all day Monday, and it just doesn’t work out. So start early. Leave yourself time to ask questions and get help. Don’t be afraid to ask questions and get feedback. Just like any other programming course, I don’t expect you to learn everything just by reading it. So feel free to ask questions, quiz me on things that you want to know more about, ask for more resources, use me as a really good resource to help you learn the content. Another big thing is this class, you definitely are allowed to copy paste code between files, you can totally do that. However, please do so carefully. A lot of students have broken their code by copy pasting entire files and not carefully making the changes they need. I’m not going to be your debugger necessarily. So please be careful when you copy paste stuff. Don’t forget to commit to get frequently one of the things that you can do. If you have one of those copy paste errors. If you’ve been committing to get frequently like you should be, you can just roll back to a previous commit and try again. Generally, anytime you get something working, you get done with a topic or anything like that, commit and push to get so that you’ve got it. Good students in this class, I’ll see 10 or 15 commits per project. students that struggle in this class, I’ll see one to two commits per in Git. So it’s really worth your time to take the time and commit to get the last big thing in this class, you can use online resources. However, I really encourage you to stay away from tools like GPT, not because they aren’t good, but because they can do so much of the heavy lifting for you in this class. And then you don’t actually learn the content well enough. It’s one of the things that it will help you get a good grade now. And it will make it harder for you to be successful in the workforce later on. I’d really really much rather you take the time now to learn it well, so that when you get into the workforce, you understand what you’re actually doing. I have gone through check GPT, you can totally do the first projects in this class and check GPT had got about an 85% on it. So it’s totally possible. Please don’t do that. It’s really worth your time to take the time and learn how to do this yourself so that you’ll be a good programmer out there.
So that’s really all I got for this first week. future weeks the Announcements video will probably be a little bit shorter, but I wanted to go through a lot of stuff this time informally. If you have any questions keep in touch with me. We’ve got discussions on Discord. I’ll be watching for your introduction posts there. I host Tea Time office hours, which are on campus Mondays at 11 o’clock. They’ll also be available on Zoom. You’ll see information about that coming up shortly. And then of course, you can always schedule a one on one office hours with me using my Calendly link. I’m more than happy to meet with you during the week via zoom and chat with you if you have any questions. You’ll also have a few checkpoints for your final project. So you’ll meet with me at least four or five times throughout the semester for that. So hopefully everything goes well. I’m rooting for you. I hopefully this is a really good semester for Are you if you have any questions or concerns or anything let me know otherwise best of luck in this first week of class and I will see you again next week
Hello and welcome to the week two announcements video for CC 410 in Fall 2023. You’ll see me in these videos about once a week. They’re a little bit more informal. You’ll notice I don’t put up my background or anything, but it’s a chance for me to talk through some things that I would normally say if we were in class at the beginning of class. So this week you should be wrapping up the first module, which is Hello Real World Project and getting that submitted. You should also have by now scheduled a final project meeting with me, just that we can discuss the final project in this class. If you haven’t done that already, please find my calendar link and schedule a time to chat with me sometime this week. This is just a chance for us to meet each other and talk a little bit about the class and the upcoming final project. This week you’re going to get started on the first restaurant milestone, which covers object oriented programming. We’re going to reintroduce a lot of those concepts that you’ve probably seen before in previous courses. We’re going to go a little bit bigger. We’re going to make a lot of different classes and some different packages, and we’re going to make that all work together to represent the menu at a restaurant. So hopefully this is a really useful milestone.
Some updates in this class. Don’t forget, if you have questions, you can always use the Ed discussion board. I can respond there pretty quickly. You can also email me at the CC 410 help email address. So in this course, as I’ve talked with a lot of you in person, I’ve mentioned that grading is done in person or it’s done manually. It’s not done in person, but it’s done directly by me. The rubric itself, you’ll find those on Canvas, but I usually go in and leave code comments in GitHub as part of the GitHub pull requests. Every time I leave those code comments, I believe you’ll get an email from GitHub telling you to go find those. But usually in the Canvas link, I will put the first link in there, so hopefully you can find my comments and feedback. If not, if you have any questions, let me know. Other than that, I think things are going well so far this semester. Everything seems to have started off without any major issues, so hopefully we keep going well. So for the first milestone, it’s a lot of packages and classes like I talked about. It’s a lot of bDoilerplate code. There are several entree classes, there are several side classes and drink classes. They’re very similar in structure, but they have slightly different variables and slightly different values. So one thing you can do is usually write one of them really well and then copy paste a lot of that code into the others.
So other things that you can think about is if you want to make things easier later, you can already start thinking about coding style and adding your documentation comments. Those are not required until the next couple of milestones, but if you add them now, it makes things easier down the road. I estimate this milestone would take anywhere from three to 8 hours to complete. It really depends on your background and the way that you work and the way you code for reference. When I did the model solutions for these milestones, I did each one in about an hour. But I have a lot of experience and I know exactly where I’m going with this. So I estimate for most students, three to 8 hours should be about right. The end product is about 1500 to 2500 lines of code, depending on how much style and documentation work you do. And then of course, with all these milestones, feedback is welcome. If there’s something that’s not clear or well explained in the milestone, please let me know. I reserve the right to tell you that that’s how it’s meant to be, that sometimes I leave things a little vague on purpose, but I can also go in and make changes very easily if anything’s unclear, so let me know.
Looking Ahead after this module, the next module will cover some things about documentation and testing. Then we’ll spend some time on inheritance and polymorphism, a really interesting topic. The module after that is on debugging logging and lambda expressions. And that gets us to the end of September where we’ll have our second final project meeting. And then from there I have reworked some of the modules from last semester. So we’ll talk about design patterns and test doubles in modules six and seven. So that’s really all I’ve got for today. I hope everything’s going well as always. If you have any questions, you can find me on the Ed discussion board or via email at CC 410 help. Don’t be afraid to schedule meetings with me on calendar if you want to meet one on one. Otherwise, best of luck this week and I will see you again next week.
Hello and welcome to the Announcements video for CC 410 in Fall 2023 on week three. So this week you should be wrapping up the second module, which is the first restaurant milestone, which is on object oriented programming. There’s a short example that you should do working with the short Little Sunday Shop. That’s kind of fun. Don’t forget on that one, you need to actually create the second class yourself. It’s not covered in the video, so make sure you get that done. And then the first restaurant milestone should be due, so hopefully you’re getting that done as well. Also, if you haven’t scheduled the first meeting for the final project, make sure you do that this week. You definitely want to meet with me on Zoom so we can chat about the final project and make sure everything’s set up there. So if you haven’t done that, please make sure you do that.
This week. We’re going to have a module talking about documentation, introducing the concepts of unit testing, and talking a little bit about UML diagrams. There’s an example project that talks about documentation and unit testing. And then you’ll do the second restaurant milestone, which is all about including unit tests in your project. So for the second milestone, you should be adding about 400 unit tests to the project. Your number may vary depending on the size of your project and how you do it. You should also be adding documentation comments to your project and creating a UML class diagram. My estimation is this should take anywhere from three to 8 hours to do, depending on your background, and this may involve anywhere from 3500 to 4000 lines of code. However, a lot of those lines of code are unit tests and documentation comments. A lot of that is repetitive code that you can copy, paste and then tweak between the different classes. So don’t try and focus on writing all of this from scratch. Write the parts that you need and then copy paste it and build out the classes. The you should you’re really trying to focus on working smarter, not harder here, because it would take forever to write all this out by hand. So hopefully the milestone makes sense. I give you some tips on various unit tests you might want to include. And as always, feedback is welcome if there’s something unclear in any of the milestones. It.
Some other big hints for this milestone. First and foremost, I encourage you not to look at your source code. What I mean by that is when you’re writing your unit tests, for example, you’ll have a unit test that checks the price of various items on the menu. Don’t look at your source code to figure out what that price is. Look back at the original menu from milestone one. If you have a typo in the price in your source code, you’re going to have that same typo in your unit tests and you’re not actually they’re going to check anything. And so when you’re writing your unit tests, you should go back and look at the actual menu and not your source code. When you write your unit tests, another thing you can do is use global attributes, especially in the unit tests. For example, the unit test to check the price is the same in every class. But at the top you could have a global variable that says this is the price for this class, or this is the price for small, this is the price for medium. And then you can use those global attributes elsewhere there. That way it makes it easy. You can just copy paste all the source code, change those global attributes, and it will run the unit tests. You can also generalize things. There are some unit tests that you can use that are parameterized, but you cannot generalize the ingredients in the entrees. So, for example, on one of the entrees that has ham and cheese as separate ingredients, it’s really hard to generalize that. There are some things you can do with code reflection. I don’t recommend trying to do it, it’s really complex. But things like the toppings and things like some of the sizes, you can use parameterized tests for that. And so this slide gives you kind of an example of what I mean by generalizing your tests. For example, this is a test that checks the price and the calories for an item. These are not correct. This is from an old project, but it gives you the idea of having these global price and calories variables. And then you’ll notice the code below. Really the only thing you have to changes the name of the object and everything else goes really well. So this is generalized. You could copy paste this, do a quick find and replace it’s pretty quick.
So beyond that, after this week we’ll talk a little bit about inheritance. Next week we’re going to refactor some of our code to take advantage of inheritance. We’ll spend some time talking about debugging. And that gets us to the end of September, where you’ll have your next check in on the final project. And then as we go into October, we’ll spend some time on design patterns, test doubles, and then we’ll switch over and talk about user interfaces, web and et cetera. So this project is all about testing, so hopefully you’re able to write lots of good unit tests for your project. If you have any questions, comments or concerns, feel free to let me know. Otherwise, good luck this week and I will talk to you all again next week.
Hello, and welcome to the week for announcements video for CC410 in fall 2023. This week you should be wrapping up the second restaurant milestone, which is all on documentation testing in UML. You’ll be adding documentation and testing to your code, so this is a lot of code to add to the restaurant project, and it’s really the first time you get to work with unit tests. Hopefully you’re able to figure that out and get that working, but if not, let me know. And so you should be turning in the second restaurant milestone pretty soon, and I’ll work on getting those graded later this week, but hopefully that module goes well, and you’ll be able to move on to the next stuff.
This week we’re going back to some of the concepts in object -oriented programming. We’re going to spend some time talking about inheritance and polymorphism, which is a topic you’ve seen before, but we’re going to go at it a little bit different in this class, coming at it from more of a theory perspective of why we do this. You’ll have an example of how we use inheritance and code, and then you’ll have some time to work on the final project as well as fill out a start, stop, and continue survey. Really briefly on the start, stop, continue survey, what that is is it’s a very quick survey that I ask throughout the semester in a basically last three questions. It asks you if there’s anything you want me to start doing that I’m not doing, if there’s anything you want me to stop doing that I’m currently doing, and if there’s anything you want me to continue doing if I’m currently doing it. It’s completely anonymous. It’s kind of meant to be a mid -semester T -val, but at this point it’s a good chance to check in and see if there’s anything I can do differently or anything I should make sure I keep doing for you. So feel free to fill out that survey if you have any comments or feedback on the way this class is going.
So next week we’re going to add some additional new content. We’ll talk about debugging, logging, and Lambda expressions, and you’ll do an example around that, and this is where the third restaurant milestone is. So this is one of the couple of times in this class where I actually give you two weeks to work on a restaurant milestone just because it’s new and it’s different content, and so I really want you to take some time over the next couple of weeks to go through that restaurant project. Don’t save it until the last minute. Please take a look at the restaurant milestone as soon as you get there so that you know where you’re going. Also by the end of next week I want you to schedule the second final project meeting. This is a chance for us to check in. chat a little bit more about your final project ideas, see kind of where you’re going, and if you need any help or assistance getting started on that.
So, like I said, milestone three is gonna be doing two weeks. This is the first milestone where I’m enforcing all of the general requirements. So your milestone must pass the style checker, the type checker, it must have documentation comments for everything, it must have unit tests for everything. So it’s a really big milestone. You’re going to add some inheritance and refactor some of your existing classes. So we’re gonna take everything apart and kind of put it back together in different ways. You’re gonna have to add some new unit tests to enforce that. You’re also going to be updating your UML diagram. And so overall, I think milestone three, you really end up touching only about 1500 lines of code. So it’s less lines of code than the previous milestones, but it’s much more complex because you have to be pretty selective about the lines of code that you’re updating. And then of course, as always, feedback is welcome on these milestones if anything doesn’t make sense.
So some quick hints for milestone three. First and foremost, really try and work in small chunks. One of the things I see a lot of students do on this milestone is they take apart their entire project and try and do all of the inheritance refactoring in one shot. And that can work, but if you break something, it’s really hard to tell exactly what you broke. So try and work in small chunks. Try and do inheritance for the entrees first. Try and do inheritance for the drinks first, something like that. As you’re working, anytime you get something working, commit to get. So commit early, commit often. That way, if you do make a mistake, you can roll back to a previous commit instead of trying to figure out how to undo what you did. This is also a good chance where you can try test driven development. Now that you know how to write unit tests, you can actually try and write your unit tests and then write your code to match the unit test. It’s kind of an interesting concept. One big hint that’s not clear in the milestone itself is that order item class that you’re going to make. I think I call it item or order item this semester. You’ll want to inherit that on your base classes. You’re going to make a new base class for drinks side and entrees. That’s where you want to inherit the order item. If you try and inherit order item on the actual entrees themselves, like the Riker or the Picard, it gets a little complex. You really want that hierarchical inheritance, so make sure you do that. Then, of course, if you have any questions on syntax, let me know. We’re doing some new things in both Python and Java, so you may not have seen all of this syntax before. If you have any questions, just let me know and I’d be happy to help.
Finally, after this looking ahead, we’re talking about inheritance in this module. Then we’ll talk about debugging. We’ll have some time for design patterns and test doubles going forward. Hopefully, everything’s not on fire, but sometimes that’s how this module can feel. Do the best you can to take your module apart and refactor it and make sure that you keep things under control. As always, if you have any questions, let me know and I will see you again next week.
Hello and welcome to the week five announcements video for CC410 in fall 2023. This week you should be wrapping up a module on inheritance and polymorphism and there’s also an example on inheritance that’s really fun. Also this week you’ll be asked to complete the start -stop -continue survey. I talked about that a bit last week. It’s a short survey that’s kind of an informal T -val in the middle of the semester giving me some advice on things I should either start doing, stop doing, or make sure I continue doing. And hopefully this week you have a little time to start thinking about final project topics and things that you might want to look at and we’ll actually have our final project milestone do in the next couple weeks.
So this week we’re going to have another quick module of content that talks about some concepts around debugging and logging in our code. We’ll also look at Lambda expressions which are very important to use in certain situations. You’ll do a quick example on debugging and logging and then this week you’ll have your third restaurant milestone and the second final project milestone do as well. So in my last video I talked a little bit about milestone three. This is the first milestone where all general requirements are enforced so your code needs to match the style checker, the type checker, it needs to have all documentation in it. So make sure you get that taken care of. You should be adding inheritance to your code by refactoring a lot of the previous classes to add those base classes. You’ll also need to add some new unit test to account for that and update your UML diagram. I’ll told this module is only about 1500 lines of code so it’s less than the previous milestones but it does require a lot of careful work to make sure that you don’t break anything and that things keep working and as always feedback is welcome.
So for milestone three like I said last week biggest hint is to work in small chunks. Try and pick one thing like building the entree base class, take care of that, get that working, then move on to the other parts, work on your milestones a little bit at a time. Don’t be afraid to commit early and commit often to get. That way if you break something you can roll back to that previous commit instead of trying to undo what you did. This is also a good opportunity to try test driven development. You can write some of your unit tests before you actually write your code and then update your code to pass the tests. The big hint that I always give is to inherit the order item or the item class on your base classes. So you’ll have a new base entree class. It should inherit the order item interface. That’s the easiest way to do this. And then of course you can ask me questions on syntax anytime. So looking ahead after this module, the next couple of milestones, we’ll talk about design patterns and test doubles, which I think are really big takeaways from this class that will be very interesting. And then we’ll shift modules and talk a little bit more about graphical user interfaces, event -driven programming and things like that.
So hopefully as you work on this milestone, you don’t find it too frustrating, but hopefully it works out really well. I think this is a really good exercise to go through and refactor some of your previous code, but of course you might find it a little bit frustrating to work on. So hopefully it’s not too bad. But as always, if you have any questions, let me know and I will see you again next week.
Hello and welcome to the week six announcements video for CC410 in fall 2023. So this week you should be wrapping up the example on debugging and logging and also an example around Lambda Expressions. You’ll be working on the third restaurant milestone, which is quite a big one where we add some inheritance and polymorphism in your project. And you should also now be following all of the guidelines regarding style checking, unit testing, type checking, all of that. You should also be scheduling your second final project meeting with me. So if you haven’t done that already, please make sure you take care of that.
And then this week we’re going to switch gears and we’re going to spend some time talking about design patterns. If I had to say the biggest takeaway I want you to get from this course is probably working with design patterns. So we’re going to have a restaurant milestone that introduces some design patterns into the project itself. And then also this week you’ll have access to the first concept quiz in this course. So for the milestone, like we said, we’re going to add a couple of design patterns, namely around the order class and the combo class. We’re also going to add a combo builder and an order number singleton class to explore some other design patterns. And for a lot of these classes, we’re going to build them in this milestone and then we’ll add unit tests for these classes in the next milestone to kind of break that up a little bit.
So also coming up, you’ve got the first concept quiz in this class. This is kind of like an exam, but it’s meant to be a little bit lower stakes than an actual written paper exam, but it’s kind of the same idea. What I want to do is I want to check your understanding of some of the key concepts in this course. So for this concept quiz, it’s a quiz on canvas. You’ve got a two hour time limit. So once you start it, you need to be prepared to finish it within two hours. You can’t take a break and come back. So make sure you have a two hour time block to work on this. This concept quiz covers some basics of object oriented programming theory. It talks a little bit about code comprehension where I ask you to read some code and explain it. We have some UML diagrams that ask you to look at. It has you do a little bit with unit testing. The concept quiz is open book, open notes, open code. There are a couple of brief coding examples at the end that I’ll ask you to complete, so kind of be prepared for that. Please, please use books, notes, codes. Do not go to chat GPT and put in the questions and get the answers. This is really meant for me to understand your knowledge of the concepts in this course and if there are any weaknesses that we need to address later on. So please do the best you can, but please complete this honestly, following TasteAid’s honor code. Please don’t use any outside resources other than your notes, the book, and the code used in this class.
So looking ahead after that, we’ve got our module on test doubles, then we’ve got a module on introducing graphical user interface basics and event driven programming. So we’ve got some cool stuff coming up ahead in this course. So hopefully everything is strumming along so far. Hopefully things are going well for you, but if you have any questions or you’re falling behind, please feel free to let me know. Hopefully things go well, otherwise I will see you again next week.
Hello and welcome to the Week 8 announcements video for CC410 in Fall 2023. My apologies for missing last week’s video. I was on the road three days last week and I just didn’t get a chance to get the announcements done before it was too late for them to be relevant. But I’ll try and catch you up this week. So right now you should be wrapping up the module on Test Doubles, which is a really important concept in this class that allows you to do unit testing on classes that you’ve already written. You can just mock those up and use those elsewhere. You should also have scheduled your second final project milestone. If you haven’t done that already, please do that as soon as possible. And you should have also completed the first concept quiz. Hopefully that was a good review of some of the concepts we’ve covered, some of the techniques that you’ve learned. And I’ll go through and try and get those graded yet this week so you can get some feedback on that.
This week we’re going to shift gears and we’re going to start working on graphical user interfaces or GUIs. So this week the first example is really just building the basics of a user interface. So that leads to the restaurant milestone. And then we’ll also have a final project milestone that’s coming up in the next week or so. So watch out for that. So a quick note, I do have a couple more sets of upcoming travel this week and next week. Basically I’ll be gone Thursday through Sunday for the next two weeks. I’ve got a couple of events coming up. So I will be out of the office off and on. That just means that responses and grading may be delayed. So if you reach out to me Thursday or Friday this week or next week, it might be Monday or Tuesday before I get a chance to get caught up. If this causes any problems with deadlines and things, I will adjust deadlines and work with you to make sure it’s fair. But just be aware that my response times may be a little slow due to some upcoming travel this week and next week.
So on the sixth milestone, like I said, you’re going to create the basics of a user interface for this program. Remember we’re building a point of sale system for a restaurant. So this would be the cash register interface basically. For this one, we’ll create the overall GUI structure. I’m going to give you one example that you can follow, but you can actually build this however you want as long as it makes sense and meets the requirements. So feel free to get a little creative with this milestone. If you want to try and do something a little different, that’s totally fine. Looking ahead after this milestone, we’ll have some stuff on event driven programming, external libraries, creating releases, things like that. And then the last part of the class, we’ll get into some web stuff as well. So it’s week eight. We’re finally at the halfway mark getting through the semester. Hopefully everything’s going well for you so far. As always, if you have any questions, let me know. Otherwise, I will record another one of these next week.
Hello and welcome to the week 12 announcements video for CC410 in fall 2023. As you can tell, I’ve been a little bit under the weather, so apologize for the voice. But hopefully we can get through this pretty quickly. This week you should be working on learning about releases. We’ll do a quick example on actually creating a release out of a project that we’ve created so far. And then in the restaurant milestone, you’ll start working on an external library where we’re adding features to actually do the checkout process at the restaurant. It’s really cool. So milestone nine is all about adding a checkout. You’re going to work with an external library that I’ve written that simulates a cash register and a receipt printer. You’ll be able to check out using cash or credit card. You’re going to write the algorithm for making change and being able to pop up how much change to give. And you’re going to print a nice friendly receipt for the customer as well.
So milestone nine, there’s a few hints. First big hint is making changes hard, especially because the cash drawer has a limited amount of each denomination in it. In general, don’t worry about that right now. Write the basic making change algorithm. If it crashes after a few times, that’s fine. Only try and build in the part where you can make substitutions for different denominations if you have time. For example, if the cash drawer runs out of pennies and you need to turn a nickel into five pennies, you can do that. But be careful. It’s really, really tricky. So don’t worry about that. It’s not worth many points. But if you want to attempt that, you can likewise with the receipts. Remember, the receipts have a limited length of the line. So each line can only be a certain number of characters. So make sure you read the instructions for that and figure out the best way to represent your receipt.
I really recommend using the adapter pattern for this. You can go back and look at the module on design patterns. So you can take the register library and then you can either wrap it in an adapter class or you can extend it. Either one of those works. I really like wrapping it in a wrapper class. That makes it really easy. And then you can also read the unit tests that I wrote for the library. All of the code is open source. You can find the code for the receipt, the restaurant register library out on GitHub. It’s out there. You can see how I wrote my unit tests. That might be really helpful for you to understand how to interact with this library. you So looking ahead after this module the next one we’re going to switch gears and we’ll start working on web interfaces That’s the start of a bunch of smaller milestones, which gives you more final project time I apologize. There are two milestones that are due right after Thanksgiving It’s just because I left the gap in the schedule and I missed it until we got there But it shouldn’t be a problem those milestones are very quick and easy to get through So hopefully everything works. Hopefully when you’re scanning your credit card you get excited that it’s a match If you have any questions or concerns, let me know otherwise best of luck this week And hopefully you can get through the next couple weeks and make it to Thanksgiving. Good luck
Hello and welcome to the week one announcements video for CC410 in spring 2024. My name is Russ Feldhausen. I’ll be your instructor for this semester. My contact information can be found here. It’s easiest to get a hold of me by emailing me at russfeld AT ksu DOT edu. There’s also my website. I’m on the Discord server. I’m pretty easy to get a hold of, so feel free to reach out to me anytime you have questions.
In this class, the big picture is we’re going to take everything that you’ve learned about programming and we’re going to go bigger. We’re going to introduce you to things that you’re going to see out there in the real world, in industry, some of the bigger, more technical things that you’re going to do in programming. For example, we’re going to spend some time talking about object -oriented programming fundamentals, but this time we’re going to look at them from a much bigger, broader picture of how we use that to build complicated software. We’re going to talk about writing unit tests and how do we actually develop tests for our software to make sure it works correctly. We’re going to talk about design patterns, how we can use commonly accepted solutions for common problems in programming to make our code easier to read and understand for anybody. Then we’re going to switch and add some new content, talking about graphical user interfaces or GUIs. We’ll talk about web interfaces, things like serialization. To do that, we’re going to go through a lot of example projects where I’m going to kind of walk you through a coded example. Usually those videos are about an hour long or so, but you really get to see me going through all the examples of how you would do this in the small scale, and then you’re going to implement it in the larger scale using a restaurant project. We’re going to go through a project that basically builds a point of sale system for a fictional restaurant, and we’re going to do about 11 different milestones on that project. Throughout the semester, you’re going to build this large -scale programming project that lets you put all of these things into practice. Then finally, toward the end of the semester, you’re also going to do a self -directed final project. It will be similar in structure to the restaurant project, but about one fourth of the actual scale.
To do this, in this class, we’re going to introduce a lot of new technologies. First and foremost, we’re going to introduce you to Git, which is a version control system for code. We’re also going to use GitHub Classroom to manage some of our assignments and how you’re going to submit that code. We’re going to use some automation tools, such as Gradle and TOX, to make building, compiling, and running our programs a lot easier, as well as automatically running things like type checking and unit testing. In Python specifically, we’re going to introduce type checking, which is something that is part of Java as the compiler step, but in Python, it’s something you haven’t seen before. We’re going to introduce unit testing, we’re going to introduce a coding style and a style checker to enforce that, and then we’re also going to introduce documentation for our code and how we can build that documentation automatically and make that available at the end. So in this course, there will be a final project that you’ll work on. You get to choose the topic, and we want it to align with your interests in the class. But we once should also be able to use your new skills. And so you’ll get to pick a final project, you’ll work with me to discuss the scope. There are four milestones for your final project. The first one is actually about the second or third week of class. And those milestones are basically opportunities for you to meet with me to talk about the class, your final project, anything that’s going on. And then at the end of the semester, you’ll give a presentation. Typically I do those as just one -on -one presentations, but sometimes we might try and actually set it up where you can present as a group to the class.
So this first week of the class is mostly just administrative stuff, but we also go through a project called the Hello, Real World Project. Hello, Real World is basically redoing the classic Hello, World Project, but in the style of how we’re going to do the rest of the stuff in this course. So it lets you get used to the development environment and some of the tools you’re going to be using. It’s all very hands -on, it’s just the video that you watch and go through on your own. You’ll also want to schedule your first final project meeting either this week or next week. And you’ll learn about things like the office hours, communication platforms, and you’re going to do a quick introduction to yourself on the Ed discussion platform, so that we can get to know a little bit about each other and who you are.
For the second week in this course, we’re going to build an object -oriented class library for our restaurant project. This is probably the larger milestone that you’re going to do throughout the semester. It’s about 2 ,000 to 2 ,500 lines of code, but a lot of it is mostly boilerplate code. So you can be kind of thoughtful about how you approach this project. And if you get one file working, you may be able to copy -paste a lot of that code into multiple files and slightly adapt it to make it easier to work with. Then in week three, we’re going to switch over and do some unit testing and documentation of that code. This is a very large milestone where it’s about 3 ,500 to 4 ,000 lines of code. And at least in my model solution, I had 423 unit tests, but many of them are repeats. You may have more or less, depending on how you approach your unit testing. But the whole goal of this milestone is to catch errors in your second week milestone to make sure that all of your code is correct before we move on.
Then in weeks four and five, we’re going to introduce inherited code. and polymorphism and add some more object -oriented structure to our code. A lot of this is refactoring our existing code, so there’s only about a thousand new lines of code, but it really simplifies our project structure, and I think it really highlights the importance of following the object -oriented programming paradigm instead of just going ahead with what we think might actually be the best structure. Then beyond that, we’ll introduce things such as design patterns, user interfaces, libraries, web, etc. In this class, I made some big changes about a year ago. I split some of the larger milestones. I moved some content around. I think it’s a lot more streamlined now. I think we’ve gotten through most of the hiccups. A lot of these changes start with module 6, so if you notice kind of a change in structure or scope at module 6, that’s what’s happening. There’s also some small updates. I made some updates last fall that seem to be carrying through OK. Most of these are just technical updates, so you don’t really have to worry about those.
My best advice for this class is that this is a four credit hour course, which means that it expects about 12 or more hours each week of your time. This is across doing the readings, doing the example projects, doing the milestones, working on your final project, etc. Most students who succeeded this course do spend about 12 hours per week on it. We can track that through CodeO and some of the other tools that we use. So I really encourage you to take some time now to schedule your time wisely throughout the semester. There is a time management guide that I’ve added to this course that you can fill out. So schedule your time, make sure you have at least 12 hours per week set aside for this course. And then the other big thing is start early on the examples and milestones and leave time for questions. The number one reason that students fail in this course is they don’t start the milestones until the day it’s due, they run into problems, it takes time to get answers, they get behind, and it just continues. So start early, get feedback, ask questions. The other big thing is in this course we do allow you to copy paste between your files, but you should do so carefully. If you copy paste a whole file, sometimes you’ll spend more time debugging it versus if you were just carefully rewriting it from scratch. And then of course we’ve introduced you to the get tool. So make sure you use get frequently. The whole joke among programmers is to commit early, commit often, and make sure that if you make a mistake you can always roll back to a previous commit. That’s also really important. And then finally make sure you use and cite any online resources properly. You are not allowed to use some AI code generation tools in this course. Make sure you read the syllabus very carefully, but you can refer to online resources and tutorials. If you use any code or are inspired by any code there, make sure you cite that in your comments. If I find code that I think is not yours, I will look into it and that could be a honor code violation. So when in doubt, use it, cite it, and then let me know or ask me about it before you turn it in and I will let you know how I feel about it.
Other than that, there’s lots of ways you can keep in touch with me this semester. We’ve got the Ed discussion board, that you’ll introduce yourself on. I’m on the CS Discord server. If you’re not there, you can join it at discordbot .cs .ks2 .edu. I host T -time office hours. I think they’re going to be every Monday again. We haven’t set a schedule yet, but I’ll post that as soon as we know. And then of course you can use my Calendly link to schedule one -on -one office hours with me. You’ll do that at least five times throughout the semester for your final project, but you can do that anytime you have any questions. I’m always available to help. So I’m rooting for you. This is a really tough course, but I know you can do it. So good luck this semester. If you have any questions, let me know. Otherwise, I will try and post a weekly announcements video roughly every week. Sometimes I’ll have to skip a week because I’ll be out of town and I’ll post a text announcements, but I’ll try and keep up with weekly announcement videos like this. So watch for these every Monday or Tuesday in your Canvas. Best of luck to you this semester, and I will look forward to seeing you again soon.
Hello and welcome to the week three announcements video for CC410 in spring 2024. This week, you should be wrapping up module two, which is all on object -oriented programming. You will have done a quick example of doing object -oriented programming in a smaller scale, and then you should be working on the first actual restaurant milestone where we’re going to build out the object -oriented classes for all of the items on the menu. This week, we’re going to spend some more time working on object -oriented programming. Specifically, we’re going to take the time to add some documentation to our code. We’re going to add a lot of unit testing to our code, and we’re also going to learn how to make a simple UML class diagram that represents our code in a graphical way so we can understand how it works. You’ll also start working on the second restaurant milestone, which is all about adding documentation and testing to your existing restaurant project.
So the second milestone is adding about unit tests. There are approximately 400 unit tests that you’re going to add. It could be more or less depending on how you implement them, but in my model solution, I’m around 400. You’ll also be adding documentation comments to your code and a class diagram. This milestone, I estimate, will take anywhere between three to eight hours, and it will involve anywhere between 3 ,000 and 4 ,000 lines of code. A lot of those lines of code are in unit tests and documentation comments that are very structured, so you can copy -paste a lot of that, but you’ll still have to be careful and make sure that everything is correct and looks right, and all the unit tests are actually testing the right thing. Finally, as always, as you work on these milestones, if anything is unclear or you feel like something is not described well, feel free to shoot me an email and send me feedback and let me know. I’m always working on refining these so that the requirements are clear and so that it’s easy to understand what you’re supposed to do so that you can spend time working on it very quickly.
Some quick hints for the second milestone. First and foremost, do not look at the source code for the first milestone. What I mean by that is when you’re writing a unit test, don’t go back to your source code to write the unit test, but go back to the initial documentation. For example, if you misinterpreted the documentation and had the price wrong in your source code, and then you used that source code to write the unit test that checks the price, you’re never actually going to test the unit test. find the error that your price was wrong. So instead, you should go back and look at the first milestone and see what the price should be, and write a unit test that confirms that it’s correct based on the documentation, not based on your source code. Hopefully, that makes sense. Another thing you can do is in your unit test files, you can use global attributes to generalize things. And so I’ll show you an example of that here on a later slide in this announcement. And so you can kind of generalize some of the things, but don’t try and generalize the individual ingredients of an item. So for example, if you’ve got a sandwich that has ham and cheese and pepperoni, those things you can’t generalize, but the toppings, because they’re in an enum, you can generalize those. And so you can look at some parameterized tests to generalize across the enums.
So when I talk about generalized tests, here’s what I mean. Here’s a quick example in both Java and Python, where I put the price and the calories as global variables at the top of the class. And then the unit test basically checks to see the price of the item is the price that I put at the top of the class. The reason I do it this way is I can actually copy paste this entire file, change the value of the variables at the top, and then do a control F for the Riker and change the Riker to whatever other item, and that will cover a lot of the unit tests right away. So it allows you to generalize some of your code so that you can do some unit testing and copy paste the code very quickly. It’s all about working a little bit smarter and not necessarily typing everything from scratch, which I know is going to be a change compared to how you did some of the previous computational core courses.
So looking ahead after this milestone, we’ve got modules four and five, introduce inheritance, and debugging into our project, and then we’ll have the second final project milestone toward the end of February, where we’ll actually get to talk a little bit more about final project ideas and maybe have you start doing some design work on your final project. After that, we’re going to go into a couple of modules that are relatively new. They’ve been here for a couple of years, but I still mark them as new modules because they’re kind of a redesign of this course from a year ago, where we’ll spend some time on design patterns and test doubles before we get into user interfaces and web, etc. This milestone is all about writing unit test for your code. I hope that works really well.
I apologize for missing the announcements last week. Some of you may have met with me and realized that I fell and fractured my elbow in my right arm on Monday, and so I wasn’t able to do a whole lot on Monday last week. So I ended up missing this announcement, and I apologize for that. But everything’s going well now. If you have any questions at all, please let me know. My goal today and tomorrow is to get a lot of grading done. So I’ll get caught up on the grading for the first milestone, as well as the Hello World project, and get everybody back up to speed. So if you have any questions, let me know. Otherwise, good luck this week, and I will hopefully see you again next week.
Hello and welcome to the week five announcements video for CC410 in spring 2024. This week you should be wrapping up a module on inheritance and polymorphism. We do a quick inheritance example where we use some different things to see how inheritance affects your classes. There’s also a start -stop -continue survey in these modules. That survey is just a quick check -in for me throughout the semester to see how things are going. It gives you a chance to tell me if there’s anything you’d like me to start doing, anything you’d like me to stop doing, or anything that you really like that I’m doing that you want me to continue doing. Just gives you a chance to give some unofficial, anonymous feedback to me via Qualtrics throughout the semester. You should have some time to work on your final project this week and next week. You’ll notice that there’s not a milestone due last week. So yesterday there’s a milestone due next week, so make sure you’re keeping up on that. We have our next final project milestone next week, so you’ll already be meeting with me again to discuss your final project by the end of February.
This week we’re going to introduce some content around debugging and logging and working with Lambda Expressions. Lambda Expressions are an important little piece of code that we use in a lot of our unit tests, specifically when we’re working with inheritance and polymorphism. So you’ll get to see some Lambda Expressions. We’ll also learn a little bit about how we can add debugging and logging to our code. And this is the week where we’re going to have our third restaurant milestone that’s all about inheritance and polymorphism. And like I said this week, you should be scheduling your second final project meeting to be held sometime next week.
The other big important thing about the third milestone is this is the first one where I am enforcing all of the general requirements that we learned in the HelloRealWorld project. That means when I grade your project, I’m going to run all of the automation on it. I’m going to check for style stuff. I’m going to check for looking at typing in Python. Java, you don’t have to worry about typing, but Python, I’ll be looking at typing. I’ll be looking at the style guide. I’ll be looking at code documentation. I’ll be looking at unit tests. Everything that we covered in that HelloRealWorld project, you should now be doing in Milestone 3. There’s kind of an expandable thing at the top of the milestone that tells you all of the things that are I should check. If you don’t follow the style guide, if you don’t have code documentation, I will take points off starting this week. This is really the point of working in an advanced programming class that mimics industry is in industry, if you turn in code that doesn’t match the style guide that doesn’t have documentations, it’s not useful at all. It’s the same as having no code. And so you really need to start learning to keep track of your style, your documentation, doing all of that as part of your coding practice so that you can turn stuff in and not have a huge list of things to change as you get to the end. You’ll also need to be updating your UML diagram to show all the relationships between the classes.
Thankfully, this milestone is not really big. It’s about 1500 lines of code. And I would say, especially when you’re adding the inheritance, you’re probably removing about as much code as you’re adding new code. So it should really come out in the end. And then as always, if any of these milestones are in unclear or anything can be described better, let me know. I always welcome that feedback for ways that I can make milestones a little bit better.
So some quick hints for working on milestone three. First and foremost is work in small chunks. Don’t try and tear everything apart and put it back together. Start by working on a small chunk, for example, entree. Create your item class, your item interface, create the entree class, get those working, and then go through each individual entree class and update them to use the new base class. Work in small chunks, try and get things working a little bit at a time. You’ve got a whole set of unit tests that you can use to run your code. Your unit test should continue to work as you make these changes. You may have to make small little updates to your unit tests as well as you change the structure. Another big thing to do is to take advantage of the fact we’re using get. As you’re making changes, commit early and commit often. A lot of times I see students start pulling stuff apart and then they get way over their head and they want to try and roll back to a previous one. But if you’re not committing every once in a while, then you may have to roll all the way back to the previous milestone to start over. So commit early, commit often, especially as you get stuff done.
This is also a good opportunity to try test -driven development. With test -driven development, you can actually write your unit tests before you start writing your code. So for example, you can write the unit test to confirm that a particular entree is a subclass of entree. You can write that test, it should fail, and then you can update the code until that test succeeds. It’s a really neat way to write code based on unit tests. It also gives you a little bit different way of approaching things. The other question, the other things I usually give as a hint is it’s unclear in the milestone, but you should be inheriting your item or your order item interface on your base classes, not on the individual entrees themselves. The inheritance is transitive, so if your base class inherits the order item interface, then all of its subclasses will inherit it as well. That’s a much cleaner way to do it. And then finally, feel free to ask questions on syntax. This is really the first time we’re using some of this complex syntax in code, especially when dealing with Lambda expressions and really complex inheritance situations. If you are unsure how to do something, don’t be afraid to ask. That is part of the point of this question. class is to have access to a developer that has some experience like me, that I can sit and work with you and answer questions on syntax and structure and style and things like that and really hope you learn how to become a more effective and more efficient programmer yourself.
So looking ahead after this week, next week we’re going to launch into some new content, which is design patterns and test doubles. These are brand new things that you’ve never learned before. If I had to pick one thing out of this class that I think is the most useful, it’s module six and seven, learning how to use design patterns and learning how to use test, test doubles in your unit tests. Both of those are very powerful skills that will serve you well in industry for sure. Then after that, we’ll start introducing graphical user interfaces, talking about event driven programming, and we’ll go on to do some stuff with web APIs, et cetera. So thankfully it’s not snowing out. Last year when I did this video, it was snowing out. And so I had to have the snow gift here. This this winter we seem to have really unseasonably warm weather. So hopefully you’re enjoying it. But if you’re missing the snow, here’s a quick picture of Lucy in the snow. As always, if you have any questions, let me know. Otherwise, best of luck this week and I will see you again in a couple weeks.