The End of the Road is now in sight, and has been posted.
-
Final team assignment posted!
-
Parallelism materials
Here are Dan Grossman’s parallelism materials we’ll be using heavily for the rest of the semester. (Scroll down to get to the slide decks.)
-
Practice SWYK check posted
Here is a practice SWYK check for your edification and enjoyment.
-
Seeing the correct quiz answers
I was just astonished to learn that apparently, my Canvas settings were set so that students cannot see the correct answers after the quiz! :-O That seems like the dumbest thing in the world — you guess “Decorator” for the last question on quiz #5, and know you got it wrong, but never learn what the correct pattern for that box example was (the correct answer for that particular question was Composite, by the way).
Anyways, I never in a million years intended to hide the correct answers from you after you have completed the quiz, and I think I have now configured Canvas properly so you can see them. When you get a chance, you might take a peek at one or two of your old quizzes and verify that you can see the correct answers for any items you may have missed!
-
Ugh! jump didn’t work
Oh well. At this point I’m out of ideas and will just cancel the rest of class for today. See you guys on Monday.
-
Crap! Car won’t start 🙁
Really sucks because I was going to start the parallelism and concurrency unit today, and was actually pretty excited about it. Oh well, I can’t think of any easy way out at this point, besides an Uber, which I’ll consider. In the meantime, take your quiz in the usual place and in the usual way. Notes:
- As soon as you start the quiz, mark question #2 false.
- As soon as you start the quiz, mark question #4 false.
- On the last big question, there are some places where I’ve normally been including “this.” that I didn’t do on this quiz. Remember, even if “this.” is not specifically in the program, you’re still accessing an inst var or method on “this” provided there’s no other variable defined that’s closer in scope (like a local variable or parameter).
- Finally, remember that the programming problem is asking “what does the program print out?” not “what does it seem like it ought to print out if it worked the way I think items and boxes and such work in the real world?”
Good luck! See you at 11am, maybe. Stay tuned on this website.
-
One day office hours switch
My car needs an oil change. For today only (Nov 14) I’ll have office hours 2:30-3:30pm instead of the usual 11:30am-12:30pm. Sorry for any inconvenience!
-
Back to our regularly scheduled program
As of this week, I’ll be returning to the O.G. office hours I established at the start of the semester.
-
Thank you, Garrett and Henry!
Props to Garrett and Henry for explaining my own LotR example today in a way that I finally understood, lol. (An additional +1 extra credit to them both, ka-ching.) On Wednesday I’ll explain in detail the apparent paradoxes they helped me understand!
And also, as I said at the end of class, the fact that the activity was complicated enough that even the professor botched it means that I’m awarding everyone who participated today the full +2 extra credit points. Kudos for all your hard work on it!
For those who want to play with the code on their own, I’ve posted it in a git bundle.
-
Zork++ phase 2 posted!
The second stage of your final “Zork++” project has been posted, and is due a week from Wednesday! Happy coding!
-
Shopping cart activity (strategy pattern)
Here’s the example from today, and the correct output.
-
No office hours tonight (Tue, Nov 5)
I’ll be on email, though, so please do send questions! Depending on the timing, I might also be able to hop on Zoom.
-
Gah — office hours tonight
I simply forgot all about office hours tonight (Mon the 4th) — sorry, guys! I can meet on Zoom between now and 9 if you’d like. Just drop me a line.
-
Uno extra credit
I forgot to ask for the turn-ins for Monday’s Uno design activity this week. If your team brings them to me Monday, you can still get your up-to-3 extra credit points for this. (Give them to me even if I don’t ask for them! I’m prone to forget.)
-
Class on Friday, Nov 1st
I won’t be in until 11am today. At exactly 10am, please begin Canvas quiz #4, as per usual. Be sure to type and sign the Honor Pledge correctly at the end!
See you at 11!
-
Zork++ starting point
If your team’s Zork III didn’t really turn out, you are encouraged to use my own solution as a starting point for your Zork++ phase 2. (I know, we’re not on phase 2 yet, but I figured I’d post it in Canvas (zorkIII_stephen.git on Files tab) while I was thinking about it.)
-
Zork day
I’m going to cancel class today (Wednesday) and let you guys focus on your Zork++ projects. I’ve had some good design ideas run by me so far — keep up the creativity!
-
Updated westeros dungeon files
Here are the updated versions of my Game-of-Thrones-themed dungeon files:
Sorry I didn’t post the first of these sooner. If you and your team download the Zork III version, and try to play through it, only to discover your game engine breaks on it, I will give you until Wednesday to fix your code and resubmit Zork III. Hopefully this won’t be necessary, but you have 48 hours to find out.
-
Zork++ phase 1 posted!
The first stage of your final “Zork++” project has been posted, and is due a week from Friday! Start early, respect team boundaries, and give yourself enough time to succeed on this!
-
Stephen’s SWYK 3 solution
If you’d like to look at my solution to Friday’s SWYK check, here it is.
-
Intermittent git branch name weirdness
If you ever get this message when trying to init a new repo:
hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch
hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m You should run this command:
$ git config --global init.defaultBranch main
and hopefully life is good after that.
-
github and SSH keys
github’s documentation seems to be rather coy about this, but I believe that the following statement is true: sometime in the past couple years, github changed their policy and began to mandate that users create SSH key pairs to connect to it, rather than suggest that they do. (Using SSH keys for this is absolutely best practice, so I’m largely in favor of the decision. I do wish that Googling their documentation came up with something clearly stating this, however.)
Bottom line is: each developer on your team must follow Ian’s excellent instructions to set up an SSH key pair and use it to connect to github. (Begin with step 2 under “Making a github user.”)
-
Do this once only
$ git config pull.rebase false
-
Zork III (team assignment) posted!
You should have received your Zork project team assignments in your email (if not, check your spam box, then ask me to re-send) and you are now ready to consider the first team stage of your quest! This is due inviolably at midnight a week from Friday, so DO! NOT! waste any time in getting started!
Good luck, and ask questions — preferably early!
-
“Warning!!”
So, I didn’t type out these instructions again (from Igpay) but it’s the same deal for all the assignments: you must tell me what works and doesn’t when you submit:
Warning!!
One of the following two things must be true for you to get any credit for this assignment. Either:
- your program must, to your knowledge, work perfectly in all aspects, or
- you explicitly tell me, in your submission email, exactly what doesn’t work about it.
In this latter case, you must prefix your explanation with the word WARNING!! and then give a concise but complete description of what your program does not do correctly. For instance, here’s a sample:
Dear Stephen, Please find attached my Program #1 submission. WARNING!! I could only get it to work for single-word inputs, not anything with punctuation or multiple words.
If your program contains bugs or errors that you don’t tell me about, you will receive a zero.
I won’t actually give you a zero this time, but I will direct you immediately to these instructions if you submitted a broken program and didn’t describe what was broken.
-
Stephen’s Zork II posted
If your Zork II was a train wreck, and/or you just want to look at my solution, it is now available in Canvas (Files tab).
-
Do NOT
Do not send requests for help (or anything else besides submissions) to the class “submissions” email address! I do not check that on a daily basis, and now upon grading Zork I see that a few people asked questions that way, which were never delivered. Be sure to send those to my UMW email!
-
Stephen’s VendingMachine solution posted
Here’s my SWYK 2 solution for you to study if you’d like to.
-
Awkward but necessary
So, a couple students had the same really good question: the Exit constructor needs to get Room objects from the Dungeon, but there’s no way to get the Dungeon unless you go to the GameState to get it. But won’t the GameState only learn about which Dungeon is getting instantiated too late in the game? You can’t tell the GameState about the Dungeon only in its .initialize() method, because by that time you’d have to have a complete, wholly-instantiated Dungeon to give it, and you don’t have that when you’re still hydrating Exits.
Here’s the (somewhat awkward) solution: at the top of your Dungeon hydration constructor — it could even be the very first line — do this:
GameState.instance().setDungeon(this);
That way, anything that comes afterwards (like Exit constructors hydrating exits) can safely ask the GameState for the dungeon it’s using, and get a valid object back.
-
Sample .zork test file
When you get your hydration good and working, make sure it works on this sample file. (You can download westeros.zork to your workspace by typing:
$ wget http://stephendavies.org/cpsc240/westeros.zork
That will put it in your current directory (the directory you were in when you typed the wget command). If you want it somewhere else, of course — like “../files” — you can use the mv command.)
-
Zork II diagram corrected
Sorry for the goof! The current homework assignment has now been updated with the correct diagram.
-
Extension on Zork II (Stephen’s an idiot)
Because I screwed up the diagram on the Zork II assignment description, I’m pushing that assignment back two days until Friday Oct 11. I will post the correct, revised diagram later this afternoon — stay tuned.
-
Complete persistence/hydration example posted
Hot off the presses from today’s class:
- Our updated Car.java class
- Our updated Caravan.java class
- Our new (and super-unexciting) NoMoreCarsException.java class
-
If your Zork I was an epic fail
If your Zork I really didn’t come together, for whatever reason, I suggest you use my Zork I as a starting point for your Zork II. You can find it in the “Files” tab of Canvas. All you need to do is get that zorkI_stephen.git file into your home directory on cpsc, then: “git clone zorkI_stephen.git tryTryAgain“. (You can name the directory it will put my stuff into something different than tryTryAgain if you want to.)
-
All-virtual office hours this week
If you hadn’t already guessed, office hours will be on Zoom only this week. Just drop me an email if you’d like to hook up!
-
IMPORTANT: please read
The bevy of Covid cases sweeping through CPSC is scaring me enough that I want to take some evasive action. For this reason, class will be online this coming week (Sep 30, Oct 2, and Oct 4). The Zoom link is in the Canvas announcement I made before the beginning of the semester. If you have trouble finding it, please let me know ASAP.
Class online will be just as important as class in person, so please do attend all three sessions. Also, my Zoom practice is to mandate that your cameras must be on during the entirety of lecture. In all other respects, treat it as just a normal class, together with some possible breakout activities.
I’ll make a judgment call mid-week as to whether we will have our next Canvas quiz (#3) on Friday, or else just normal lecture. In either case, it will not be a SWYK check. Don’t forget what you learned from the first SWYK check! I know it’s turning into a long time between them.
See you online tomorrow at 11am!
-
Class tomorrow (Friday 9/27)
I’ve had seven students email me to tell me they have Covid and will have to miss class. So I’m going to go ahead and cancel tomorrow’s class. We will still have quiz #2 in Canvas which will open at exactly 10am. You should take it in a quiet place where you will be free from interruptions, distractions, and communications with other people. The quiz is open-book, open-notes, closed-Java, closed-other-Websites, and timed at 55 minutes.
See you Monday!
-
Solution to Simone Biles sequence diagram
Here’s my answer to Monday’s sequence diagram challenge:
-
Missing arrow on Zork class diag
A reminder of something I said in class quickly the other day: the Zork I UML class diagram is missing a “has-a” arrow from Dungeon to Room called “entryRoom“. I can recreate the diagram, but then my software will redraw and reposition everything, and I think that might be disorienting to you. So I’ll just announce that you should mentally include that arrow!
-
Mordor memory diagram posted
If you’d like to see a barely-legible version of the Mordor Zork dungeon example I showed on the whiteboard today, be my guest.
Also: a few students approached me who want to set up a rescue fund for Cole, who is trapped in the Mt. Doom lava pit. If you’d like to donate, let me know and I’ll connect you with them.
-
Grading SWYK check 1
As I indicated, this first (and only the first) SWYK check will be graded more leniently than the others, since you guys were getting used to the process and some people had a hard time getting the commands typed in correctly, etc. For this reason, I instituted a hard floor of 7 points out of 10 for the assignment. This means that even if your code didn’t compile, as long as you turned it in correctly you got no lower than a 7/10.
I cannot emphasize enough, however, that if you struggled at all with this SWYK check, you MUST take immediate action between now and the next one to correct what you did wrong. The next SWYK check (on Oct. 4) will not have any artificial grading floor to prop up your score. If your team passes no test cases — or doesn’t even have code that comples — you will get zero points.
For this reason, I stress in the strongest terms the need for you to visit one of the class’s lab aides, or myself between now and then to talk through what you found difficult and why. It simply will not get any easier than this one was.
Finally, as promised, I present my own solution to the SWYK check if you’d like to look at that. (This isn’t the only correct solution, but it is a correct solution.)
-
Office hours zooming
My Zoom is taking up more CPU cycles than I’d like, so I’m going to shut it off when not in use.
If you’d like to Zoom during office hours, please just send me an email, and I’ll be happy to open up!
-
Car class posted
For those of you who wanted to look at the Car example we did in class, here it is! (and Caravan too)
-
First SWYK check Friday!!
Your attention, please! The first of our six SWYK (Show What Y’all Know) checks will be this Friday, Sep. 20 at 10am! I’ll talk more about what it will entail on Wednesday, but in the meantime it wouldn’t hurt to attend Matt’s weekly “SWYK session” in lab aide hours tonight, during which he will walk you through a sample!
(If you aren’t able to attend Matt’s session, don’t despair — the first SWYK check is designed to be kind of an easy example so you can get used to the procedure.)
-
Zork I posted!
The first stage in your Zork journey this semester has been posted, and is due by the stroke of midnight on Saturday, Sept. 28th. This assignment is not for the faint of heart. It will require skill, ingenuity, consistency, dedication, and perseverance to complete.
The first thing you should do — right now, after brewing a cup of coffee or grabbing a Mountain Dew — is read through the entire assignment, calmly and attentively, beginning to end.
-
Massive office hours overhaul
For various reasons, I’m going to be radically switching my office hours around between now and Thanksgiving to be in the evening. The new office hours, starting this week, are in James Farmer Hall 044, or on Zoom, at the following times:
- Mondays 7-9pm
- Tuesdays 7-8pm
- Wednesdays 7-9pm
or by appointment.
As always I’m willing to try and accommodate those who need to meet at another time, subject to joint negotiation.
-
New homework! Due soon!
Please take some time between now and next Tuesday at midnight to complete this homework assignment. And have fun!
-
Instructions for today’s quiz!
Today is quiz #1, which will start promptly at 10am in the classroom. Please bring your laptop, fully charged and with charging cable, and be at a comfortable seat when class begins. (For those who need it, there is a distraction-free room adjacent to the classroom just down the little hall to my office. It has cool tables that go up and down when you press a button.)
The quiz will unlock at exactly 10am. You will have exactly 50 minutes to complete it. The quiz is open-book, open-notes, closed-other-humans, closed-Java, closed-other-websites.
For the last question, you will write and sign the Honor Pledge (yes, you are allowed to look up the Honor Pledge if you don’t remember it — that’s the one and only exception to the “no other websites” rule.) Do be sure to read those instructions carefully, which require that you (1) type the correct pledge, not an incorrect pledge, and (2) “sign it” by typing your full name (first and last) below it.
Good luck!
-
Office hours virtual today
Hit me up at the usual link.
-
Monday’s activity
Sorry for the last-minute notice, but class will be canceled on Monday, Sep 9th.
Instead of having lecture, you should print out this crazy 4-page Java program, and with zero-to-three fellow CPSC 240 students of your choice, work through it manually and figure out what the output of the program is. (By “the output of the program” I mean “what will the program print to the screen when it runs?”) You and your teammates will want to create a stack-and-heap diagram as you work through this.
(Needless to say, you are not allowed to use a Java compiler or any other way of getting a computer to give you the answer, since that would ruin the whole point of the exercise, which is to understand how memory works in a Java program.)
If you don’t know any of your fellow students’ contact info, that’s okay: just show up at the normal classroom at the normal time and pick some partners there! Or if you really want to do this activity by yourself, you can (but it’s hard).
You can earn one extra credit point by sending an email to me (stephen _AT_ umw _DOT_ edu) with subject line “CPSC 240 extra credit turnin” and your predicted program output as the body of the email. You only need to send me one email per team, but you should Cc: all the other members of the team. This extra credit endeavor is due to my inbox no later than midnight, Tuesday Sep 10.
Good luck!
-
Office hours virtual next Monday
FYI, Monday’s office hours will be virtual (over Zoom). You can find the link in the opening semester Canvas announcement.
-
Turn-in clarification
To get credit for the development environment setup, all you need to include in your email is your slang phrase. I trust that you did all the rest.
-
Igpay: helpful String functions
Here are some methods of the String class that you might find useful on your Igpay assignment.
-
Erm, I meant Wednesday
I said “see you Monday, everybody!” at the end of class today, but of course I meant Wednesday since Monday is Labor Day.
-
Program #1 posted!
Your first programming assignment of the semester has been posted, and is due on Tuesday, Sep. 12th at midnight. Don’t delay, start right away!
-
Lab aide hours posted
The drop-in hours for our CPSC student lab aides have been posted. All these hours will begin this coming week (Sep 3rd).
Take advantage of this resource this semester, especially if you find yourself struggling!
-
Welcome!
Greetings, and welcome to the fall 2024 edition of CPSC 240: Object-oriented Analysis & Design with Stephen!
This site is gonna be hip-hoppin’ with all kinds of great stuff real soon, so stay tuned!