Subsections of Spring 2024
Spring '24 Week 1
YouTube VideoResources
Edited Transcript
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.
Subsections of Spring '24 Week 1
Spring '24 Week 3
YouTube VideoResources
Edited Transcript
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.
Subsections of Spring '24 Week 3
Spring '24 Week 5
YouTube VideoResources
Edited Transcript
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.