CS371p Fall 2021: Week of Sep 27th- Oct 3rd — William Crawford
1 — What did you do this past week?
This week, I basically completed 3 mini projects and a milestone for my Game Tech team project.
On Monday, I spent my afternoon completing my neglected compilers lexer in yacc (a regex based language extension for c). It was basically a re-implementation of the previous assignment, so it took less time than I was expecting.
On Tuesday, my OOP partner rescheduled our meeting to Thursday since he had a midterm that he needed to study more for. Instead of working with him, I worked on my Game Technology project with the team, and we kinda got wasd keypresses to register in the game we are making.
On Wednesday, I did my entire symbolic programming assignment. That included a couple functions in clojure to solve a basic binary tree maze, basic algebra equations, and also basic variable solving.
On Thursday, I worked on the OOP ranked choice voting project, and we decided to stop as soon as we got the hackerrank tests to pass. Later that day, I also continued work on the Game project and got a cube to move with wasd and rotate properly with vector math.
On Friday, I continued working on OOP with my partner, we basically cleaned up, commented, debugged, and added a bunch of unit tests. I also continued work on the Game project that day.
2 — What’s in your way?
Next week, I have OOP due on Monday, Game due on Friday, and a Compiler parser checkpoint on Friday.
All I have left for the voting project in OOP is just finishing up the tests, and running the one line commands to complete all the requirements.
The game project will continue to get more complicated with a bunch of movement based things we need to add to our moving cube like double jump and maximum walking angles.
3 — What will you do next week?
I plan to meet with my partner and flush out the rest of the OOP project on monday.
I will probably pick two afternoons to get the compilers project requirements finished.
Each day next week in the evening, I also plan to work on the game project with the group, or on my own if they are not available.
I will also need to continue my job search, and if I get bored, I do have another symbolic programming assignment to work on.
4 — If you read it, what did you think of the Paper #6: Single Responsibility Principle?
Keeping functionality broken up into manageable chunks by functionality (or responsibility as they called it) is useful to keep maintainability of code. The principle seems to best work around code that is frequently changed, and should be avoided around static stuff since it is unnecessary and can cause bloat.
5 — What was your experience of stack, queue, priority_queue, values, pointers, and references?
Stacks, and queues are always easy. I learned that priority_queue’s are usually implemented with a heap which means that deque is not a good choice for the large number of accesses that heap’s need. In terms of V vs P vs R, I’ve always hated dealing with pointers probably because of the lack of practice.
6 — What made you happy this week?
My mom came to visit with some stuff from home that I forgot in the initial move onto campus.
I feel better with getting a lot of stuff done and not having as much to do next week.
7 — What’s your pick-of-the-week or tip-of-the-week?
When it comes to adding unit tests, for a large system that implements one function, it is nice to setup the unit tests starting with the smallest piece possible. It might be nice to imagine it like traversing a tree starting from the root nodes. So, even within each function, start by checking pre/post-cons, then basic output, then full output, then side-effects, then maybe a stress-test for the important functions.
Then when we can move to the next function up the line that uses the previous function, and keep writing tests until everything works.
If the tests are written first, then when you get to implementation, it can work a little like a debugging todo list, and the hierarchy might be easier to read.
a handsome face