CS371p Fall 2021: Xuefei Zhao
2 min readOct 4, 2021
- What did you do this past week?
This past week I worked a lot on the Voting project. My partner and I generated both unit tests and acceptance tests to ensure the correctness of our code, and we optimized our classes and logic. We couldn't make enough time on weekdays, so we also worked on weekends to wrap up the code and submit the project. - What’s in your way?
As I worked on the Voting project, I still feel not familiar with C++, and I had to google a lot about the syntax. - What will you do next week?
I will take a break from OOP and work on other classes’ homework. - If you read it, what did you think of the Paper #6: Single Responsibility Principle?
I think the Single Responsibility Principle provides a good way to optimize our code. As the author mentions in the article, it can help the code be more clear and more efficient. However, it can be hard for less experienced programmers to follow the rules because they might not have a good idea about the responsibilities when designing the classes. I think a good practice is to not think about SRP firsthand and just come up with a possible solution. After that, think about how to refactor the code by applying the SRP. - What was your experience of stack, queue, priority_queue, values, pointers, and references?
I never used stack, queue, or priority_queue in any of my C++ projects, and I found vector is usually enough. However, after learning these data structures, I will consider them for my future projects and see if they are better choices. As for values, pointers, and references, I understand values and pointers from my previous experience with C. I think it’s interesting that C++ has this reference, which is like an “alias” for a variable. I used reference a lot in the Voting project, and I believe I will use reference more in my future projects. - What made you happy this week?
Everything is going well! - What’s your pick-of-the-week or tip-of-the-week?
Youtube can be a great source if you’d like to pick up a new skill. However, official documentation is always the best resource to help you be good at it.