CS 371p Spring 2024: Kevin Wang

Kevinywang
2 min readMar 31, 2024

--

What did you do this past week?
I had an exam this Friday. I did some last-minute studying for it, and I think I did pretty well. I also made some progress on the Darwin project, and finished up some Algorithms homework.

What’s in your way?
I’m getting to that busy stage of the semester, so I need to make sure I stay on top of everything. Also, I should set some time aside to look at my fall course selection.

What will you do next week?
I plan to finish and submit the Darwin project as early as I can, since I have an upcoming Algorithms exam to study for.

What did you think of Paper #10. Why getter and setter methods are evil?
I think that the author makes valid points as to why getters and setters have consequences to them, and why they are at times not object-oriented. I agree that programmers may use getters and setters out of convenience, and how doing so might come back to haunt them once a class needs modification. I also enjoyed the author’s description of using CRC notecards for the OO design process. Perhaps I will give that a try sometime; maybe it will help me with Darwin.

What did you think of of std::vector’s copy semantics, r-value references, std::move, and std::vector’s move semantics?
I found the standard vector semantics we focused on this week to be a bit confusing initially. In general, I think that when making time or space optimizations, such as reducing unnecessary vector copying, the optimized code will usually be more complex and tricky than the naive code. However, I’m glad we went analyzed these vector semantics in class so that I now better understand what goes on under-the-hood for standard vector.

What made you happy this week?
My friend from high school is on spring break this week, so he decided to stop by and I showed him around campus. I had a great time talking and catching up with him.

Pick-of-the-Week
You can use Google Colab to type in code prompts, and it will generate a code block that you can run and test in the site.

--

--