CS371p Fall 2021: Xuefei Zhao
2 min readOct 10, 2021
- What did you do this past week?
Last week I submitted the Voting project. I worked on my other classes’ assignments and learned how to write PyTorch networks in C++. Right now I’m stuck at loading data because I don’t have cuda installed on my computer. - What’s in your way?
Everything has been great. - What will you do next week?
I plan to start looking for partners if the next project is released. - If you read it, what did you think of the Paper #7: Open-Closed Principle?
I read this paper last semester for SWE class. However, it was hard for me to understand the C++ code. Now, with the knowledge of C++, I can better understand the idea of the Open-Closed Principle. As the author said in the paper, it requires experience to come up with a design that perfectly conforms to the Open-Closed Principle. I think the best practice for us is to first come up with a correct solution and use the Open-Closed Principle as an optimization. - What was your experience of arguments, returns, and consts?
It’s interesting to see that using different types for declaration and assignment can achieve so many different purposes. I think it’s really clever to use const to protect the variables from being modified. It’s good to learn these tricks and apply them in my code. - What made you happy this week?
I finished all of my current projects. No need to work on projects over the weekend! - What’s your pick-of-the-week or tip-of-the-week?
For C++ projects, I found some people have a folder named “include” to keep all the .h or .hpp files, and put all .cpp files in the “src” folder. I think it’s a really good idea when the project has a lot of libraries. The users can simply go to the include folder to check the documentation and avoid going through all the .cpp files.